#!/usr/local/bin/perl ######################################################################## # Graphical Message Board # Version 4.0 # Copyright 1998 Techno Trade Online Solutions http://www.technotrade.com # Written By : Sammy Afifi sammy@technotrade.com # Date Last Modified : Sep 1, 1998 ######################################################################## ### These Variables hold the location of the .gif images, default is the same directory ### as the cgi script. Change these values if your cgi-bin will not accept .gif's ### example : $post1 = "http://www.myserver.com/images/post1.gif" ### $post1 = "post1.gif"; $post2 = "post2.gif"; $post3 = "post3.gif"; $post4 = "post4.gif"; $exit = "exit.gif"; $left1 = "left1.gif"; $left2 = "left2.gif"; $right1 = "right1.gif"; $right2 = "right2.gif"; $admin = "admin.gif"; $key = "key.gif"; ##### You need to change the following 2 variables ##### $formaction = "http://www.technotrade.com/board4/board4.cgi"; # Where the CGI script is $basedir = "/u/web/tech12/board4/"; # base directory where data files go (/usr/www/joe/data/) $editorpassword = "1111"; # your password for deleting $badwords = "shit|prick|fuck|bitch|cunt|suck|tits"; #### Did your mother teach you to say that ? &parse_form; ############################################################ # # *** do not change these variables *** # $numdatafields = 6; $messagenumber = $input{'messagenumber'}; # which message number to start at $direction = $input{'direction'}; # which way to go (right, left or list) $boardname = $input{'boardname'}; # text file for the messages # get rid of dangerous characters $boardname =~ s/\>//g; $boardname =~ s/\/g; $boardname =~ s/\+//g; $boardname =~ s/\|//g; $boardname =~ s/\\//g; $boardname =~ s/\///g; $gobackurl = $input{'gobackurl'}; # this is the URL where the user will go to when they click on EXIT $boardtitle = $input{'boardtitle'}; # this stores the title of your message board $direction = "list" if (($formaction ne "") && ($direction eq "")); ### these are used internally by the script $messagetitle = $input{'messagetitle'}; $messagesource = $input{'messagesource'}; $messagebody = $input{'messagebody'}; $msgname = $input{'msgname'}; $msgemail = $input{'msgemail'}; $msgurl = $input{'msgurl'}; $msgdate = $input{'msgdate'}; $gotomessage = $input{'gotomessage'}; $viewtype = $input{'viewtype'}; &readfile; # Read the Message Board Data File if ($direction eq "right") { $gotorecord = $messagenumber; &fetchmessage; } if ($direction eq "left") { $gotorecord = $messagenumber; &fetchmessage; } if ($direction eq "post") { &postmessage; } if ($direction eq "postdata") { &postmessagetofile; &readfile; &displaysubjects; } if ($direction eq "list") { &displaysubjects; } if ($direction eq "goto") { $gotorecord = $messagenumber; &getrecordnum; if($viewtype eq "Delete") { if ($editorpassword eq $input{'delpass'}) { &delete_messages; &readfile; } &displaysubjects; } &fetchmessage if ($numselected == 1); &displayselected; } &print_content; &print_header; print "
| \n"; print " | ||
\n";
print "
| ||
| \n"; print " |
\n";
print "
| ||||
\n";
print "
| ||||
\n";
print "
|
\n";
print "
| |||||
| \n"; $position = 1; $sp = 0; for ($gc = 1; $gc <= $numpostings; $gc++) { if ($gc == $sortedposts[$sp]) { print " | |||||
| \n";
print " \n"; print "Date : $msgdates[$gc] \n"; print "By : $msgnames[$gc] \n"; print " E-mail \n" if ($msgemails[$gc] ne ""); print "URL\n" if ($msgurls[$gc] ne ""); print " \n"; $msgbodys[$gc] =~ s/\n/\ /g; print "$msgbodys[$gc]"; print " | |||||
\n";
print "
|