#!/Perl/bin/perl #Add forum entry require "cgi-lib.pl"; require "common.pl"; require "cookie.lib"; print &PrintHeader; $aon=1; &initial; &getdate; $in=$input{'in'}; $forum=$input{'forum'}; $topic=$input{'topic'}; $ref=$input{'ref'}; if ($ref eq "NEW") { $type="P-"; $original=$stamp; $fname=$type . $stamp . "-" . $name . "-" . $topic . ".htm"; $out=$pathf . $s . $forum . $s . $fname; $htmlout=$sunix . "forums" . $sunix . $forum . $sunix . $fname; } else { $type="R-"; $original=$ref; $fname=$type . $stamp . "-" . $name . "-" . $ref . ".htm"; $out=$pathf . $s . $forum . $s . $fname; $htmlout=$sunix . "forums" . $sunix . $forum . $sunix . $fname; $topic="reply" } $input="forum.htm"; open (IN,$input); if (open(OUT,">$out")) { while () { s/_NAME_/$name/; s/_REF_/$original/; s/_FORUM_/$forum/; s/_TOPIC_/$topic/; s/_WHEN_/$when/; s/_IN_/$in/; print OUT "$_\n"; } close OUT; &good("Thank you $name ...
for your $topic\n entry !!!
"); exit; } else { &bad("Bad open: $out"); }