--- search/Search.cgi 2002/06/25 15:59:51 1.15 +++ search/Search.cgi 2002/07/17 18:37:39 1.24 @@ -393,7 +393,7 @@ } print ''; print ''; - print("\n
\n"); + print("\n\n"); # Send the header snippet file @@ -506,20 +506,20 @@ my $DISABLED; $DISABLED = ( %MenuBar && defined($MenuBar{'GetSearch'}) ) ? "DISABLED" : ""; - print(""); + print(""); if ( defined($main::RemoteUser) ) { $DISABLED = ( %MenuBar && defined($MenuBar{'ListSearchHistory'}) ) ? "DISABLED" : ""; - print""; + print""; $DISABLED = ( %MenuBar && defined($MenuBar{'ListSavedSearch'}) ) ? "DISABLED" : ""; - print""; + print""; $DISABLED = ( %MenuBar && defined($MenuBar{'ListFolder'}) ) ? "DISABLED" : ""; - print""; + print""; $DISABLED = ( %MenuBar && defined($MenuBar{'GetUserSettings'}) ) ? "DISABLED" : ""; - print""; + print""; } @@ -1509,9 +1509,17 @@ # Initialize the search string $SearchString = ""; + # tip gradje + if ( defined($main::FormData{'tip'}) ) { + my @t; + foreach my $tip ( split(/\0/, $main::FormData{'tip'}) ) { + push @t,"tip=$tip"; + } + $SearchString .= "(".join(" or ",@t).") and "; + } # Add the search terms - $SearchString .= defined($Content{'Any'}) ? ((($SearchString ne "") ? " AND " : "") . $Content{'Any'}) : ""; + $SearchString .= defined($Content{'Any'}) ? ((($SearchString ne "") ? " AND " : "") . nuke_accents($Content{'Any'}) ) : ""; # Add the generic field names @@ -1519,22 +1527,22 @@ my ($FieldName) = "FieldName" . $Value; my ($FieldContent) = "FieldContent" . $Value; + + if ( defined($Content{$FieldName}) && defined($Content{$FieldContent}) ) { - if ( defined($Content{$FieldName}) ) { - $SearchString .= defined($Content{$FieldContent}) ? - (($SearchString ne "") ? " AND " : "") . "$Content{$FieldName}=(" . $Content{$FieldContent} . ")" : ""; + if ($Content{$FieldName} eq "ISBN") { + # fix stupid problem with dashes in data + $Content{$FieldContent} .= "*"; + } + + $SearchString .= ($SearchString ne "") ? " AND " : ""; + $SearchString .= "$Content{$FieldName}=(" . nuke_accents($Content{$FieldContent}) . ")"; } } - # nuke accented chars - $SearchString =~ tr/ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁčáíóúĄąŽžĘęźČşÁÂĚŞŻżĂăđĐĎËďŇÍÎěŢŮÓÔŃńňŠšŔÚŕŰýÝţ´˝˛ˇ˘¸¨˙Řř/CueaauccleOoiZACELlooLlSsOUTtLcaiouAaZzEezCsAAESZzAadDDEdNIIeTUOoNnnSsRUrUyYt'-".'',"'Rr/; - # convert search string to lower case -> make search case insensitive - $SearchString =~ tr/A-Z/a-z/; - # Add the internal search terms - # Add the date restriction on the load time if ( defined($Content{'LastRunTime'}) && ($Content{'LastRunTime'} > 0) ) { $SearchString .= (($SearchString ne "") ? " AND " : "") . "time_t>=$Content{'LastRunTime'}"; @@ -1954,10 +1962,12 @@ # Print the title if ( $HTML ) { printf("Odabranima se smatraju svi rezultati ukoliko niste učinili nikakav dodatan odabir. | \n"); + print(" |
Odabrani su svi rezultati ukoliko niste učinili nikakav dodatan odabir. | \n"); if ( $ResultCount > 0 ) { @@ -2203,7 +2216,7 @@ if ( $main::ConfigurationData{'allow-relevance-feedback-searches'} eq "yes" ) { print(" |