File: webmod.cgi

package info (click to toggle)
plan 1.10.1-2
  • links: PTS
  • area: main
  • in suites: squeeze, wheezy
  • size: 2,228 kB
  • ctags: 1,995
  • sloc: ansic: 25,050; perl: 1,361; sh: 1,003; makefile: 528; yacc: 121; sed: 17
file content (98 lines) | stat: -rwxr-xr-x 2,621 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#!/usr/bin/perl
#--------------------------------------------------------------------------

#--------------------------------------------------------------------------
require ("./cgi-lib.pl") || die "can\'t require cgi-lib.pl: $!";;
require ("./common.pl") || die "can\'t require common.pl: $!";;

@days=(0,31,28,31,30,31,30,31,31,30,31,30,31 );



#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
sub header {
   local($mo,$yr)=@_;

   print "Content-type: text/html


<HTML>
<HEAD>
<TITLE>January 1999</TITLE>
</HEAD>
<BODY>
";
} # header

#--------------------------------------------------------------------------
# Print the content of the FORM
#--------------------------------------------------------------------------
sub form {
   

#  print "<FONT COLOR=\"#ff0000\">Function disabled until further notice.</FONT>\n<br>";
#  print "<FONT COLOR=\"#ff0000\">Please use Day view for details.</FONT>\n<br>";
#  print "Sorry for inconvenience. This is 1st P1 bug :)\n<br>";
#  return;

   print "<FORM method=post action=webmodDel.cgi TARGET=\"user-info\">\n";


   @PlanData=&get_plan_data(0,$Month,$Year,none);

   $found=0;
   foreach $line ( @PlanData ) {
	   @info=split(/;/,$line);
	   if ( $Row == $info[0] ) {
		   $found=1;
		   last;
	   }
   }
   if ( $found == 0 ) {
	print "<FONT COLOR=\"#ff0000\">Entry not found; please use \"Get Calendar\" to re-sync</FONT>\n";
   }
   else {

   	print "<font size=3>";
   	print "<FONT COLOR=\"#0000ff\">$info[4]</FONT> ";
	print "$info[1] ";
        if ( "$info[2]" ne "-" ) {
	  print "<U>From:</U> $info[2] ";
	  print "<U>Length:</U> $info[3] ";
        } else {
          print "<U>Day event</U> ";
        }
	print "<I>$info[5]</I> ";

	
   	print "<INPUT TYPE=\"HIDDEN\" NAME=\"row\" VALUE=\"$Row\">";
   	print "<INPUT TYPE=\"HIDDEN\" NAME=\"qui\" VALUE=\"$info[4]\">";
   	print "<INPUT TYPE=\"PASSWORD\" NAME=\"userid\" SIZE=\"12\" >";
   	print "<INPUT TYPE=SUBMIT VALUE=\"Delete It\"> \n" ;
   }
   print "</FORM>\n" ;

} # form

#--------------------------------------------------------------------------
# Print the Footer
#--------------------------------------------------------------------------
sub footer {
   print <<"END";
END
   print "</HTML>";
} # footer

#--------------------------------------------------------------------------
# Main Function 
#--------------------------------------------------------------------------
   &ReadParse;
   $Row=$in{row};
   $Month=$in{month};
   $Year=$in{year};

   &header;
   &form;
   &footer;