# # !/usr/local/bin/perl -T # @(#)register.pl 1.4 # Outputs form data to comma delimited records and mails them as a MIME file # attachent. # Authors: # Anna Symonds # Eric Berg # # Field order- The comma delimited records generated by this program # present the fields in the following order: # address # city # contact # download # e-mail # grades # institution # int_access # internet_time # mainstreamed # num_cdrom # numdisabledstudents # numpercomputer # numstudents # os_access # phone # state # teach # where # zipcode # brwsr # ver_brwsr_netscape # ver_brwsr_explorer # ver_brwsr_aol # ver_brwsr_compuserve # ver_brwsr_mosaic # ver_brwsr_lynx # #use strict; my $N="\n"; my $sendmail = "/usr/lib/sendmail"; my $htmlfile = "/web/planemath/planemath.html"; my $mailaddress = 'info_use@dnai.com'; my @fields = ("address", "city", "contact", "download", "e-mail", "grades", "institution", "int_access", "internet_time", "mainstreamed", "num_cdrom", "numdisabledstudents", "numpercomputer", "numstudents", "os_access", "phone", "state", "teach", "where", "zipcode", "brwsr", "ver_brwsr_netscape", "ver_brwsr_explorer", "ver_brwsr_aol", "ver_brwsr_compuserve", "ver_brwsr_mosaic", "ver_brwsr_lynx"); my $libdir = "/web/planemath-cgi"; $ENV{'PATH'} = $libdir; # All registration data is also saved to this file my $datafile = "/web/planemath/planemath-reg"; # Use a local copy of CGI.pm BEGIN { # unshift(@INC, $libdir); unshift(@INC, "."); } ################################################################# # Start Program, create query object. ################################################################# use CGI qw(:standard); my $query = new CGI; my $institution = $query->param('institution'); ################################################################# # Process form if there are parameters ################################################################# if ($query->param) { # If parameters have been passed to script, process them # Make sure that each field has an entry in the comma separated output. my (@values,$key); foreach $key (@fields) { if (m/e-mail/) { # especially clean it if it's an email address s/;//g; s/ //g; } @keyvals = $query->param($key); if ($#keyvals > 1) { push(@values, q(") . join(qq(""),$query->param($key)) . q(")); } else { push(@values, q(") . $query->param($key) . q(")); } } my $record = join(",",@values); ################################################################# # Send results via email. ################################################################# open (SENDMAIL, "| $sendmail -t -n") || die h1('There was a problem in sending this information. Please contact Planemath at ', a({href=>"mailto:$mailaddress"},$mailaddress)); print SENDMAIL qq(From: planemath To: $mailaddress Subject: PMReg- "$institution" $record ); close SENDMAIL; ################################################################# # Return HTML confirmation screen ################################################################# print header; print <Plane Math Registration Confirmation InfoUse
Plane Math

Thank you for registering with PlaneMath!


Go Back Go On END ################################################################# # print data to flat file in home directory. ################################################################# open(OUTPUT,">> $datafile") || die "Error: Can't open file $datafile."; print OUTPUT $record, $N; close OUTPUT; } else { # If no parameters were passed to script, send registration page print header; print < PlaneMath Teacher Registration Go Back InfoUse

Plane Math

Teacher Registration Form

Please register your class or student group to use PlaneMath. By registering, you are entered in a drawing to win valuable prizes, such as modems and great educational software!

With your registration, we can send you new materials as they are available, like CD-ROMs, posters, etc. Your registration is also important for us to show our funders how many schools are using PlaneMath.


Please fill out the following form, using the tab key or the return key to navigate to the next field. When the form is complete, click on the button to send the registration at the bottom of the form.

Name of Institution:
Contact Person:
Grade(s) Served:
Street Address:
City:
State:
Zip Code:
Phone(optional):
E-mail:

Where are you using PlaneMath? (Choose all that apply):
At Home In the Classroom
In a Resource Room In a Library
Other (please specify):

How many students are using PlaneMath in your classroom or group?
How many of your students using PlaneMath have physical disabilities?
Are the students with physical disabilities mainstreamed? Yes No
How many students per computer do you have when accessing PlaneMath?

Which of the following operating systems are on the computers that students will use to access PlaneMath?

PC:
Windows 95
Windows 3.1
Windows for Workgroups (3.11)
Windows NT
DOS
Other
Macintosh:
Mac OS
Other:
Other (please specify):

How many of these computers have a CD-ROM?
All
None
Some (please specify percentage):

Which of the following browsers do you use on these computers? (For each browser checked, please specify version)
Browser Version
Netscape
Microsoft Internet Explorer
America OnLine
Compuserve
Mosaic
Lynx
Don't Know
Other Browser and Version:

How do you access your internet connection?
Modem : 1200 bps ISDN Line
Modem : 2400 bps T1 Line
Modem : 9600 bps Other (please specify):
Modem : 14400 bps Don't Know
Modem : 28800 bps

Which of the following electronic formats, if any, do you use for teaching?
Internet
CD-ROM
Floppy Disks
Other (please specify):

Would you like a program which makes it easier to download PlaneMath for use later? Yes No

How often do you personally use the internet?
1 to 5 hours/month
6 to 10 hours/month
More than 10 hours/month


Go Back Go On END }