--- search/Search.cgi 2002/06/24 17:53:11 1.10
+++ search/Search.cgi 2002/06/25 17:48:55 1.19
@@ -232,25 +232,6 @@
$main::QueryReportMimeType = "application/x-wais-report";
-
-# Hash of icon/images names that we use
-%main::ImageNames = (
- 'banner', 'banner.gif',
- 'collapse', 'collapse.gif',
- 'expand', 'expand.gif',
- 'inactive-search', 'inactive-search.gif',
- 'active-search', 'active-search.gif',
- 'inactive-search-history', 'inactive-search-history.gif',
- 'active-search-history', 'active-search-history.gif',
- 'inactive-saved-searches', 'inactive-saved-searches.gif',
- 'active-saved-searches', 'active-saved-searches.gif',
- 'inactive-document-folders','inactive-document-folders.gif',
- 'active-document-folders', 'active-document-folders.gif',
- 'inactive-settings', 'inactive-settings.gif',
- 'active-settings', 'active-settings.gif',
-);
-
-
# Array of mime type names, we use this to map
# mime types to mime type names (which are more readable)
%main::MimeTypeNames = (
@@ -411,6 +392,7 @@
print("$JavaScript\n");
}
print ' ';
+ print ' ';
print("\n
\n");
@@ -521,47 +503,23 @@
}
}
- if ( %MenuBar && defined($MenuBar{'GetSearch'}) ) {
- print(" ");
+ my $DISABLED;
-
- }
- else {
-
- print(" ");
-
-
-
- }
+ $DISABLED = ( %MenuBar && defined($MenuBar{'GetSearch'}) ) ? "DISABLED" : "";
+ print(" ");
if ( defined($main::RemoteUser) ) {
- if ( %MenuBar && defined($MenuBar{'ListSearchHistory'}) ) {
- print(" ");
- }
- else {
- print(" ");
- }
+ $DISABLED = ( %MenuBar && defined($MenuBar{'ListSearchHistory'}) ) ? "DISABLED" : "";
+ print" ";
- if ( %MenuBar && defined($MenuBar{'ListSavedSearch'}) ) {
- print(" ");
- }
- else {
- print(" ");
- }
+ $DISABLED = ( %MenuBar && defined($MenuBar{'ListSavedSearch'}) ) ? "DISABLED" : "";
+ print" ";
- if ( %MenuBar && defined($MenuBar{'ListFolder'}) ) {
- print(" ");
- }
- else {
- print(" ");
- }
-
- if ( %MenuBar && defined($MenuBar{'GetUserSettings'}) ) {
- print(" ");
- }
- else {
- print(" ");
- }
+ $DISABLED = ( %MenuBar && defined($MenuBar{'ListFolder'}) ) ? "DISABLED" : "";
+ print" ";
+
+ $DISABLED = ( %MenuBar && defined($MenuBar{'GetUserSettings'}) ) ? "DISABLED" : "";
+ print" ";
}
@@ -1561,20 +1519,26 @@
my ($FieldName) = "FieldName" . $Value;
my ($FieldContent) = "FieldContent" . $Value;
+
-
- if ( defined($Content{$FieldName}) ) {
- $SearchString .= defined($Content{$FieldContent}) ?
- (($SearchString ne "") ? " AND " : "") . "$Content{$FieldName}=(" . $Content{$FieldContent} . ")" : "";
+ if ( defined($Content{$FieldName}) && defined($Content{$FieldContent}) ) {
+ # nuke accented chars
+ $Content{$FieldContent} =~ tr/ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁčáíóúĄąŽžĘęźČşÁÂĚŞŻżĂăđĐĎËďŇÍÎěŢŮÓÔŃńňŠšŔÚŕŰýÝţ´˝˛ˇ˘¸¨˙Řř/CueaauccleOoiZACELlooLlSsOUTtLcaiouAaZzEezCsAAESZzAadDDEdNIIeTUOoNnnSsRUrUyYt'-".'',"'Rr/;
+ # convert search string to lower case -> make search case insensitive
+ $Content{$FieldContent} =~ tr/A-Z/a-z/;
+
+ if ($Content{$FieldName} eq "ISBN") {
+ # fix stupid problem with dashes in data
+ $Content{$FieldContent} .= "*";
+ }
+
+ $SearchString .= ($SearchString ne "") ? " AND " : "";
+ $SearchString .= "$Content{$FieldName}=(" . $Content{$FieldContent} . ")";
}
}
- # nuke accented chars
- $SearchString =~ tr/ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁčáíóúĄąŽžĘęźČşÁÂĚŞŻżĂăđĐĎËďŇÍÎěŢŮÓÔŃńňŠšŔÚŕŰýÝţ´˝˛ˇ˘¸¨˙Řř/CueaauccleOoiZACELlooLlSsOUTtLcaiouAaZzEezCsAAESZzAadDDEdNIIeTUOoNnnSsRUrUyYt'-".'',"'Rr/;
-
# 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'}";
@@ -2972,24 +2936,9 @@
# Make sure that we send the header
- $Value = ($ENV{'PATH_INFO'} eq "/GetExpandedSearch") ? "Pretraživanje s više kriterija" : "Jednostavno pretraživanje";
- my $JavaScript = '
- ';
+ $Value = ($ENV{'PATH_INFO'} eq "/GetExpandedSearch") ? "Složeno pretraživanje" : "Jednostavno pretraživanje";
- &vSendHTMLHeader($Value, $JavaScript);
+ &vSendHTMLHeader($Value, $main::JavaScript_SetChecked);
undef(%Value);
$Value{'GetSearch'} = "GetSearch";
@@ -3028,11 +2977,11 @@
if ( $ENV{'PATH_INFO'} eq "/GetExpandedSearch" ) {
print(" \n");
- print(" Kliknite na trokutić da biste suzili formu.\n");
+ print(" Jednostavo pretraživanje (kliknite na trokutić)\n");
}
else {
print(" \n");
- print(" Kliknite na trokutić da biste proširili formu.\n");
+ print(" Složeno pretraživanje (kliknite na trokutić)\n");
}
print("\n");
@@ -3060,11 +3009,13 @@
for (my $field=1; $field<= $nr_fields; $field++) {
- print("");
+ print " ";
if ($field == 1 ) {
- print ("Pretraži u određenom polju:");
+ print "";
+ print "Pretraži u odabranom polju:";
+ print " ";
}
- print ("");
+ print (" ");
print ("");
for (my $i=0; $i<=$#SearchFieldNames; $i++) {
@@ -3082,7 +3033,7 @@
if (defined($main::FormData{"FieldContent${field}"})) {
$Value = "VALUE='".$main::FormData{"FieldContent${field}"}."'";
}
- print(" \n");
+ print(" \n");
}
@@ -3104,13 +3055,8 @@
# Database selection
if ( %main::DatabaseDescriptions ) {
- print(" Odaberite bazu koju želite pretraživati:
-
- Označi
- sve ,
- niti jednu .
-
-
+ print(" Odaberite knjižnicu čiji fond želite pretraživati:
+
");
# Parse out the database names and put them into a
@@ -3334,11 +3280,11 @@
# Check that at least one database was selected
if ( !defined($main::FormData{'Database'}) ) {
- print("Database Search: \n");
- print("Sorry, no database(s) were selected for searching. \n");
+ print("Pretraživanje baza: \n");
+ print("Niste odabrali knjižnicu koju želite pretraživati. \n");
print("\n");
- print("There needs to be a least one database selected in order to perform the search.\n");
- print("Click 'back' on your browser, select at least one database and try again.\n");
+ print("Potrebno je da barem jedna knjižnica bude odabrana, kako biste mogli pretraživati.\n");
+ print("Kliknite na 'back' u svom browseru, odaberite barem jednu knjižnicu i pokušajte ponovo.\n");
goto bailFromGetSearchResults;
}
@@ -4011,7 +3957,7 @@
# Make sure that we send the header
- &vSendHTMLHeader("My Settings", undef);
+ &vSendHTMLHeader("My Settings", $main::JavaScript_SetChecked);
undef(%Value);
$Value{'GetUserSettings'} = "GetUserSettings";
&vSendMenuBar(%Value);
@@ -4049,7 +3995,7 @@
print("
Postavke: \n");
print("