#!/usr/local/bin/perl
#header error
do "cgi.lib.pl" || die "Fatal Error: Can't load cgi library";
&ReadParse;
print "Content-type: text/html\n\n";
#Returns acknowledgment of registration submission
print "<HTML>";
print "<HEAD><TITLE>Your Registration Form Has Been Submitted\!</TITLE>";
print "</HEAD><BODY>";
print "<H2>Your Submission Has Been Submitted to the Moderator\!</H2>";
print "<P>You will be informed by moderator about the\n";
print "the seminar schedule as soon as possible\n";
print "<HR>";
print "<H3>Back to the <A HREF=\"/borot.html\">";
print "More Seminar Registration Page</A></H3>";
print "</BODY></HTML>";
#assign prcess id to $pid
$pid=$$;
#open COMMENTSFILE
open (COMMENTSFILE,">/tmp/my_comment.$pid");
#enter data into file for mailing
print COMMENTSFILE "Thomas More Seminar Registration\n";
print COMMENTSFILE "--------------------------------\n";
print COMMENTSFILE "Name:	$in{'name'}\n";
print COMMENTSFILE "E-mail Address:	$in{'e-mail'}\n";
print COMMENTSFILE "Institution:	$in{'institution'}\n";
print COMMENTSFILE;
print COMMENTSFILE "Status:	$in{'Status'}\n";
print COMMENTSFILE "Other:	$in{'Other'}\n";
print COMMENTSFILE;
print COMMENTSFILE "Languages\n";
print COMMENTSFILE "---------\n";
print COMMENTSFILE "English:	$in{'English'}\n";
print COMMENTSFILE "French:	$in{'French'}\n";
print COMMENTSFILE "Latin:	$in{'Latin'}\n";
print COMMENTSFILE;
print COMMENTSFILE "Additional Comments:	$in{'add'}\n";
#close out file
close COMMENTSFILE;
#send file to moderator, EMLS Administrator, and iEMLS Managing Editor
$command="mail lb@alor.univ-montp3.fr < /tmp/my_comment.$pid";
system ($command);
$command="mail jdmiller@unixg.ubc.ca < /tmp/my_comment.$pid";
system ($command);
$command="mail engl5105@nexus.yorku.ca < /tmp/my_comment.$pid";
system ($command);
#erase temp file
unlink ("/tmp/my_comment.$pid);
