#!/usr/bin/perl require "cgi-lib.pl"; require "subroutines.pl"; &ReadParse; print &PrintHeader; $url="http://soccermb.netfirms.com/board/bb.htm"; $bbfile1 = "$ENV{'DOCUMENT_ROOT'}/www/board/box1.htm"; $bbfile2 = "$ENV{'DOCUMENT_ROOT'}/www/board/box2.htm"; $bbfile3 = "$ENV{'DOCUMENT_ROOT'}/www/board/box3.htm"; $bbfile4 = "$ENV{'DOCUMENT_ROOT'}/www/board/box4.htm"; unless (-e $bbfile1) { print <<"PrintTag";

$bbfile1 not present.

Did you upload the file? If so, the server path to your box1.htm file is incorrect in your CGI program. Check with your hosting service to find the server path to your HTML files.

PrintTag exit(0); } unless (-e $bbfile2) { print <<"PrintTag";

$bbfile2 not present.

Did you upload the file? If so, the server path to your box1.htm file is incorrect in your CGI program. Check with your hosting service to find the server path to your HTML files.

PrintTag exit(0); } unless (-e $bbfile3) { print <<"PrintTag";

$bbfile3 not present.

Did you upload the file? If so, the server path to your box1.htm file is incorrect in your CGI program. Check with your hosting service to find the server path to your HTML files.

PrintTag exit(0); } unless (-e $bbfile4) { print <<"PrintTag";

$bbfile4 not present.

Did you upload the file? If so, the server path to your box1.htm file is incorrect in your CGI program. Check with your hosting service to find the server path to your HTML files.

PrintTag exit(0); } $tempfile1="$ENV{'DOCUMENT_ROOT'}/www/board/bbtemp1.htm"; $tempfile2="$ENV{'DOCUMENT_ROOT'}/www/board/bbtemp2.htm"; $tempfile3="$ENV{'DOCUMENT_ROOT'}/www/board/bbtemp3.htm"; $tempfile4="$ENV{'DOCUMENT_ROOT'}/www/board/bbtemp4.htm"; if (($in{'visitor_name'} eq "") || ($in{'visitor_email_address'} eq "") || ($in{'radioset'} eq "") || ($in{'Comment'} eq "")) { print <<"PrintTag";

Data Incomplete

Your request to send comments to the board has been rejected due to insufficient information. To properly send your comments, please fill out:

\n

\n\n\n"; exit(0); } #STOP HERE FOR NOW if (($in{'Comments'} =~ /damn/) || ($in{'Comments'} =~ /darn/) || ($in{'Comments'} =~ /dang/) || ($in{'Comments'} =~ /shit/) || ($in{'Comments'} =~ /basterd/) || ($in{'Comments'} =~ /fuck/) || ($in{'Comments'} =~ /fuckin'/) || ($in{'Comments'} =~ /fucking/) || ($in{'Comments'} =~ /freak/) || ($in{'Comments'} =~ /freakin'/) || ($in{'Comments'} =~ /freaking/) || ($in{'Comments'} =~ /bitch/) || ($in{'Comments'} =~ /bitchin'/) || ($in{'Comments'} =~ /bitching/)) { print<<"PrintTag";

Request denied-improper language.

PrintTag exit(0); } $in{'visitor_name'} =~ s/\/>/g; $in{'visitor_email_address'} =~ s/\/>/g; $in{'Comment'} =~ s/\/>/g; if (-e "lock.fil") { print <<"PrintTag";

Try again!

The bulletin board is in use. Please try again later.

PrintTag exit(0); } open(LOCKFILE, ">lock.fil"); #Start subroutines if ($in{'radioset'} eq "Kern" || "San Luis Obispo" || "Santa Barbara") { &box1 } if ($in{'radioset'} eq "Riverside" || "San Diego" || "Imperial") { &box4 } if ($in{'radioset'} eq "Orange" || "San Bernadino") { &box3 } if ($in{'radioset'} eq "Ventura" || "Los Angeles") { &box2 } #open(BBFILE,"$bbfile") || die "Can't find bulletin board.\n"; #@indata = ; #close(BBFILE); #open(TEMPFILE,">$tempfile") || die "Can't find temp file.\n"; #foreach $i (@indata) #{ #chop($i); #print TEMPFILE "$i\n"; #if ($i =~ //i) #{ #print TEMPFILE "

"; #print TEMPFILE "$in{'name'}"; #print TEMPFILE ""; #print TEMPFILE "
"; #print TEMPFILE "$in{'comments'}


