|
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 common to all forms
&ReadParse(*input);
if ($input{'todo'} eq "QUIT") {
print "Location: http://www.westga.edu/~library/depts/systems/rls", "\n\n";
}
if ($input{'todo'} eq "Start Over") {
print "Location: http://www.westga.edu/~library/cgi-bin/demosrls.cgi", "\n\n";
}
if ($input{'done'} < 2) {
print "Location: http://www.westga.edu/~library/cgi-bin/demosrls.cgi", "\n\n";
}
# Seed todo state for multiple requests.
if ($input{'todo'} =~ "ILL (Article)") {
$FRILLAstate = "SELECTED";
} elsif ($input{'todo'} eq "ILL (Book)") {
$FRILLBstate = "SELECTED";
}
$email = "";
if ($input{'email'} =~ /^\w/) {
$email = $input{'email'};
}
$name = $input{'name'};
$id = $input{'id'};
$dept = $input{'dept'};
$date = `date`;
$todo = $input{'todo'};
# Read in variables specific to chosen option form
#Address values
$addl1 = $input{'addl1'};
$addl2 = $input{'addl2'};
$city = $input{'city'};
$state = $input{'state'};
$zip = $input{'zip'};
#Phone values
$dfona = $input{'dfona'};
$dfon = $input{'dfon'};
$nfona = $input{'nfona'};
$nfon = $input{'nfon'};
$ffona = $input{'ffona'};
$ffon = $input{'ffon'};
#Article Values
$deliv = $input{'deliv'};
$cua = $input{'cua'};
$atitle = $input{'atitle'};
$aauth = $input{'aauth'};
$ptitle = $input{'ptitle'};
$pvol = $input{'pvol'};
$pnum = $input{'pnum'};
$pdate = $input{'pdate'};
$ppg = $input{'ppage'};
#Source Values
$stitle = $input{'stitle'};
$sauth = $input{'sauth'};
$svol = $input{'svol'};
$snum = $input{'snum'};
$sdate = $input{'sdate'};
$spg = $input{'spage'};
#ILL Book Values
$edonly = $input{'edonly'};
$pub = $input{'pub'};
$pubplace = $input{'pubplace'};
#Book Purchase Values
$editn = $input{'editn'};
$vol = $input{'vol'};
$isbn = $input{'isbn'};
$price = $input{'price'};
$copies = $input{'copies'};
$lang = $input{'lang'};
#Periodical Purchase Values
$issn = $input{'issn'};
$freq = $input{'freq'};
#Reserve Materials Values
$libuse = $input{'libuse'};
$course = $input{'course'};
$quarter = $input{'quarter'};
$year = $input{'year'};
$remove = $input{'remove'};
$campadd = $input{'campadd'};
$campext = $input{'campext'};
#Something Else Values:
$subject = $input{'subject'};
#Comment form data
($htmlcomment = $input{'comment'}) =~ s/\n/\n
/g;
# add
's after carriage returns
# to multline input, since HTML does not
# preserve line breaks
($comment = $input{'comment'}) =~ s/^\s*\r\n//g;
# remove leading blank lines
# s is white space
# r is carriage return
# n is newline
# why it leaves inner blank lines
($htmlbfiles = $input{'comment'}) =~ s/\n/\n
/g;
# add
's after carriage returns
# to multline input, since HTML does not
# preserve line breaks
($bfiles = $input{'comment'}) =~ s/\n/\n/g;
if ($atitle =~ /^\w/) {
$emailsubject = $atitle;
} elsif ($comment =~ /^\w/) {
$emailsubject = $comment;
} else {
$emailsubject = "BLANK";
}
if ($input{'todo'} eq "ILL (Article)") {
$emailpresub = "IA";
} elsif ($input{'todo'} eq "ILL (Book)") {
$emailpresub = "IB";
} else {
$emailpresub = "SE";
}
if ($input{'todo'} =~ /ILL/) {
$tomail = "ill\@somewhere.edu";
} elsif ($input{'todo'} =~ /Purchase/) {
$tomail = "acq\@somewhere.edu";
} elsif ($input{'todo'} =~ /Something/) {
$tomail = "default\@somewhere.edu";
}
$formail = "acq\@somewhere.edu";
###########################################
#
# Guess at short email
if ($email =~ /^\s*$/) { $email = "" #error if blank or whitespace
} elsif ($email !~ /\@/) { $email .= "\@westga.edu" }; #guess domain if not give
# TEST VARIABLES
#if ($input{'todo'} =~ /ILL/) {
# $tomail = "chuff\@westga.edu";
# } elsif ($input{'todo'} =~ /Reserve/) {
# $tomail = "chuff\@westga.edu";
# } elsif ($input{'todo'} =~ /Document/) {
# $tomail = "chuff\@westga.edu";
# } elsif ($input{'todo'} =~ /Something/) {
# $tomail = "chuff\@westga.edu";
# }
$tomail = "chuff\@westga.edu";
$formail = "chuff\@westga.edu";
# END TEST VARIABLES
# Open format for emailed output of variables for Inter Library Loan
format MAILFRILLAPATRON =
From: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$tomail
To: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$email
Subject: @<: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$emailpresub $emailsubject
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$name
This copy of your recent request is for your records. Another copy has also been sent to @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$tomail
NOTE: STUDENT REQUEST
DATE OF REQUEST: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$date
======================================================================
@<<<<<<<<<< @<<<<
$id $dept
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$name
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$addl1
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$addl2
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<, @< @<<<<
$city $state $zip
======================================================================
Day: (@<<)@<<<<<<<<< Evening: (@<<)@<<<<<<<<<
$dfona,$dfon $nfona,$nfon
FAX: (@<<)@<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$ffona,$ffon $email
======================================================================
Delivery: @<<<<<<<<<<<<<< Cannot Use After: @<<<<<<<
$deliv $cua
======================================================================
ARTICLE INFORMATION
Formatted Citation / Comments:
@*
$comment
Title: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$atitle
Auth : @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$aauth
PTitl: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$ptitle
@<<<<<<<<<<<<<< Vol: @<<<<<<<, No: @<<<<<<< (@<<<<<<<<<<<<<<)
$pdate $pvol $pnum $ppg
======================================================================
SOURCE INFORMATION
Title: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$stitle
Auth : @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$sauth
@<<<<<<<<<<<<<< Vol: @<<<<<<<, No: @<<<<<<< (@<<<<<<<<<<<<<<<)
$sdate $svol $snum $spg
======================================================================
From: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$ENV{'REMOTE_ADDR'} $ENV{'REMOTE_HOST'}
======================================================================
.
format MAILFRILLA =
From: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$email
To: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$tomail
Subject: @<: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$emailpresub $emailsubject
NOTE: STUDENT REQUEST
DATE OF REQUEST: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$date
======================================================================
@<<<<<<<<<< @<<<<
$id $dept
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$name
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$addl1
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$addl2
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<, @< @<<<<
$city $state $zip
======================================================================
Day: (@<<)@<<<<<<<<< Evening: (@<<)@<<<<<<<<<
$dfona,$dfon $nfona,$nfon
FAX: (@<<)@<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$ffona,$ffon $email
======================================================================
Delivery: @<<<<<<<<<<<<<< Cannot Use After: @<<<<<<<
$deliv $cua
======================================================================
ARTICLE INFORMATION
Formatted Citation / Comments:
@*
$comment
Title: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$atitle
Auth : @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$aauth
PTitl: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$ptitle
@<<<<<<<<<<<<<< Vol: @<<<<<<<, No: @<<<<<<< (@<<<<<<<<<<<<<<)
$pdate $pvol $pnum $ppg
======================================================================
SOURCE INFORMATION
Title: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$stitle
Auth : @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$sauth
@<<<<<<<<<<<<<< Vol: @<<<<<<<, No: @<<<<<<< (@<<<<<<<<<<<<<<<)
$sdate $svol $snum $spg
======================================================================
LOCATION SYMBOLS:
ILL: REQ: RECD: RENEWAL:
OCLC: DUE: NEW DUE DATE:
OTHER: RETURNED: SHIP INS:
======================================================================
From: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$ENV{'REMOTE_ADDR'} $ENV{'REMOTE_HOST'}
======================================================================
.
format MAILFRILLBPATRON =
From: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$tomail
To: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$email
Subject: @<: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$emailpresub $emailsubject
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$name
This copy of your recent request is for your records. Another copy has also been sent to @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$tomail
NOTE: STUDENT REQUEST
DATE OF REQUEST: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$date
======================================================================
@<<<<<<<<<< @<<<<
$id $dept
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$name
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$addl1
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$addl2
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<, @< @<<<<
$city $state $zip
======================================================================
Day: (@<<)@<<<<<<<<< Evening: (@<<)@<<<<<<<<<
$dfona,$dfon $nfona,$nfon
FAX: (@<<)@<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$ffona,$ffon $email
======================================================================
Cannot Use After: @<<<<<<<
$cua
======================================================================
BOOK INFORMATION
Formatted Citation / Comments:
@*
$comment
Title: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$atitle
Auth : @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$aauth
@<<<<<<<<<<<<< Vol/Ed @<<<<<<< This Edition Only: @<
$pdate $pvol $edonly
Publisher: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<< City: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$pub $pubplace
======================================================================
SOURCE INFORMATION
Title: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$stitle
Auth : @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$sauth
@<<<<<<<<<<<<< Vol: @<<<<<<<, No: @<<<<<<< (@<<<<<<<<<<<<<<<)
$sdate $svol $snum $spg
======================================================================
From: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$ENV{'REMOTE_ADDR'} $ENV{'REMOTE_HOST'}
======================================================================
.
format MAILFRILLB =
From: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$email
To: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$tomail
Subject: @<: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$emailpresub $emailsubject
NOTE: STUDENT REQUEST
DATE OF REQUEST: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$date
======================================================================
@<<<<<<<<<< @<<<<
$id $dept
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$name
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$addl1
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$addl2
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<, @< @<<<<
$city $state $zip
======================================================================
Day: (@<<)@<<<<<<<<< Evening: (@<<)@<<<<<<<<<
$dfona,$dfon $nfona,$nfon
FAX: (@<<)@<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$ffona,$ffon $email
======================================================================
Cannot Use After: @<<<<<<<
$cua
======================================================================
BOOK INFORMATION
Formatted Citation / Comments:
@*
$comment
Title: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$atitle
Auth : @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$aauth
@<<<<<<<<<<<<< Vol/Ed @<<<<<<< This Edition Only: @<
$pdate $pvol $edonly
Publisher: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<< City: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$pub $pubplace
======================================================================
SOURCE INFORMATION
Title: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$stitle
Auth : @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$sauth
@<<<<<<<<<<<<< Vol: @<<<<<<<, No: @<<<<<<< (@<<<<<<<<<<<<<<<)
$sdate $svol $snum $spg
======================================================================
LOCATION SYMBOLS:
ILL: REQ: RECD: RENEWAL:
OCLC: DUE: NEW DUE DATE:
OTHER: RETURNED: SHIP INS:
PICKUP SIGNATURE:
======================================================================
From: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$ENV{'REMOTE_ADDR'} $ENV{'REMOTE_HOST'}
======================================================================
.
format MAILFRSE =
From: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$email
To: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$tomail
Subject: @<: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$emailpresub $emailsubject
NOTE: STUDENT REQUEST
DATE OF REQUEST: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$date
======================================================================
@<<<<<<<<<< @<<<<
$id $dept
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$name
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$addl1
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$addl2
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<, @< @<<<<
$city $state $zip
======================================================================
COMMENTS:
@*
$comment
======================================================================
Accessed From:
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$ENV{'REMOTE_ADDR'}
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$ENV{'REMOTE_HOST'}
======================================================================
.
#Write output
if ($input{'todo'} eq "ILL (Article)") {
open (MAILFRILLA,"|/usr/lib/sendmail -oi -t");
write (MAILFRILLA);
close (MAILFRILLA);
if ($email ne "") {
open (MAILFRILLAPATRON,"|/usr/lib/sendmail -oi -t");
write (MAILFRILLAPATRON);
close (MAILFRILLAPATRON);
}
} elsif ($input{'todo'} eq "ILL (Book)") {
open (MAILFRILLB,"|/usr/lib/sendmail -oi -t");
write (MAILFRILLB);
close (MAILFRILLB);
if ($email ne "") {
open (MAILFRILLBPATRON,"|/usr/lib/sendmail -oi -t");
write (MAILFRILLBPATRON);
close (MAILFRILLBPATRON);
}
} elsif ($input{'todo'} eq "Something Else") {
open (MAILFRSE,"|/usr/lib/sendmail -oi -t");
write (MAILFRSE);
close (MAILFRSE);
}
#print &PrintHeader;
print &LibHeader ("Ingram Library - $input{'todo'}");
print <Ingram Library - Student Request for $input{'todo'} - Submitted by $input{'name'}
The following request has been emailed to:
$tomail
$email
You may wish to print this page for your records.
DATE OF REQUEST: $date
ENDOFHEAD
if ($input{'todo'} eq "ILL (Article)") {
print <
Patron Information
$name - $dept
$addl1
$addl2
$city, $state $zip
Day: ($dfona)$dfon Evening: ($nfona)$nfon
FAX: ($ffona)$ffon Email: $email
Delivery: $deliv Cannot Use After: $cua
Article Information
Formatted Article / Comments:
$htmlcomment
Title: $atitle
Auth : $aauth
PTitl: $ptitle
$pdate Vol: $pvol, No: $pnum ($ppg)
Source Information
Title: $stitle
Auth : $sauth
$sdate Vol: $svol, No: $snum ($spg)
Accessed From:
$ENV{'REMOTE_ADDR'}
$ENV{'REMOTE_HOST'}
ENDOFILLA
} elsif ($input{'todo'} eq "ILL (Book)") {
print <
Patron Information
$name - $dept
$addl1
$addl2
$city, $state $zip
Day: ($dfona)$dfon Evening: ($nfona)$nfon
FAX: ($ffona)$ffon Email: $email
Delivery: $deliv Cannot Use After: $cua
Book Information
Formatted Article / Comments:
$htmlcomment
Title: $atitle
Auth : $aauth
$pdate Vol/Ed: $pvol This Edition Only: $edonly
Publisher: $pub City: $pubplace
Source Information
Title: $stitle
Auth : $sauth
$sdate Vol: $svol, No: $snum ($spg)
Accessed From:
$ENV{'REMOTE_ADDR'}
$ENV{'REMOTE_HOST'}
ENDOFILLB
} elsif ($input{'todo'} eq "Something Else") {
print <
Patron Information
$name - $dept
$addl1
$addl2
$city, $state $zip
Email: $email
Comments:
$htmlcomment
ENDOFSE
}
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/demosrls3.shtml Valid HTML? |