|
Library Home |
Catalog |
Databases |
GALILEO |
E-Journals |
Request Forms |
UWG Home |
#!/usr/local/bin/perl -- -*- C -*-
require "cgi-lib14.pl";
require "mycgi-lib";
MAIN:
{
# Read in all the variables set by the form.
&ReadParse(*input);
# Check for done variable to see if demosrls.cgi has been done
if ($input{'done'} < 1) {
print "Location: http://www.westga.edu/~library/cgi-bin/demosrls.cgi", "\n\n";
}
# Reset Error Message variables.
$ERRORMSG1 = "";
$ERRORMSG2 = "";
$ERRORMSG3 = "";
$ERRORMSG4 = "";
$ERRORMSG5 = "";
$ERRORMSG6 = "";
$ERRORMSG7 = "";
$ERRORFOUND = "N";
# Check for incorrect password.
#if ($input{'done'} < 2) {
#if ((substr($input{'password'},0,6) ne substr($input{'id'},0,6)) || ($input{'password'} !~ /[a-zA-Z0-9]/)) {
# $ERRORMSG1 = " -PASSWORD- ";
# $ERRORFOUND = "Y";
#}
#}
# Check for missing data.
if ($input{'dept'} eq "select here") {
$ERRORMSG2 = " -DEPARTMENT- ";
$ERRORFOUND = "Y";
}
if ($input{'name'} eq "") {
$ERRORMSG3 = " -NAME- ";
$ERRORFOUND = "Y";
}
if ($input{'id'} eq "") {
$ERRORMSG4 = " -ID NUMBER- ";
$ERRORFOUND = "Y";
}
#if ($input{'email'} eq "") {
if ($input{'email'} =~ /^\s*$/) {
if ($input{'noemail'} eq "") {
$ERRORMSG5 = " -EMAIL ADDRESS- ";
$ERRORMSG6 = "NOTE: Providing your email address will result in faster service.";
$ERRORMSG7 = "Check the \"I have no email\" box if you don't have an email address.";
$ERRORFOUND = "Y";
}
}
if ($input{'todo'} eq "HELP") {
&DoHelp;
} elsif ($input{'todo'} eq "Start Over") {
print "Location: http://www.westga.edu/~library/cgi-bin/demosrls.cgi", "\n\n";
} elsif ($input{'todo'} eq "QUIT") {
print "Location: http://www.westga.edu/~library/depts/systems/rls", "\n\n";
} elsif ($ERRORFOUND eq "Y") {
&DoOver;
} else {
&ProcessForm;
}
}
# Respond to request for help.
sub DoHelp {
# Print the header
# print &PrintHeader;
print &LibHeaderNC ("Ingram Library - $input{'todo'}");
print <
Ingram Library - Student Request for $input{'todo'} - Submitted by $input{'name'}
ENDOFTEXT
print &LibFooter;
exit;
}
# Respond to wrong password or missing data.
sub DoOver {
# Print the header
# print &PrintHeader;
print &LibHeaderNC ("Ingram Library - $input{'todo'}");
print <
Ingram Library - Student Request for $input{'todo'} - Submitted by $input{'name'}
ENDOFTEXT
print &LibFooter;
exit;
}
# Process accepted data and display selected request form.
sub ProcessForm {
# Set variable to check that form sequence is followed by user.
$input{'done'} = 2;
# Set address line
$dept = "$input{'dept'}";
$input{'campadd'} = $input{'addl1'};
# Seed deliv state for multiple requests.
if ($input{'deliv'} eq "mail") {
$mailstate = "CHECKED";
} elsif ($input{'deliv'} eq "hold") {
$holdstate = "CHECKED";
} elsif ($input{'deliv'} eq "") {
$holdstate = "CHECKED";
}
# Start printing of form.
# Print the header.
# print &PrintHeader;
print &LibHeaderNC ("Ingram Library - $input{'todo'}");
print <Ingram Library - Student Request for $input{'todo'} - Submitted by $input{'name'}
ENDOFTEXT
print &LibFooter;
}
| HOME | Catalog | Databases | GALILEO | Article Locator | Requests | Help |
|
Irvine Sullivan Ingram Library, UWG 1601 Maple St - Carrollton, GA 30118-2000 (none) - (none) (678)839-6350 - Information Recording |
Send Comments
| (none) <(none)> Last Modified: July 23, 2001 http://www.westga.edu/~library/depts/systems/rls/demosrls2.shtml Valid HTML? |