#! /usr/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 ('Name'); &blank_response ('Email'); &blank_response ('Comment'); $page = $in{'Page'}; $page = 'http://WWW.Stars.com/' unless $page; print "Content-type: text/html\n"; # Tell browser what's coming.. print "Location: $page\n\n"; open (MAIL, "|$mailprog $to $in{'Email'}") || die$!; 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); # ________________________________________________________________ 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://WWW.Stars.com/' unless $page; $v{'url'} = '/Software/Perl/Comments.cgi'; print "Content-type: text/html\n\n"; # Tell browser what's coming.. # # Here you need to print out the HTML header stuff. # &Head (1); print <see this. If you want to ask a question or just chat, please use our Conference Site. If you are reporting a problem, please be sure to give us the URL of the page where you encountered it. Why we don't publish our email address.