Fixed a slight problem involving the script not searching for anything.
This commit is contained in:
parent
cf23cb2f0e
commit
9dbdedea0e
@ -14,9 +14,9 @@ print "Content-type: text/html\n\n";
|
||||
$in = $ENV{'QUERY_STRING'};
|
||||
|
||||
@pairs = split(/[&=]/,$in);
|
||||
%fields = @pairs;
|
||||
chomp(%fields);
|
||||
$webroot = "../../..";
|
||||
%field = @pairs;
|
||||
chomp(%field);
|
||||
$webroot = "..";
|
||||
|
||||
print <<END;
|
||||
|
||||
@ -76,7 +76,7 @@ foreach $item (@items){
|
||||
print "<br><br><br>\n";
|
||||
|
||||
#display the search form
|
||||
if($fields{'do'} eq "home" || $fields{'do'} eq ""){
|
||||
if($field{'do'} eq "home" || $field{'do'} eq ""){
|
||||
|
||||
#isbn,title,authors,year,edition,publisher
|
||||
|
||||
@ -116,7 +116,7 @@ END
|
||||
}
|
||||
|
||||
#query the database
|
||||
if($fields{'do'} eq "query"){
|
||||
if($field{'do'} eq "query"){
|
||||
|
||||
print "<h3>Search Results</h3>";
|
||||
|
||||
@ -131,15 +131,15 @@ if($fields{'do'} eq "query"){
|
||||
$orterm = undef;
|
||||
@results;
|
||||
@oresults;
|
||||
$title = $fields{'title'};
|
||||
$title = $field{'title'};
|
||||
$title =~ s/[';:"]/ /g;
|
||||
$publisher = $fields{'publisher'};
|
||||
$publisher = $field{'publisher'};
|
||||
$publisher =~ s/[';:"]/ /g;
|
||||
$edition = $fields{'edition'};
|
||||
$edition = $field{'edition'};
|
||||
$edition =~ s/[';:"]/ /g;
|
||||
$year = $fields{'year'};
|
||||
$year = $field{'year'};
|
||||
$year =~ s/[';:"]/ /g;
|
||||
$isbn = $fields{'isbn'};
|
||||
$isbn = $field{'isbn'};
|
||||
$isbn =~ s/[';:"]/ /g;
|
||||
|
||||
if($title){
|
||||
|
Loading…
x
Reference in New Issue
Block a user