#!/usr/bin/perl
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
require ("./cgi-lib.pl") || die "can\'t require cgi-lib.pl: $!";;
require ("./common.pl") || die "can\'t require common.pl: $!";;
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
sub header {
local($mo,$yr)=@_;
print "Content-type: text/html
January 1999
";
} # header
#--------------------------------------------------------------------------
# Print the content of the FORM
#--------------------------------------------------------------------------
sub delete {
print "Attempt to delete ... \n";
if ( $Qui ne $Userid ) {
print "Can not delete: please use \"Get Calendar\" to re-sync\n";
return;
}
else {
open ( IN , "/usr/local/bin/plan -W -X $Row $Qui |" );
@error=;
close(IN);
foreach $line ( @error ) {
print "$line\n";
}
print "Done. Please use \"Get Calendar\" to re-sync\n";
}
} # form
#--------------------------------------------------------------------------
# Print the Footer
#--------------------------------------------------------------------------
sub footer {
print <<"END";
END
print "";
} # footer
#--------------------------------------------------------------------------
# Main Function
#--------------------------------------------------------------------------
&ReadParse;
$Row=$in{row};
$Qui=$in{qui};
$Userid=$in{userid};
&header;
&delete;
&footer;