#!/usr/local/bin/perl ########################################################################## #################### read info for this year: ############################ do "../INFO.pl"; ########################################################################## $bodystmt='bgcolor="#009ebe"'; $title="Bulletin Board for Copper Mountain Conference"; $ThisDir="/www/faculty/copper/$Year/Messages"; $CopperMtHome="/faculty/copper/$Year/"; $addmesgfile="add.html"; $readmesgfile="read.cgi"; $mesgdir="$ThisDir/messages"; # the month and year you started the bulletin board $startyear=($Year-1); $startmonth=10; ########################################################################## @months = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec); @months = qw(January February March April May June July August September October November December); ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime; $year += 1900; print "Content-type: text/html\n\n"; print "\n"; print "\n
\nPlease fill out the form below to choose which messages\n"; print "you would like to scan.
\n"; print "
Post a message to the bulletin board.
Return to main page EOR exit 0; } # this will get the url-encoded data string (all the stuff the # user-entered into netscape) and put it in variable called $buffer if ($ENV{"REQUEST_METHOD"} eq "POST") { read (STDIN,$buffer,$ENV{"CONTENT_LENGTH"}); } else { $buffer=$ENV{"QUERY_STRING"}; } # decode it and put stuff in array VarValues and hashtable VarValues &DecodeUrl($buffer); # give 'em easier to type names @names = @VarNames; %values = %VarValues; # we don't need all that memory anymore @VarNames=(); %VarValues=(); # get the month and year from the url-encoded string ($m,$y)= split(/:/,$values{"month"}); # start the html code print "
\n"; # bad month # 1. $m is not "all" and it's not a number # 2. $m is a number but the year is not a number # 3. $m is a number but it's larger than 12 or less than 1 if ( (($m !~ /^all$/) && ($m !~ /^\d+$/)) || (($m =~ /^\d+/) && ($y !~ /^\d+/)) || (($m =~ /^\d+$/) &&($m > 12 || $m < 1)) ) { print "\n"; print "Try using the offical search page\n"; print "
\n"; print "Post a message to the\n"; print "bulleting board.\n