\n\n"; #} #} #refresh bulletin board #close(TEMPFILE); #rename("$bbfile", "$bbfile.old"); #rename("$tempfile", "$bbfile"); #close(LOCKFILE); #unlink("lock.fil"); #Thank you page #print <<"PrintTag"; # #

Bulletin Board Entry Accepted

#

View Bulletin Board

# #PrintTag #### sub box1 { $url="http://soccermb.netfirms.com/board/box1.htm"; $bbfile1 = "$ENV{'DOCUMENT_ROOT'}/www/board/box1.htm"; $tempfile1="$ENV{'DOCUMENT_ROOT'}/www/board/bbtemp1.htm"; open(BBFILE,"$bbfile1") || die "Can't find bulletin board.\n"; @indata = ; close(BBFILE); open(TEMPFILE,">$tempfile1") || die "Can't find temp file.\n"; foreach $i (@indata) { chop($i); print TEMPFILE "$i\n"; if ($in{'radioset'} eq "Kern") { if ($i =~ //i) { print TEMPFILE "

"; print TEMPFILE "$in{'visitor_name'}"; print TEMPFILE ""; print TEMPFILE "
"; print TEMPFILE "$in{'Comment'}


\n\n"; close(TEMPFILE); rename("$bbfile1", "$bbfile.old"); rename("$tempfile1", "$bbfile1"); close(LOCKFILE); unlink("lock.fil"); #Thank you page print <<"PrintTag";

Bulletin Board Entry Accepted

View Bulletin Board

PrintTag } } } if ($in{'radioset'} eq "San Luis Obispo") { if ($i =~ //i) { print TEMPFILE "

"; print TEMPFILE "$in{'visitor_name'}"; print TEMPFILE ""; print TEMPFILE "
"; print TEMPFILE "$in{'Comment'}


\n\n"; close(TEMPFILE); rename("$bbfile1", "$bbfile.old"); rename("$tempfile1", "$bbfile1"); close(LOCKFILE); unlink("lock.fil"); #Thank you page print <<"PrintTag";

Bulletin Board Entry Accepted

View Bulletin Board

PrintTag } } if ($in{'radioset'} eq "Santa Barbara") { if ($i =~ //i) { print TEMPFILE "

"; print TEMPFILE "$in{'visitor_name'}"; print TEMPFILE ""; print TEMPFILE "
"; print TEMPFILE "$in{'Comment'}


\n\n"; close(TEMPFILE); rename("$bbfile1", "$bbfile.old"); rename("$tempfile1", "$bbfile1"); close(LOCKFILE); unlink("lock.fil"); #Thank you page print <<"PrintTag";

Bulletin Board Entry Accepted

View Bulletin Board

PrintTag } } } } #refresh bulletin board #close(TEMPFILE); #rename("$bbfile", "$bbfile.old"); #rename("$tempfile", "$bbfile"); #close(LOCKFILE); #unlink("lock.fil"); #Thank you page #print <<"PrintTag"; # #

Bulletin Board Entry Accepted

#

View Bulletin Board

# #PrintTag sub box2 { $url2 = "http://soccermb.netfirms.com/board/box2.htm"; $bbfile2 = "$ENV{'DOCUMENT_ROOT'}/www/board/box2.htm"; $tempfile2="$ENV{'DOCUMENT_ROOT'}/www/board/bbtemp2.htm"; open(BBFILE,"$bbfile2") || die "Can't find bulletin board.\n"; @indata = ; close(BBFILE); open(TEMPFILE,">$tempfile2") || die "Can't find temp file.\n"; foreach $i (@indata) { chop($i); print TEMPFILE "$i\n"; if ($in{'radioset'} eq "Ventura") { if ($i =~ //i) { print TEMPFILE "

"; print TEMPFILE "$in{'visitor_name'}"; print TEMPFILE ""; print TEMPFILE "
"; print TEMPFILE "$in{'Comment'}


\n\n"; close(TEMPFILE); rename("$bbfile2", "$bbfile.old"); rename("$tempfile2", "$bbfile2"); close(LOCKFILE); unlink("lock.fil"); #Thank you page print <<"PrintTag";

Bulletin Board Entry Accepted

View Bulletin Board

