#!/usr/local/bin/perl -w
push(@INC,"/usr/local/etc/httpd/cgi-bin");
require ("cgi-lib.pl");
&ReadParse;
print &PrintHeader;
#Start of Errors for fields not fill in HTML
if ($in{'Date'} eq "" || $in{'id'} eq "" || $in{'fname'} eq"" || $in{'lname'} eq"" ||
$in{'center'} eq "None" || $in{'printer'} eq"None" ||
$in{'phone'} eq "" || $in{'job_title'} eq "" || $in{'cemail'} eq"" ||
$in{'replacing'} eq "" || $in{'status'} eq "" ||
(($in{'status'} eq "faculty") && ($in{'dept'} eq "" )) ||
(($in{'cemail'} eq "Yes") && ($in{'email2'} eq "" )) ||
(($in{'replacing'} eq "Yes") && ($in{'whom'} eq "" )) ||
$in{'requestor'} eq "" || $in{'email'} eq ""){
print "
Incomplete Datatel Security Form
\n";
print "";
print "
Chapman University Office of Administrative Computing
Request for Datatel Security Account
We're sorry, your request cannot be processed at this time.
You
must fill out the request form completely. Here is what you missed.
\n";
if ($in{'status'} eq ""){
print "
Status
\n";
}
if ($in{'Date'} eq ""){
print "
Today's Date
\n";
}
if ($in{'id'} eq ""){
print "
Datatel ID
\n";
}
if ($in{'fname'} eq ""){
print "
First Name
\n";
}
if ($in{'lname'} eq ""){
print "
Last Name
\n";
}
if ($in{'center'} eq "None"){
print "
CUC Campus
\n";
}
if ($in{'printer'} eq "None"){
print "
CUC Printer
\n";
}
if ($in{'phone'} eq ""){
print "
Office Number
\n";
}
if ($in{'job_title'} eq ""){
print "
Job Title
\n";
}
if ($in{'cemail'} eq "Yes" && $in{'email2'} eq ""){
print "
Do you have a Chapman E-mail
Address
\n";
}
if ($in{'replacing'} eq "Yes" && $in{'whom'} eq ""){
print "
Who is the former Chapman
Employee
\n";
}
if ($in{'requestor'} eq ""){
print "
Name of Requestor
\n";
}
if ($in{'email'} eq ""){
print "
E-mail Address of Requestor
\n";
}
if ($in{'status'} eq "faculty" && $in{'dept'} eq ""){
print "
Faculty Member's
Department
\n";
}
#Start work as a do statement
if ($in{'error'} eq ""){
print "
Please click the
back button in the upper left hand corner of you screen, this will allow
to keep the current information that you have typed in while you fill out
the form completely. If you don't have a back button, pleases click the
following.
Back to
the Request Form page
\n"; exit
}
}
# End work as a do statement
#End of Errors for fields not fill in HTML
#start of menu for Centers
else {
if ($in{'center'} eq "Antelope Valley") {$acid = "252";}
if ($in{'center'} eq "Bangor") {$acid = "18";}
if ($in{'center'} eq "Coachella Valley") {$acid = "213";}
if ($in{'center'} eq "Concord") {$acid = "57";}
if ($in{'center'} eq "Diamond Springs") {$acid = "284";}
if ($in{'center'} eq "CUC Main Office") {$acid = "101";}
if ($in{'center'} eq "Edwards AFB") {$acid = "231";}
if ($in{'center'} eq "Irvine") {$acid = "241";}
if ($in{'center'} eq "EXED Office Irvine") {$acid = "EXED 41";}
if ($in{'center'} eq "Fairfield") {$acid = "288";}
if ($in{'center'} eq "Ft. Lewis") {$acid = "245";}
if ($in{'center'} eq "Hanford") {$acid = "238";}
if ($in{'center'} eq "Los Angeles") {$acid = "206";}
if ($in{'center'} eq "Lemoore") {$acid = "230";}
if ($in{'center'} eq "McChord") {$acid = "246";}
if ($in{'center'} eq "Modesto") {$acid = "253";}
if ($in{'center'} eq "Monterey") {$acid = "267";}
if ($in{'center'} eq "Moreno Valley") {$acid = "244";}
if ($in{'center'} eq "Ontario") {$acid = "291";}
if ($in{'center'} eq "Sacramento") {$acid = "237";}
if ($in{'center'} eq "EXED Office Sacramento") {$acid = "EXED 37";}
if ($in{'center'} eq "San Diego") {$acid = "228";}
if ($in{'center'} eq "Santa Maria") {$acid = "226";}
if ($in{'center'} eq "Travis") {$acid = "232";}
if ($in{'center'} eq "Twentynine Palms") {$acid = "234";}
if ($in{'center'} eq "Vandenberg") {$acid = "225";}
if ($in{'center'} eq "Victor Valley") {$acid = "224";}
if ($in{'center'} eq "Visalia") {$acid = "239";}
if ($in{'center'} eq "Whidbey Island") {$acid = "236";}
if ($in{'center'} eq "Yuba City") {$acid = "272";}
#End of menu for Centers
#Start E-Mailing Information
$mailprog ="/usr/lib/sendmail";
$sendto = "baxleyt\@chapman.edu,bondad\@chapman.edu,skeith\@chapman.edu,greeley\@chapman.edu,mpotts\@chapman.edu";
$sendCc = $in{'email'};
if ($in{'cemail'} eq "No"){
$sendBcc = "cabrera\@chapman.edu,rlane\@chapman.edu"};
$subject = "Request for Datatel Account";
open(MAIL, "|$mailprog -t") || die "Can't open $mailprog!";
print MAIL "To: $sendto\n";
print MAIL "From: ",$in{'email'},"\n";
print MAIL "Cc: $sendCc\n";
print MAIL "Bcc: $sendBcc\n";
print MAIL "Subject: Request for Datatel Account";
print MAIL "\n";
print MAIL "\n";
print MAIL " ","Request for Datatel Account";
print MAIL "\n";
print MAIL "\n";
print MAIL "Date first started working : :",$in{'Date'};
print MAIL "\n";
print MAIL "\n";
print MAIL "Datatel ID : ", $in{'id'};
print MAIL "\n";
print MAIL "\n";
print MAIL "NAME: ",$in{'fname'}," ",$in{'mname'}," ",$in{'lname'};
print MAIL "\n";
print MAIL "\n";
print MAIL "Office Phone Number:" ,$in{'phone'};
print MAIL "\n";
print MAIL "\n";
print MAIL "Job Title :" ,$in{'job_title'};
print MAIL "\n";
print MAIL "\n";
if ( $in{'status'} eq "faculty") {
print MAIL "Department : ",$in{'dept'};
print MAIL "\n";
}
print MAIL "\n";
if ( $in{'cemail'} eq "Yes") {
print MAIL "User's E-Mail Address : ",$in{'email2'};
print MAIL "\n";
}
print MAIL "\n";
if ( $in{'replacing'} eq "Yes") {
print MAIL "Who are you replacing : ",$in{'whom'};
print MAIL "\n";
}
print MAIL "\n";
print MAIL "CUC Campus : ",$in{'center'};
print MAIL " ", $acid};
print MAIL "\n";
print MAIL "\n";
print MAIL "CUC Printers : ",$in{'printer'};
print MAIL "\n";
print MAIL "\n";
print MAIL "Name of Requestor : ",$in{'requestor'};
print MAIL "\n";
print MAIL "\n";
print MAIL "Requestor's E-Mail : ",$in{'email'};
print MAIL "\n";
print MAIL "\n";
print MAIL "Enrollment : ",$in{'enrollment'};
print MAIL "\n";
print MAIL "\n";
print MAIL "Will this staff be advising students? : ",$in{'adv'};
print MAIL "\n";
print MAIL "\n";
print MAIL "Grade Access : ",$in{'grade'};
print MAIL "\n";
print MAIL "\n";
print MAIL "Business : ",$in{'business'};
print MAIL "\n";
print MAIL "Refund : ",$in{'xrfd'};
print MAIL "\n";
print MAIL "\n";
print MAIL "Financial Aid : ",$in{'aid'};
print MAIL "\n";
print MAIL "\n";
print MAIL "Payroll : ",$in{'payroll'};
print MAIL "\n";
print MAIL "\n";
print MAIL "\n";
print MAIL " ", "THIS IS FOR OFFICE ADMINISTRATIVE USE ONLY";
print MAIL "\n";
print MAIL "\n";
print MAIL "[ ] UT SOD Created ","[ ] CF.EXCLUDE (SOD)"," [ ] CORE.EXCLUDE (SOD)"," [ ] UT.EXCLUDE (SOD)";
print MAIL "\n";
print MAIL "[ ] ST SVM Created"," [ ] NAE Created Correctly "," [ ] SVM Privacy EPSW";
print MAIL "\n";
print MAIL "[ ] Input to User Excel Sheet"," [ ] Input into Training Excel Sheet";
print MAIL "\n";
print MAIL "\n";
print MAIL " Test ID issued___________________";
print MAIL "\n";
print MAIL " Test Password____________________";
print MAIL "\n";
print MAIL " Date issued______________________";
print MAIL "\n";
print MAIL " [ ] Training complete ";
print MAIL "\n";
print MAIL "\n";
print MAIL " Username_________________________";
print MAIL "\n";
print MAIL "Password__________________________";
print MAIL "\n";
print MAIL "\n";
print MAIL "Employee contact Date___________";
close MAIL;
#End E-Mailing Information
#Start of 2nd E-Mailing Information
$mailprog ="/usr/lib/sendmail";
$sendto = "baxleyt\@chapman.edu,bondad\@chapman.edu";
$sendCc = $in{'email'};
$subject = "Intro to Datatel Training";
open(MAIL, "|$mailprog -t") || die "Can't open $mailprog!";
print MAIL "To: $sendto\n";
print MAIL "From: ",$in{'email'},"\n";
print MAIL "Cc: $sendCc\n";
print MAIL "Bcc: $sendBcc\n";
print MAIL "Subject: Intro to Datatel Training";
print MAIL "\n";
print MAIL "\n";
print MAIL " ","Intro to Datatel Training";
print MAIL "\n";
print MAIL "\n";
print MAIL "\n";
print MAIL "Dear"," ", $in{'requestor'},",";
print MAIL "\n";
print MAIL "\n";
print MAIL "We just received a Datatel Request for", " ",$in{'fname'}, " ",$in{'lname'},".";
print MAIL "\n";
print MAIL "Prior to gaining access to Datatel,"," ",$in{'fname'}, " ","must complete the online Introduction to Datatel Training Module.";
print MAIL "\n";
print MAIL "\n";
print MAIL $in{'fname'}," ", "can access the training module at: http://www1.chapman.edu/datatel/training/intro/ ";
print MAIL "\n";
print MAIL "\n";
print MAIL "\n";
print MAIL "Feel free to contact us with any questions regarding this training.";
print MAIL "\n";
print MAIL "\n";
print MAIL "Datatel Support", "\n";
print MAIL "Chapman University College", "\n";
print MAIL "\n";
print MAIL "Beverly Bondad (714) 744-7809","\n";
print MAIL "Terry Baxley (714) 744-7872","\n";
#End of 2nd E-Mailing Information
# Start of Accepted HTML
print "Account Request Response \n";
print "\n";
print "";
print "
Your Datatel Account Request has been accepted.
Would you like to request another account?
";
#End of Accepted HTML