#! /opt/bin/perl # ________________________________________________________________ # /\ /\ CyberWeb SoftWare: Internet Information Systems # -{-<*>-}- World-Wide Web # __\/_\/_________________________________________________________ # Author : Alan Richmond, $File = 'Comments.cgi'; $Version = '0.5 BETA'; # Purpose : Send User's Comments # Usage : = 0; # Check that the most important fields were entered. &blank_response ('Email'); &blank_response ('Comment'); $page = $in{'Page'}; $page = 'http://WDVL.Internet.com/' unless $page; print "Content-type: text/html\nLocation: $page\n\n"; exit if ($in{'Email'} =~ /webmaster\@wdvl\.com/); # open (MAIL, "|$mailprog $to $in{'Email'}") || die$!; open (MAIL, "|$mailprog -t -oi")|| die$!; print MAIL "To: $in{'Email'}\n"; print MAIL "Cc: $to\n"; print MAIL "From: $in{'Email'}\n"; print MAIL "Subject: $page\n\n"; print MAIL "Browser: $in{'Agent'}\n"; print MAIL "Comment: $in{'Comment'}"; close (MAIL); # it's a good idea to check the exit code of close on a pipe to catch error messages from sendmail. - TBD.. # ________________________________________________________________ sub blank_response { # ________________________________________________________________ unless ($in{$_[0]}) { $v{'Title'} = "Please enter a $_[0]."; &ShowForm; exit ; } } # ________________________________________________________________ sub ShowForm { # ________________________________________________________________ # $org = $in{'Organisation'}; $agent = $in{'Agent'}; $page = $in{'Page'}; $link = $in{'Link'}; $title = $in{'Title'}; $from = $in{'Email'}; # $host = $ENV{'REMOTE_HOST'} unless $host; $agent = $ENV{'HTTP_USER_AGENT'} unless $agent; $from = $ENV{'HTTP_FROM'} unless $from; $page = $ENV{'HTTP_REFERER'} unless $page; $page = 'http://WDVL.Internet.com/' unless $page; $v{'url'} = '/Software/Perl/Comments.cgi'; $v{'Style'} = 'Textarea, Input { font-size: smaller; }'; print "Content-type: text/html\n\n"; # Tell browser what's coming.. &Head (1); # open (IN, "<$SWP/Comments.ht")||die$!; # ; # Skip Content: # while () { print; } print <

Have You Read the FAQ ?

Your Email Address:
Browser:
URL, if problem:
EOT &Foot ; exit; }