PrintTag } } if ($in{'radioset'} eq "Los Angeles") { if ($i =~ //i) { print TEMPFILE "

"; print TEMPFILE "$in{'visitor_name'}"; print TEMPFILE ""; print TEMPFILE "
"; print TEMPFILE "$in{'Comment'}


\n\n"; close(TEMPFILE); rename("$bbfile2", "$bbfile.old"); rename("$tempfile2", "$bbfile2"); close(LOCKFILE); unlink("lock.fil"); #Thank you page print <<"PrintTag";

Bulletin Board Entry Accepted

View Bulletin Board

PrintTag } } } } sub box3 { $url3 = "http://soccermb.netfirms.com/board/box1.htm"; $bbfile3 = "$ENV{'DOCUMENT_ROOT'}/www/board/box3.htm"; $tempfile3="$ENV{'DOCUMENT_ROOT'}/www/board/bbtemp3.htm"; open(BBFILE,"$bbfile3") || die "Can't find bulletin board.\n"; @indata = ; close(BBFILE); open(TEMPFILE,">$tempfile3") || die "Can't find temp file.\n"; foreach $i (@indata) { chop($i); print TEMPFILE "$i\n"; if ($in{'radioset'} eq "Orange") { if ($i =~ //i) { print TEMPFILE "

"; print TEMPFILE "$in{'visitor_name'}"; print TEMPFILE ""; print TEMPFILE "
"; print TEMPFILE "$in{'Comment'}


\n\n"; close(TEMPFILE); rename("$bbfile3", "$bbfile.old"); rename("$tempfile3", "$bbfile3"); close(LOCKFILE); unlink("lock.fil"); #Thank you page print <<"PrintTag";

Bulletin Board Entry Accepted

View Bulletin Board

PrintTag } } if ($in{'radioset'} eq "San Bernadino") { if ($i =~ //i) { print TEMPFILE "

"; print TEMPFILE "$in{'visitor_name'}"; print TEMPFILE ""; print TEMPFILE "
"; print TEMPFILE "$in{'Comment'}


\n\n"; close(TEMPFILE); rename("$bbfile3", "$bbfile.old"); rename("$tempfile3", "$bbfile3"); close(LOCKFILE); unlink("lock.fil"); #Thank you page print <<"PrintTag";

Bulletin Board Entry Accepted

View Bulletin Board

PrintTag } } } } sub box4 { $url4 = "http://soccermb.netfirms.com/board/box4.htm" $bbfile4 = "$ENV{'DOCUMENT_ROOT'}/www/board/box4.htm"; $tempfile4="$ENV{'DOCUMENT_ROOT'}/www/board/bbtemp4.htm"; open(BBFILE,"$bbfile4") || die "Can't find bulletin board.\n"; @indata = ; close(BBFILE); open(TEMPFILE,">$tempfile4") || die "Can't find temp file.\n"; foreach $i (@indata) { chop($i); print TEMPFILE "$i\n"; if ($in{'radioset'} eq "Riverside") { if ($i =~ //i) { print TEMPFILE "

"; print TEMPFILE "$in{'visitor_name'}"; print TEMPFILE ""; print TEMPFILE "
"; print TEMPFILE "$in{'Comment'}


\n\n"; close(TEMPFILE); rename("$bbfile4", "$bbfile.old"); rename("$tempfile4", "$bbfile4"); close(LOCKFILE); unlink("lock.fil"); #Thank you page print <<"PrintTag";

Bulletin Board Entry Accepted

View Bulletin Board

PrintTag } } if ($in{'radioset'} eq "San Diego") { if ($i =~ //i) { print TEMPFILE "

"; print TEMPFILE "$in{'visitor_name'}"; print TEMPFILE ""; print TEMPFILE "
"; print TEMPFILE "$in{'Comment'}


\n\n"; close(TEMPFILE); rename("$bbfile4", "$bbfile.old"); rename("$tempfile4", "$bbfile4"); close(LOCKFILE); unlink("lock.fil"); #Thank you page print <<"PrintTag";

Bulletin Board Entry Accepted

View Bulletin Board

PrintTag } } if ($in{'radioset'} eq "Imperial") { if ($i =~ //i) { print TEMPFILE "

"; print TEMPFILE "$in{'visitor_name'}"; print TEMPFILE ""; print TEMPFILE "
"; print TEMPFILE "$in{'Comment'}


\n\n"; close(TEMPFILE); rename("$bbfile4", "$bbfile.old"); rename("$tempfile4", "$bbfile4"); close(LOCKFILE); unlink("lock.fil"); #Thank you page print <<"PrintTag";

Bulletin Board Entry Accepted

View Bulletin Board

PrintTag } } } } 1;