#!/usr/local/bin/perl # Script: mail_to.cgi # Modified 19oct96 for use at the bmwnorcal.org site at digiweb # Copyright 1996 Scot J. Marburger # All rights reserved # Permission to use this script without the written permission # of the author is denied # BEGIN { unshift(@INC, '/www/bmwnorcal/html/cgi'); } require "CGI.pm"; require "home_def.cgi"; require "sjm_lib.cgi"; #set up storage for form input $query = new CGI; # Configure the script here... $method = 'POST'; $MAIL_TO = 'webmaster@bmwnorcal.org'; # who to send the mail to $author = 'scot@gunsmoke.com'; $OWNER = 'The BMW Club of Northern California'; # organization that the script is written for $TITLE = '\@#%& NorCal Mail &%#\@'; # title at the top of the web page $YEAR = "1997"; $script_file = $cgiHOME."/mail_scripts/mail_to.cgi"; $url_home = "http://www.bmwnorcal.org"; $url_mail_script = "http://www.bmwnorcal.org/cgi/norcal/mail_scripts/mail_to.cgi"; # Image file urls $img_logo = "http://www.bmwnorcal.org/norcal/images/norcal_logo.gif"; $img_logo_size = "WIDTH=180 HEIGHT=179"; $img_button_send = "http://www.bmwnorcal.org/norcal/images/button_send.gif"; $img_button_clear = "http://www.bmwnorcal.org/norcal/images/button_clear.gif"; $img_line_marble_red = "http://www.bmwnorcal.org/norcal/images/line_marble_red.gif"; $img_arrow_marble_red = "http://www.bmwnorcal.org/norcal/images/arrow_marble_red.gif"; $img_background = "http://www.bmwnorcal.org/norcal/images/norcal_logo_embos.gif"; # print the html header for text/html print $query->header; # print the canned HTML header print $query->start_html( -title=>$TITLE, -author=>$author, -BGCOLOR=>'#FFFFFF', -BACKGROUND=>$img_background ); # put the usual stuff at the top of the form print "
";
print "Mail To: $MAIL_TO";
print "
";
print "Copy To: ", $query->textfield( -name=>'copy_to',
-default=>'',
-size=>35);
print "
";
print "From: ", $query->textfield( -name=>'name',
-default=>'Needed For A Reply',
-size=>35);
print "
";
print "Sender's email: ", $query->textfield( -name=>'from',
-default=>'Needed For A Reply',
-size=>35);
print "
";
print "Subject: ", $query->textfield( -name=>'subject',
default=>$TITLE,
-size=>35);
print "
";
print " ",
"Please be sure your email address is properly entered to ensure ",
" that we can reply to you.
",
"Please! If you are writing to report a problem with the ",
"web site, include the following information in your note:
",
"The url of the page that the error occured on.
",
"Any error message that appears (Tip: use copy and paste to enter ",
"the error text into the text box below).
",
"The url of any broken link you find (and the replacement link ",
"you found using ",
"",
"Alta Vista if you want big brownies from",
"the WebMaster!).
",
"Your email address, just in case we have any questions.
"; print "
How would you rate page content quality?
Which computer type to you use most for accessing the Internet?
Which Web Browser do you use most frequently?
From where do you access the Internet most frequently?
What connection type do you use to access the Internet most frequently?
Please indicate your age group:
Please indicate your gender:
How would you rate the organization of this Web Site?
Thank you very much for participating in our survey. Your
answers will help us provide better web sites to the Internet
Community.
",
$query->popup_menu( 'organization',
['Excellent',
'Good',
'Average',
'Terrible'],
'Excellent');
print "
",
$query->popup_menu( 'contents',
['Excellent',
'Good',
'Average',
'Terrible'],
'Excellent');
print "
",
$query->radio_group( -name=>'computer',
-values=>['PC/Clone', 'Unix Platform', 'Mac', 'Other'],
-default=>'PC/Clone');
print "
",
$query->radio_group( -name=>'browser',
-values=>['Netscape 2.X', 'Netscape 1.X', 'AOL',
'Compuserve', 'Prodigy','Other'],
-default=>'Netscape 2.X');
print "
",
$query->radio_group( -name=>'from_where',
-values=>['Work', 'Home', 'Other'],
-default=>'Work');
print "
",
$query->radio_group( -name=>'access',
-values=>['Modem/ISP', 'Modem/AOL', 'Modem/Other',
'T1 Line', 'Ethernet', 'Other'],
-default=>'Modem/ISP');
print "
",
$query->radio_group( -name=>'age',
-values=>['younger than 21', '21 to 30', '31 to 40',
'41 to 50', '51 to 65', 'Over 65'],
-default=>'21 to 30');
print "
",
$query->radio_group( -name=>'sex',
-values=>['Woman', 'Man'],
-default=>'');
print "
";
print $query->image_button( -name=>'send_button',
-src=>$img_button_send,
-align=>'LEFT BORDER=0 WIDTH=108 HEIGHT=48 ALT=\"SEND\"');
print $query->image_button( -name=>'clear_button',
-src=>$img_button_clear,
-align=>'LEFT BORDER=0 WIDTH=108 HEIGHT=48 ALT=\"CLEAR\"');
print "
";
}
# ---------- E-mail the form out ---------
# One copy gets e-mailed to the address at $MAIL_TO. Another gets mailed to
# the address at $query->textfield( 'copy_to' ), if any. Some of the
# information that the client enters gets displayed
# on the screen so that the remote user knows something happened.
sub do_work {
local( $query ) = @_;
# First check to see if the form is completed correctly
if ( $query->param( 'name' ) eq "Needed For A Reply" ||
$query->param( 'from' ) eq "Needed For A Reply" )
{
print "
";
&mail_copy( STDOUT, $to, $query );
print "";
print "