#! /usr/local/bin/perl # Filename: libill.pl # By: Eric Delozier # Date: 09/03/98 # Note: require "cgi-lib.pl"; MAIN: { # Read in all the variables set by the form &ReadParse(*input); # Print the header print &PrintHeader; print &HtmlTop ("Interlibrary Loan Request Report"); if ($input{'copyright'} eq "agree") { # Do some processing, and print some output ($text = $input{'text'}) =~ s/\n/\n
/g; # add
's after carriage returns # to multline input, since HTML does not # preserve line breaks if ($input{'type'} eq "Book") { $title=$input{'btitle'}; open (ITEM, ">library-cgi/item.txt"); print ITEM "Item Information:\n"; print ITEM " Call No.: $input{'lias'}\n"; print ITEM " Author: $input{'bauthor'}\n"; print ITEM " Title: $input{'btitle'}\n"; print ITEM " Publisher: $input{'publisher'}\n"; print ITEM " Date: $input{'byear'} (This edition only? $input{'edition'})\n"; print ITEM " Location: $input{'location'}\n"; print ITEM " Source: $input{'bsource'}\n"; print ITEM " The last day the material of use: $input{'lastday'}\n\n"; close (ITEM); } else { $title=$input{'atitle'}; open (ITEM, ">library-cgi/item.txt"); print ITEM "Item Information:\n"; print ITEM " Periodical: $input{'ptitle'}\n"; print ITEM " Citation: Vol: $input{'pvolume'} No.: $input{'pissue'} Pages: $input{'ppage'}\n"; print ITEM " Month/Year: $input{'pyear'}\n"; print ITEM " Art. Title: $input{'atitle'}\n"; print ITEM " Author: $input{'aauthor'}\n"; print ITEM " Source: $input{'psource'}\n"; print ITEM " The last day the material of use: $input{'lastday'}\n\n"; close (ITEM); } ; if ($input{'school'} eq "Schyulkill") { $eaddress="pxs\@psulias\.psu\.edu"; $deslib="Ciletti Library"; } else { $eaddress="rrs\@psulias\.psu\.edu\,\ gah\@psulias\.psu\.edu"; $deslib="Heindel Library"; } open (USER, ">library-cgi/user.txt"); print USER "Requester Information:\n"; print USER "ID: $input{'issn'} Name: $input{'username'}\n"; print USER "School: $input{'school'} Status: $input{'status'}\n"; print USER "Address: $input{'address'}\n"; print USER "Contact: $input{'phonew'} (work) $input{'phoneh'} (home) $input{'email'} (email)\n"; print USER "Have read copyright notice: Yes\n"; print USER "Accept ILL Charge: $input{'limit'}\n\n"; close(USER); print <$title has been mailed to $deslib Interlibrary Loan Office. You will also receive a copy of this request by email if you have provided us a proper email address in your request form. We will process your request in the order of receipt. If you have any further question, please contact us. ENDOFTEXT # Close the document cleanly. print &HtmlBot; if ($input{'email'}) { open (SENDMAIL, "| /usr/bin/mailx -t -n"); print SENDMAIL <) {print SENDMAIL $line}; close(USER); open (ITEM, "library-cgi/item.txt"); while ($line=) {print SENDMAIL $line}; close(ITEM); print SENDMAIL <) {print SENDMAIL $line}; close (USER); open (ITEM, "library-cgi/item.txt"); while ($line=) {print SENDMAIL $line}; close (ITEM); print SENDMAIL "Additional Comment:"; print SENDMAIL $input{'text'}; close (SENDMAIL); } else { print < Other than that, you are responsible to ensure all items provided are current and accurate. Only eligible and complete request will be processed. Thanks. ENDOFTEXT print &HtmlBot; } }