#!/usr/bin/perl
use Cwd;
use LWP::Simple qw(mirror getstore is_error status_message);
#use warnings;
#perl2exe_noopt "Opcode.pm"
#perl2exe_exclude "ExtUtils/MM_MacOS.pm"
#perl2exe_exclude "VMS/Filespec.pm"
#perl2exe_exclude "vmsish.pm"
#perl2exe_exclude "Mac/MoreFiles.pm"
#perl2exe_exclude "Digest/Perl/MD5.pm"
#perl2exe_exclude "Apache2/RequestRec.pm"
#perl2exe_exclude "Apache2/RequestIO.pm"
#perl2exe_exclude "Apache2/RequestUtil.pm"
#perl2exe_exclude "APR/Pool.pm"
#perl2exe_exclude "ModPerl/Util.pm"
#perl2exe_exclude "Apache2/Response.pm"
#perl2exe_exclude "Apache2/Response.pm"
#perl2exe_exclude "Apache2/RequestRec.pm"
#perl2exe_exclude "Apache2/RequestUtil.pm"
#perl2exe_exclude "Apache2/RequestIO.pm"
#perl2exe_exclude "APR/Pool.pm"
#perl2exe_exclude "Apache2/RequestUtil.pm"
#perl2exe_exclude "APR/Table.pm"
#perl2exe_include "CGI/Session/Driver/file.pm"
#perl2exe_include "CGI/Session/Serialize/default.pm"
#perl2exe_include "bytes.pm"
#perl2exe_include "CGI/Session/ID/md5.pm"
#perl2exe_include "ExtUtils/MM_Win32.pm"
#perl2exe_exclude "Compress/Bzip2.pm"
#perl2exe_include "HTTP/Message.pm"
#Net::SMTP related:
#perl2exe_exclude "Convert/EBCDIC.pm"
#perl2exe_exclude "Mac/InternetConfig.pm"
#perl2exe_exclude "Authen/SASL.pm"
#perl2exe_exclude "Carp/Heavy.pm"
use CGI::Carp qw(fatalsToBrowser);
use ExtUtils::Installed;
############################################
# Library Search 1.1.0 release 1
#
# (c) copyright 1998-2000 NCP Technologies,
# At Connex Global Communication Systems Inc,
# Jaywil Software Dev. Inc. 1-800-815-8370
#
# Derived from Library Search 1.0.1 release 1, 7-Feb-2002
# by CCj/Clearline.
#
#############################################################################
# Programming changes
# Oct.2008 - Emailing requests changed from using sendmail (unix) or
# smblat.exe (Windows) to using Perl Net::SMTP module
#############################################################################
#############################################################################
# Start of Main Program Section
# *NOTE* no changes are required in this file whatsoever.. view lib.conf
#############################################################################
# &PrintHeader1; # Print basic header info > WWW
# check to see if CGI::Session is installed for password support
my $UseSession = undef;
my $installed = ExtUtils::Installed->new();
# print "and ...";
if (grep(/CGI::Session/,$installed->modules() )) {
$UseSession = true;
# print "found it.";
}
# # Find all the installed packages
# print("Finding all installed modules...\n");
# my $installed2 = ExtUtils::Installed->new();
# foreach my $module ($installed2->modules) {
# my $version = $installed2->version($module) || "???";
# print("Found module $module Version $version\n");
# }
#
$libConf = "lib.conf";
$Jaywil_support_email = 'support@resoucemate.com';
# Find the configuration file.
# Original file path check for Unix-type servers & some NT servers too
($libConf = $ENV{PATH_TRANSLATED}) =~ s/[^\\]*$/lib.conf/ unless ( -e $libConf);
# Jan 20/2004 M.Whiting. Add a separate check to find lib.conf for NT servers, as
# they just don't seem to find it with the Unix check. The check has never failed on
# Unix, so we've left it alone for them.
$FileCheckCount = 0;
unless (-e $libConf) {
&FindConf;
}
&GetQueryData;
&PrintHeader1; # Print basic header info > WWW
###### $virtual and $logoImage are used to describe web content on the forms
###### generated by this script. They may be overridden by the config
###### variables VIRTUAL and LOGO_IMAGE respectively. Note the trailing
###### slash for virtual.
$virtual = "http://www.google.com/search/";
$logoImage = "logo.gif";
$script = "libsearch.cgi";
$dirsep = "/";
###### $countpath defines the path to your count directory. Reads the value of
###### "pwd" to assign the correct count -- each new library created will have
###### a unique value, and this script will automatically generate a count data
###### file if it doesn't exist. Define COUNTPATH in the config file to
###### override this default. Note that on UNIX this may be a relative
###### pathname. On NT it must be a fully qualified pathname.
$countpath = "tmp";
###### These may be overriden by the ORG_NAME, and ORG_URL config
###### vars respectively.
$orgName = "Our Favourite Org, Inc.";
$orgUrl = "http://www.google.com/";
###### Defaults for the search field labels, overridden by the SEARCH_FIELD_LABEL1,
###### SEARCH_FIELD_LABEL2, etc, values in lib.conf.
$SearchFieldLabel1 = "Title";
$SearchFieldLabel2 = "Author";
$SearchFieldLabel3 = "Category";
$SearchFieldLabel4 = "Subject";
$SearchFieldLabel5 = "Dewey";
$SearchFieldLabel6 = "ISBN";
$SearchFieldLabel7 = "Publisher";
###### Seven more search fields added. Nov.20/2006. M.Whiting
###### ($SearchFieldDisplayed and $SearchFieldSearchable defaults not declared here,
###### code is written to effectively default to Y for both)
$SearchFieldLabel8 = "User1";
$SearchFieldLabel9 = "User2";
$SearchFieldLabel10 = "User3";
$SearchFieldLabel11 = "User4";
$SearchFieldLabel12 = "User5";
$SearchFieldLabel13 = "User6";
$SearchFieldLabel14 = "User7";
###### Default for whether or not to show the 'request a book' area on the search results page.
$AllowRequests = "Y";
###### New variables, may be overridden by conf.var. April 2007. M.Whiting
$ConfigIn{'SCREEN_BGCOLOR'} = 'White';
$ConfigIn{'GENERAL_FONT_TYPE'} = 'Verdana';
$ConfigIn{'GENERAL_FONT_SIZE'} = '10pt';
$ConfigIn{'GENERAL_FONT_COLOR'} = 'Black';
$ConfigIn{'GENERAL_FONT_COLOR'} = 'Black';
$ConfigIn{'SHOW_ABOUT_LINK'} = 'Y';
$ConfigIn{'SHOW_LIST_LIBRARIES_LINK'} = 'Y';
$ConfigIn{'SHOW_CONTACT_ADMIN_LINK'} = 'Y';
$ConfigIn{'SHOW_SEARCH_LINK'} = 'Y';
$ConfigIn{'SHOW_VISITOR_NUMBER'} = 'Y';
$ConfigIn{'SHOW_TOTAL_LIBRARY_DATABASES'} = 'Y';
$ConfigIn{'TEXT_ABOUT_LINK'} = 'About';
$ConfigIn{'TEXT_LIST_LIBRARIES_LINK'} = 'List Libraries';
$ConfigIn{'TEXT_CONTACT_ADMIN_LINK'} = 'Contact Admin';
$ConfigIn{'TEXT_SEARCH_LINK'} = 'Search';
$ConfigIn{'TEXT_VISITOR_NUMBER'} = 'Visitor Number:';
$ConfigIn{'TEXT_TOTAL_LIBRARY_DATABASES'} = 'Total Library Databases:';
$ConfigIn{'SHOW_PASSWORD_REQUIRED'} = 'Y';
$ConfigIn{'TEXT_PASSWORD_REQUIRED'} = 'Password Required';
$ConfigIn{'TEXT_NO_PASSWORD_REQUIRED'} = 'No Password';
$ConfigIn{'PASSWORD_TIMEOUT'} = '10m';
$ConfigIn{'SHOW_NUM_DATABASE_ITEMS'} = 'Y';
$ConfigIn{'RESULTSPAGE_TEXT_PREV_BUTTON'} = 'Prev';
$ConfigIn{'RESULTSPAGE_TEXT_NEXT_BUTTON'} = 'Next';
$ConfigIn{'SEARCHPAGE_SHOW_SEARCH_LIBRARY'} = 'Y';
$ConfigIn{'SEARCHPAGE_TEXT_SEARCH'} = 'Search';
$ConfigIn{'SEARCHPAGE_TEXT_LIBRARY_NAME'} = ''; #leave blank for dynamic name generation
$ConfigIn{'SEARCHPAGE_SHOW_ENTER_FIELDS'} = 'Y';
$ConfigIn{'SEARCHPAGE_TEXT_ENTER_FIELDS'} = 'Enter field(s) to search, select the checkbox for an exact phrase match';
$ConfigIn{'SEARCHPAGE_SHOW_EXACT_PHRASE_CHECKBOX'} = 'Y';
$ConfigIn{'SEARCHPAGE_TEXT_SEARCH_BUTTON'} = 'Search';
$ConfigIn{'SEARCHPAGE_TEXT_CLEAR_BUTTON'} = 'Clear';
$ConfigIn{'RESULTSPAGE_SHOW_LIBRARY_NAME'} = 'Y';
$ConfigIn{'RESULTSPAGE_TEXT_LIBRARY_NAME'} = ''; #leave blank for dynamic name generation
$ConfigIn{'RESULTSPAGE_SHOW_YOUR_SEARCH_FOUND'} = 'Y';
$ConfigIn{'RESULTSPAGE_TEXT_YOUR_SEARCH_FOUND'} = 'Your Search Found';
$ConfigIn{'RESULTSPAGE_TEXT_MATCHES'} = 'Match(es)';
$ConfigIn{'RESULTSPAGE_TEXT_REQUEST_NAME'} = 'Name:';
$ConfigIn{'RESULTSPAGE_TEXT_REQUEST_EMAIL'} = 'Phone Number/Email Address:';
$ConfigIn{'RESULTSPAGE_TEXT_REQUEST_COMMENTS'} = 'Comments:';
$ConfigIn{'RESULTSPAGE_TEXT_REQUEST_BUTTON'} = 'Request To Borrow Checked Item(s)';
$ConfigIn{'RESULTSPAGE_TEXT_RESULT_#'} = 'Result #';
$ConfigIn{'RESULTSPAGE_SHOW_RESULT_#'} = 'Y';
$ConfigIn{'RESULTSPAGE_TEXT_FROM'} = ', from';
$ConfigIn{'RESULTSPAGE_TEXT_DATABASE'} = '';
$ConfigIn{'REQUESTPAGE_TEXT_REQUESTING'} = 'Requesting Item(s):';
$ConfigIn{'REQUESTPAGE_TEXT_THANKYOU'} = 'Your Items Have Been Requested, Thank You';
$ConfigIn{'RESULTSPAGE_TEXT_RETURN'} = "(Please press your browser's \'Back\' button to return to Search Results)";
$ConfigIn{'EMAIL_TEXT_BORROW'} = 'Borrow Request';
$ConfigIn{'EMAIL_TEXT_TITLE1'} = '******************************************************';
$ConfigIn{'EMAIL_TEXT_TITLE2'} = ' Borrow Request Form';
$ConfigIn{'EMAIL_TEXT_TITLE3'} = ' from Library Search';
$ConfigIn{'EMAIL_TEXT_TITLE4'} = '******************************************************';
$ConfigIn{'EMAIL_TEXT_LIBRARY'} = 'Library : ';
$ConfigIn{'EMAIL_TEXT_NAME'} = 'Name Of Requestor: ';
$ConfigIn{'EMAIL_TEXT_EMAIL'} = 'Phone/Email : ';
$ConfigIn{'EMAIL_TEXT_DATE'} = 'Date/Time : ';
$ConfigIn{'EMAIL_TEXT_FOOTER1'} = '******************************************************';
$ConfigIn{'EMAIL_TEXT_COMMENTS'} = 'COMMENTS: ';
$ConfigIn{'EMAIL_TEXT_REQUESTED_ITEM'} = '***************** Requested Item *****************';
$ConfigIn{'EMAIL_FIELD_DETAIL_LINE1'} = 1;
$ConfigIn{'EMAIL_FIELD_DETAIL_LINE2'} = 2;
$ConfigIn{'EMAIL_FIELD_DETAIL_LINE3'} = 5;
$ConfigIn{'EMAIL_FIELD_DETAIL_LINE4'} = 6;
$ConfigIn{'EMAIL_FIELD_DETAIL_LINE5'} = 0;
$ConfigIn{'EMAIL_FIELD_DETAIL_LINE6'} = 0;
$ConfigIn{'EMAIL_FIELD_DETAIL_LINE7'} = 0;
$ConfigIn{'EMAIL_FIELD_DETAIL_LINE8'} = 0;
$ConfigIn{'EMAIL_FIELD_DETAIL_LINE9'} = 0;
$ConfigIn{'EMAIL_FIELD_DETAIL_LINE10'} = 0;
$ConfigIn{'EMAIL_FIELD_DETAIL_LINE11'} = 0;
$ConfigIn{'EMAIL_FIELD_DETAIL_LINE12'} = 0;
$ConfigIn{'EMAIL_FIELD_DETAIL_LINE13'} = 0;
$ConfigIn{'EMAIL_FIELD_DETAIL_LINE14'} = 0;
#
# Set up name arrays for weekdays and month names.
#
@weekdays=( "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun");
@months=( "Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec");
#
# Translate timezone-localized 'time' into a "struct tm" array.
#
($sec, $min, $hour, $mday, $month, $year, $wday, $yday, $ds) = localtime(time);
if ($sec < 10) {$sec = ("0$sec");} # Put a zero in front of the seconds, if needed to make 2 digits
if ($min < 10) {$min = ("0$min");} # Same with minutes
#
# Save the year for use in the copyright message.
#
$cpr_year=1900+$year;
#
# Generate a datestring for use when generating mail.
#
$mailheader_date="$weekdays[$wday], $mday $months[$month] $cpr_year " .
"$hour:$min:$sec";
&ReadConf;
&PrintHeaderLinks; # Print The Commands > WWW
&PerformAction; # perform the specified action.
&PrintFooter; # Print The Footer Information > WWW
exit;
#############################################################################
# Sub Procedures ############################################################
#############################################################################
############################################
# PrintHeader
# Purpose: To print the initial html code
# at the top of the page.
############################################
sub PrintHeader1 {
print "Content-type: text/html\n\n";
print <Library Search
NCP
}
sub PrintHeader2 {
print <
NCP
print " \n";
print "
\n";
print "
\n";
}
############################################
# PrintHeaderLinks
# Purpose: To Print the available commands
# to the screen.
############################################
sub PrintHeaderLinks {
print "\n";
print " ";
if ($ConfigIn{'SHOW_ABOUT_LINK'} =~ /^y/i) {print "[$ConfigIn{'TEXT_ABOUT_LINK'}] ";}
if ($ConfigIn{'SHOW_LIST_LIBRARIES_LINK'} =~ /^y/i) {print "[$ConfigIn{'TEXT_LIST_LIBRARIES_LINK'}] ";}
#mail link is in unicode so that isn't as easy for spam bots to id (hopefully), email in variable is also
if ($ConfigIn{'SHOW_CONTACT_ADMIN_LINK'} =~ /^y/i) {print "[$ConfigIn{'TEXT_CONTACT_ADMIN_LINK'}] ";}
if ($ConfigIn{'SHOW_SEARCH_LINK'} =~ /^y/i) {
if ($in{'dbNum'} ne '') {
print "[$ConfigIn{'TEXT_SEARCH_LINK'}] ";
}
}
print "\n \n";
print "\n";
}
############################################
# PerformAction
# Purpose: To perform the action requested
#
############################################
sub PerformAction {
if ($in{'action'} < 2 or $in{'action'} > 5) { &ListDatabases; return; }
if ($in{'dbNum'} eq '' or $in{'dbNum'} < 1 or $in{'dbNum'} > $NumDbLineNames) { &ListDatabases; return; }
my $LoggedIn = undef;
if (($databasedata[($in{'dbNum'}*10)+2] eq '*') or ($pwd eq $databasedata[($in{'dbNum'}*10)+2])) {
$LoggedIn = 1;
}
unless ($LoggedIn) {
if (defined $in{'CGISESSID'} or defined $in{'pwd'}) {
print "
Invalid Password";
}
&PrintLoginForm;
} else {
# Get the number of fields in database. Newer db's have 21 fields instead of 14.
# The extra search boxes are only displayed if fields are present on file.
foreach $LibName (@{$DbLineNames[$in{'dbNum'}]}) {
open(SEARCH, $LibDef{$LibName}[2]);
$NumDbFields = scalar(split(/\t/, ));
close(SEARCH);
#print " Lib Name:$LibName, Lib Filename:$LibDef{$LibName}[2] - $NumDbFields ";
#print " $NumDbFields";
if ($NumDbFields != 14 && $NumDbFields != 21) {
print "
Unrecognized number of data fields in database file: $NumDbFields";
print " (Database filename: $LibDef{$LibName}[2])";
print "
Please contact Jaywil Software at support\@resourcemate.com for an update or to resolve this problem.
";
&PrintFooter;
exit;
}
$LibDef{$LibName}[3] = $NumDbFields; #Assigned here instead of in ReadConf so user can search db's that have correct #'s of fields
$MaxNumDbFields = $NumDbFields if $NumDbFields > $MaxNumDbFields;
}
if ($in{'action'} eq 3) { &SearchForm; }
if ($in{'action'} eq 4) { &SearchResults; }
if ($in{'action'} eq 5) {
if (defined $in{'BtnPrev'}) {
# $carryon=1;
&SearchResults;
} elsif (defined $in{'BtnNext'}) {
# $carryon=1;
&SearchResults;
} elsif (defined ($in{'BtnRequest'})) {
&makeRequest;
} else {
# Redisplay search results, if any other button is pressed.
# $carryon=1;
&SearchResults;
}
}
}
}
############################################
# SearchForm
# Purpose: To Get Database Searching info
# from the viewer.
############################################
sub SearchForm {
if ($ConfigIn{'SHOW_VISITOR_NUMBER'} =~ /^y/i) {
print "
";
}
if ($NumBooksFound eq 0) { &PrintFooter; exit(0); }
if ($FirstNumDisplayed > $NumBooksFound) {
$FirstNumDisplayed = $NumBooksFound;
}
if (($FirstNumDisplayed) <= 0) { $FirstNumDisplayed = 1; }
$LastNumDisplayed = $FirstNumDisplayed + 9;
if ($LastNumDisplayed > $NumBooksFound) {
$LastNumDisplayed = $NumBooksFound;
}
print "$FirstNumDisplayed-$LastNumDisplayed of $NumBooksFound ";
print "" . chr(13);
}
############################################
# SearchDatabase
# Purpose: Does the actual search
#
############################################
sub SearchDatabase {
# Transfer all $Fieldxx into a new field so that we can manipulate the new field without
# changing the original details, which are needed intact to pass to the next screen.
# Bail if all the match strings are empty.
$ValidFieldFound = "";
my $i=0;
foreach ($in{'Field1'}, $in{'Field2'}, $in{'Field3'}, $in{'Field4'},
$in{'Field5'}, $in{'Field6'}, $in{'Field7'}, $in{'Field8'},
$in{'Field9'}, $in{'Field10'},$in{'Field11'},$in{'Field12'},
$in{'Field13'},$in{'Field14'}) {
$_ =~ s/(^\s+|\s+$)//; # Strip any leading & trailing whitespace from each field
$SearchTerm[++$i] = $_;
if ($SearchTerm[$i] ne '') {
$ValidFieldFound = "Y";
$SearchTerm[$i] =~ s/([\Q*[]+{}()^$'"@.\E])/\\$1/g; # Substitute in escape backslash for characters regex sees as metacharacters.
}
}
unless ($ValidFieldFound) {
print "
No search parameters given!
";
&PrintFooter;
exit;
}
# Set the results counter and an initial empty slot of
# the @SearchResults array.
#
$NumBooksFound=0;
push(@SearchResults, "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "");
# Open the database file and read it line by line. Try to match every
# criteria against each line. If all criteria match a line, push() that
# line into the @SearchResults array.
#
foreach $LibName (@{$DbLineNames[$in{'dbNum'}]}) {
open (SEARCH, $LibDef{$LibName}[2]);
while () {
@BookDataFields = split(/\t/, $_);
foreach (@BookDataFields) {s/^\"//; s/\"$//;}; #Remove doublequotes from db fields, they screw up checking for whitespace at start/end of field
#Start searching
next if ($SearchTerm[1] ne '' #By default, the Title search field
&& $BookDataFields[0] !~ m/(\A|$in{chkExactMatch1})$SearchTerm[1](\Z|$in{chkExactMatch1})/i
&& $BookDataFields[1] !~ m/(\A|$in{chkExactMatch1})$SearchTerm[1](\Z|$in{chkExactMatch1})/i
&& $BookDataFields[2] !~ m/(\A|$in{chkExactMatch1})$SearchTerm[1](\Z|$in{chkExactMatch1})/i);
next if ($SearchTerm[2] ne '' #By default, the Author search field
&& $BookDataFields[3] !~ m/(\A|$in{chkExactMatch2})$SearchTerm[2](\Z|$in{chkExactMatch2})/i
&& $BookDataFields[4] !~ m/(\A|$in{chkExactMatch2})$SearchTerm[2](\Z|$in{chkExactMatch2})/i
&& $BookDataFields[5] !~ m/(\A|$in{chkExactMatch2})$SearchTerm[2](\Z|$in{chkExactMatch2})/i);
next if ($SearchTerm[3] ne '' && $BookDataFields[7] !~ m/(\A|$in{chkExactMatch3})$SearchTerm[3](\Z|$in{chkExactMatch3})/i); #By def, Category
next if ($SearchTerm[4] ne '' #By default, the Subject search field
&& $BookDataFields[10] !~ m/(\A|$in{chkExactMatch4})$SearchTerm[4](\Z|$in{chkExactMatch4})/i
&& $BookDataFields[11] !~ m/(\A|$in{chkExactMatch4})$SearchTerm[4](\Z|$in{chkExactMatch4})/i
&& $BookDataFields[12] !~ m/(\A|$in{chkExactMatch4})$SearchTerm[4](\Z|$in{chkExactMatch4})/i
&& $BookDataFields[13] !~ m/(\A|$in{chkExactMatch4})$SearchTerm[4](\Z|$in{chkExactMatch4})/i);
$in{chkExactMatch5} =~ s/.+/\\s/; #Dewey 'exact-match' filter only searches for whitespace, as periods are signicant in Dewey's.
next if ($SearchTerm[5] ne '' && $BookDataFields[8] !~ m/(\A|$in{chkExactMatch5})$SearchTerm[5](\Z|$in{chkExactMatch5})/i); #By def, Dewey
next if ($SearchTerm[6] ne '' && $BookDataFields[9] !~ m/(\A|$in{chkExactMatch6})$SearchTerm[6](\Z|$in{chkExactMatch6})/i); #By def, ISBN
next if ($SearchTerm[7] ne '' && $BookDataFields[6] !~ m/(\A|$in{chkExactMatch7})$SearchTerm[7](\Z|$in{chkExactMatch7})/i); #By def, Publisher
# Nov.20/2006. M.Whiting. Seven new fields added to the data file exported from RM.
# Check if new format before trying to do search.
if ($LibDef{$LibName}[3] > 14) {
next if ($SearchTerm[8] ne '' && $BookDataFields[14] !~ m/(\A|$in{chkExactMatch8})$SearchTerm[8](\Z|$in{chkExactMatch8})/i);
next if ($SearchTerm[9] ne '' && $BookDataFields[15] !~ m/(\A|$in{chkExactMatch9})$SearchTerm[9](\Z|$in{chkExactMatch9})/i);
next if ($SearchTerm[10] ne '' && $BookDataFields[16] !~ m/(\A|$in{chkExactMatch10})$SearchTerm[10](\Z|$in{chkExactMatch10})/i);
next if ($SearchTerm[11] ne '' && $BookDataFields[17] !~ m/(\A|$in{chkExactMatch11})$SearchTerm[11](\Z|$in{chkExactMatch11})/i);
next if ($SearchTerm[12] ne '' && $BookDataFields[18] !~ m/(\A|$in{chkExactMatch12})$SearchTerm[12](\Z|$in{chkExactMatch12})/i);
next if ($SearchTerm[13] ne '' && $BookDataFields[19] !~ m/(\A|$in{chkExactMatch13})$SearchTerm[13](\Z|$in{chkExactMatch13})/i);
next if ($SearchTerm[14] ne '' && $BookDataFields[20] !~ m/(\A|$in{chkExactMatch14})$SearchTerm[14](\Z|$in{chkExactMatch14})/i);
}
# If we get to this point we have a match.
$NumBooksFound++;
# Add the extra 7 slots for older libsearch databases.
if ($LibDef{$LibName}[3] == 14) {
push(@BookDataFields, "", "", "", "", "", "", "");
}
# Push library name into first of 22 slots allotted for this book result
push(@SearchResults, $LibDef{$LibName}[0]);
# Push @BookDataFields into the other 21 slots of the array
push(@SearchResults, @BookDataFields);
}
close(SEARCH);
}
}
############################################
# PrintFooter
# Purpose: To Print The footer info to the
# WWW
############################################
sub PrintFooter {
print "