#!/usr/local/bin/perl
print "Content-type: text/html\n\n";
##&Admin_Login unless (&checkLogin);
#get the files we need
##this cgi should accept new entries and stick them in the directory with a "-" at the end of the file name.
#
#
#
%formdata = &Parse_web_data();
$from = $ENV{HTTP_REFERER};
##change cheese44 to your chosen password
unless ($formdata{pass}=~/cheese44/i){
print "Invalid password. Please try again";
exit;
}
##change the path below to the path to your blosxom file
$filepath = '/home/laurien/public_html/cgi/blosxom.cgi';
$filename = $formdata{who};
$directory = $formdata{directory}."/";
$file = $filepath . $directory . $filename . ".txt";
$file =~ s/ //g;
$counter = 2;
while (-e $file) {
$file = $filepath.$directory.$filename.$counter.".txt";
$counter++;
}
open (WRITE, ">$file");
print WRITE "$formdata{title}\n";
print WRITE " ";
print WRITE "$formdata{body}\n";
print WRITE "
\n";
print WRITE "posted by $formdata{who}.";
¬ify_mail();
print <Thanks!
Thanks for your entry! It should appear immediately here:
#change the line below to link to your blosxom space
Main