#!/usr/bin/perl $logfile="logfile"; $width=80; $tmpdir="tmp"; $finaldir="entries"; $urlbase="http://www.demo.cs.brandeis.edu/Private/info"; $thisform="infoform.cgi"; $masterpasswd="33665"; $runindexgen="/usr/bin/perl ./indexgen"; $nopassword=1; use CGI; $query = new CGI; print $query->header; print "
\n";
$continue=undef;
$delete=undef;
$entry=$query->param('entry');
if ( -f "$finaldir/$entry.post") {
if ($query->param('pass')) {
open IN,"<$finaldir/$entry.post";
$oldquery = new CGI(IN);
close IN;
print "olquery loaded title=",$oldquery->param('title'),
"
\n";
if ($query->param('delete')) {
$delete=1;
}
if ($nopassword || $masterpasswd eq $query->param('pass')) {
$continue=1;
}
elsif ($oldquery->param('pass') &&
("" ne trim($oldquery->param('pass')))) {
if ($oldquery->param('pass') eq $query->param('pass')) {
#passwd ok!
print "
password ok.
"; $continue=1; } else { print "
wrong password
"; } } else { print "
Entry can't be modified.
"; } } else { # create a little form for password input print "