--- search/Search.cgi 2002/06/25 14:37:37 1.12 +++ search/Search.cgi 2002/10/24 18:42:18 1.27 @@ -392,7 +392,8 @@ print("$JavaScript\n"); } print ''; - print("\n
\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; } @@ -3326,14 +3326,17 @@ # Convert all the '\0' to ',' $Databases =~ tr/\0/,/; - + + # add always selected databases + if (@main::always_selected_databases) { + $Databases .= ",".join(",",@main::always_selected_databases); + } # Add the max doc restriction if ( !defined($main::FormData{'Max'}) ) { $main::FormData{'Max'} = $main::DefaultMaxDoc; } - # Generate the search string $SearchString = &sMakeSearchString(%main::FormData); @@ -3744,7 +3747,7 @@ if ( $main::ConfigurationData{'allow-relevance-feedback-searches'} eq "yes" ) { print("Run search with selected documents as relevance feedback\n"); } - print("Save selected documents to a new document folder\n"); + print("Sačuvaj odabrane jedinice u novi folder\n"); # Get the document folder hash %QualifiedDocumentFolders = &hGetDocumentFolders; @@ -3970,7 +3973,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); @@ -4008,10 +4011,10 @@ print(" Postavke: \n"); print("\n"); - print("\n"); + print("\n"); # Send the buttons - print(" \n"); + print(" \n"); @@ -4043,14 +4046,14 @@ print("\n"); - print(" Search Preferences: \n"); + print(" Postavke pretraživanja: \n"); # Send a pull-down which allows the user to select which search form to default to print(" Forma za pretraživanje: \n"); $Value = (defined($DefaultSearch) && ($DefaultSearch eq "Simple")) ? "SELECTED" : ""; - print(" Jednostavna forma za pretraživanje\n"); + print("Forma za jednostavno pretraživanje\n"); $Value = (defined($DefaultSearch) && ($DefaultSearch eq "Expanded")) ? "SELECTED" : ""; - print("Forma za pretraživanje s više kriterija\n"); + print("Forma za složeno pretraživanje\n"); print(" \n"); # Send a pull-down which allows the user to select how many previous searches to store @@ -4070,14 +4073,14 @@ print(" Odabrane baze: \n"); - print(" Označite baze koje uvijek želite pretraživati: \n"); + print(" Označite knjižnice koje uvijek želite pretraživati:\n"); # Parse out the database names and put them into a # hash table, they should be separated with a '\n' if ( defined($SelectedDatabases) && ($SelectedDatabases ne "") ) { @ItemList = split(",", $SelectedDatabases); } - + &ShowDatabaseCheckBoxes(@ItemList); print("\n"); @@ -4108,9 +4111,9 @@ } - print("\n"); +# print("\n"); - print(" Document Retrieval Preferences: \n"); +# print(" Document Retrieval Preferences: \n"); # Send a pull-down which allows the user to select whether to display summaries or not, and how long we want them if ( defined($main::ConfigurationData{'allow-similiar-search'}) && ($main::ConfigurationData{'allow-similiar-search'} eq "yes") ) { @@ -4131,10 +4134,10 @@ print("\n"); - print(" Saved Searches Defaults: \n"); + print(" Postavke sačuvanih upita: \n"); # Send a pull-down which allows the user to select the automatic search frequency (default to weekly) - print(" Saved search frequency: \n"); + print(" Frekvencija pretraživanja: \n"); foreach $ItemEntry ( @main::SearchFrequencies ) { $Value = (defined($SearchFrequency) && ($SearchFrequency eq $ItemEntry)) ? "SELECTED" : ""; print(" $ItemEntry \n"); @@ -4142,7 +4145,7 @@ print(" \n"); # Send a pull-down which allows the user to select the automatic search delivery format - print(" Saved search delivery format: \n"); + print(" Format za isporuku rezultata: \n"); foreach $ItemEntry ( sort(keys(%main::DeliveryFormats)) ) { $Value = (defined($DeliveryFormat) && ($DeliveryFormat eq $ItemEntry)) ? "SELECTED" : ""; print(" $main::DeliveryFormats{$ItemEntry}\n"); @@ -4150,7 +4153,7 @@ print(" \n"); # Send a pull-down which allows the user to select the automatic delivery method - print(" Saved search delivery method: \n"); + print(" Metoda isporuke rezultata: \n"); foreach $ItemEntry ( sort(keys(%main::DeliveryMethods)) ) { $Value = (defined($DeliveryMethod) && ($DeliveryMethod eq $ItemEntry)) ? "SELECTED" : ""; print(" $main::DeliveryMethods{$ItemEntry}\n"); @@ -4223,7 +4226,7 @@ $Value{'UserName'} = $main::FormData{'UserName'}; $Value{'EmailAddress'} = $main::FormData{'EmailAddress'}; $Value{'DefaultSearch'} = $main::FormData{'DefaultSearch'}; - $Value{'SelectedDatabases'} = $main::FormData{'SelectedDatabases'}; + $Value{'SelectedDatabases'} = $main::FormData{'Database'}; if ( defined($Value{'SelectedDatabases'}) ) { $Value{'SelectedDatabases'} =~ s/\0/,/g; } @@ -4651,7 +4654,7 @@ # Give the user a form to fill out - print(" Saving a search: \n"); + print(" Čuvanje upita: \n"); @@ -4671,7 +4674,7 @@ print("\n"); # Send the buttons - print(" \n"); + print(" \n"); print("\n"); @@ -4704,9 +4707,9 @@ print("\n"); # Send the search name and search description fields - print(" Search Name (required): \n"); + print(" Naziv (obavezno): \n"); - print(" Search Description: \n"); + print(" Opis: \n"); if ( defined($main::FormData{'RfDocument'}) ) { print("\n"); @@ -4717,7 +4720,7 @@ print("\n"); - print(" Kliknite na ovaj kvadratić ako želite postojeći folder s istim imenom zamijeniti ovim novim: \n"); + print(" Kliknite na ovaj kvadratić ako želite postojeći upit s istim imenom zamijeniti ovim novim: \n"); @@ -4726,10 +4729,10 @@ print("\n"); - print(" Check to run this search on a regular basis: \n"); + print(" Kliknite ovaj kvadratić ukoliko želite automatsko periodičko pretraživanje po ovom upitu: \n"); # Send a pull-down which allows the user to select the automatic search frequency - print(" Select the search frequency: \n"); + print(" Odaberite frekvenciju automatskog pretraživanja: \n"); foreach $ValueEntry ( @main::SearchFrequencies ) { $Value = (defined($SearchFrequency) && ($SearchFrequency eq $ValueEntry)) ? "SELECTED" : ""; print(" $ValueEntry \n"); @@ -4737,7 +4740,7 @@ print(" \n"); # Send a pull-down which allows the user to select the automatic search delivery format - print(" Select the delivery format: \n"); + print(" Odaberite format za isporuku rezultata pretraživanja: \n"); foreach $ValueEntry ( sort(keys(%main::DeliveryFormats)) ) { $Value = (defined($DeliveryFormat) && ($DeliveryFormat eq $ValueEntry)) ? "SELECTED" : ""; print(" $main::DeliveryFormats{$ValueEntry}\n"); @@ -4745,7 +4748,7 @@ print(" \n"); # Send a pull-down which allows the user to select the automatic search delivery method - print(" Select the delivery method: \n"); + print(" Odaberite metodu isporuke: \n"); foreach $ValueEntry ( sort(keys(%main::DeliveryMethods)) ) { $Value = (defined($DeliveryMethod) && ($DeliveryMethod eq $ValueEntry)) ? "SELECTED" : ""; print(" $main::DeliveryMethods{$ValueEntry}\n"); @@ -4866,11 +4869,11 @@ && !(defined($main::FormData{'OverWrite'}) && ($main::FormData{'OverWrite'} eq "yes")) ) { # There is already a saved search with this name, so we suggest corrective action to the user. - print(" Saving a Search: \n"); - print(" Sorry, there is already a saved search with this name. \n"); + print(" Čuvanje upita: \n"); + print(" Već postoji upit pod ovim imenom. \n"); print("\n"); - print("Click 'back' on your browser, change the 'search name' and try again, \n"); - print("alternatively you can check the box which allows you to automatically over-write a saved search with the same name.\n"); + print("Kliknite 'back' u browseru, promijenite 'Naziv' i pokušajte ponovo, \n"); + print("ili kliknuti na kvadratić koji vam omogućava da automatski presnimite sačuvani upit s istim imenom.\n"); print("\n"); goto bailFromSetSaveSearch; @@ -4884,13 +4887,13 @@ if ( !defined($Value) && (defined($main::FormData{'Regular'}) && ($main::FormData{'Regular'} eq "yes")) ) { # Regular delivery was requested, but the email address was not specified in the settings - print(" Saving a Search: \n"); - print(" Sorry, your email address is not specified in your settings. \n"); + print(" Čuvanje upita: \n"); + print(" E-mail adresa nije specificirana u vašim postavkama. \n"); print("\n"); - print("You need to specify your email address in your settings if you want this search to run on a regular basis, \n"); - print("without your email address, we are not able to send you the search result. \n"); - print("Click the 'Settings' option from the menu sidebar, fill in your email address and save the settings, \n"); - print("then click 'back' on your browser three times to go back to the form which allows you to save a search.\n"); + print("Potrebno je specificirati e-mail adresu ukoliko želite da se pretraživanje po ovom upitu odvije periodično. \n"); + print("bez e-mail adrese, nismo vam u mogućnosti isporučiti rezultate. \n"); + print("Kliknite na 'Korisničke postavke', upišite e-mail adresu i sačuvajte postavke, \n"); + print("nakon toga kliknite na 'back' u svom browseru tri puta kako biste se vratili na formu koja vam nudi da sačuvate upit.\n"); print("\n"); goto bailFromSetSaveSearch; @@ -5017,7 +5020,7 @@ # Print out the saved searches - print(" Sačuvana pretraživanja: \n"); + print(" Sačuvani upiti: \n"); @@ -5033,9 +5036,9 @@ print(" \n"); print("\n"); - print("Aktiviraj označena sačuvana pretraživanja\n"); - print("Stavi u mirovanje označena sačuvana pretraživanja\n"); - print("Obriši označena sačuvana pretraživanja\n"); + print("Uključi periodično automatsko pretraživanje po odabranim upitima\n"); + print("Isključi periodično automatsko pretraživanje po odabranim upitima\n"); + print("Obriši označene sačuvane upite\n"); print("\n"); print("\n"); print("\n"); @@ -5112,20 +5115,20 @@ if ( defined($SearchFrequency) || defined($DeliveryFormat) || defined($DeliveryMethod) ) { - print(" Run: $SearchFrequency \n"); - print(" Delivery format: $main::DeliveryFormats{$DeliveryFormat} \n"); - print(" Delivery method : $main::DeliveryMethods{$DeliveryMethod} \n"); + print(" Automatsko pokretanje: $SearchFrequency \n"); + print(" Format isporuke: $main::DeliveryFormats{$DeliveryFormat} \n"); + print(" Methoda isporuke: $main::DeliveryMethods{$DeliveryMethod} \n"); } $Value = &sGetPrintableDateFromTime($CreationTime); - print(" Datum kreiranja: $Value \n"); + print(" Datum kreiranja: $Value \n"); if ( defined($SearchFrequency) || defined($DeliveryFormat) || defined($DeliveryMethod) ) { if ( defined($LastRunTime) ) { $Value = &sGetPrintableDateFromTime($LastRunTime); - print(" Last Run: $Value \n"); + print(" Zadnje pokretanje: $Value \n"); } printf(" Status: %s ", @@ -5133,13 +5136,13 @@ } - print(" [ Otvori formu za pretraživanje s upisanim ovim pretraživanjem ] \n"); + print(" [ Otvori formu za pretraživanje s upisanim ovim upitom ] \n"); } print("\n"); } else { - print(" Sorry, currently, there are no saved searches. \n"); + print(" Trenutno nemate sačuvanih upita!. \n"); } @@ -5270,13 +5273,13 @@ # Set the title if ( $ENV{'PATH_INFO'} eq "/DeleteSavedSearch" ) { - $Title = "Obriši sačuvana pretraživanja"; + $Title = "Brisanje sačuvanih pretraživanja"; } elsif ( $ENV{'PATH_INFO'} eq "/ActivateSavedSearch" ) { - $Title = "Aktiviraj sačuvana pretraživanja"; + $Title = "Uključivanje automatskog periodičnog pretraživanja"; } elsif ( $ENV{'PATH_INFO'} eq "/SuspendSavedSearch" ) { - $Title = "Stavi u mirovanje sačuvana pretraživanja"; + $Title = "Isključivanje automatskog periodičnog pretraživanja"; } @@ -5291,9 +5294,9 @@ # Check to see if the saved search object is defined if ( ! defined($main::FormData{'SavedSearchObject'}) ) { # Could not find the saved search object - print(" Sorry, no searches were selected. \n"); + print("Niste odabrali niti jedan upit. \n"); print("\n"); - print("You need to select at least one saved search in order to be able to perform an action on it.\n"); + print("Potrebno je odabrati barem jedan sačuvani upit nad kojim će se izvršiti akcija.\n"); print("\n"); goto bailFromProcessSavedSearch; } @@ -5322,10 +5325,10 @@ if ( $ENV{'PATH_INFO'} eq "/DeleteSavedSearch" ) { if ( unlink($SavedSearchFilePath) ) { - printf("Successfully deleted: %s\n", $Value{'SearchName'}); + printf("Uspješno pobrisano: %s\n", $Value{'SearchName'}); } else { - printf("Failed to delete: %s\n", $Value{'SearchName'}); + printf("Nije pobrisano: %s\n", $Value{'SearchName'}); } } elsif ( ($ENV{'PATH_INFO'} eq "/ActivateSavedSearch") || ($ENV{'PATH_INFO'} eq "/SuspendSavedSearch") ) { @@ -5339,12 +5342,12 @@ $Value{'SearchStatus'} = ($ENV{'PATH_INFO'} eq "/ActivateSavedSearch") ? "Active" : "Inactive" ; if ( &iSaveXMLFileFromHash($SavedSearchFilePath, "SavedSearch", %Value) ) { - printf("Successfully %s: %s\n", - ($ENV{'PATH_INFO'} eq "/ActivateSavedSearch") ? "activated" : "suspended", $Value{'SearchName'}); + printf("Uspješno %s: %s\n", + ($ENV{'PATH_INFO'} eq "/ActivateSavedSearch") ? "uključeno" : "isključeno", $Value{'SearchName'}); } else { - printf("Failed to %s: %s\n", - ($ENV{'PATH_INFO'} eq "/ActivateSavedSearch") ? "activated" : "suspended", $Value{'SearchName'}); + printf("Nije %s: %s\n", + ($ENV{'PATH_INFO'} eq "/ActivateSavedSearch") ? "uključeno" : "isključeno", $Value{'SearchName'}); } } } @@ -5446,7 +5449,7 @@ # Print up the title - print(" Snimanje foldera s dokumentima: \n"); + print(" Kreiranje korisničkog foldera: \n"); # Print up the form printf("\n"); @@ -5455,7 +5458,7 @@ print("\n"); # Send the buttons - print(" \n"); + print(" \n"); print("\n"); @@ -5495,7 +5498,7 @@ # Delete the old content delete($main::FormData{'Documents'}); - +###FIX if ( defined($main::FormData{'Document'}) ) { print("\n"); &bDisplayDocuments("Document", $main::FormData{'Document'}, "Document", undef, undef, 1); @@ -5832,9 +5835,9 @@ } } - print(" Saving a Document Folder: \n"); + print(" Čuvanje korisničkog foldera: \n"); print("\n"); - print(" Your document folder was successfully saved. \n"); + print(" Vaš folder je uspješno sačuvan! \n"); } @@ -5906,7 +5909,7 @@ # Print out the document folders - print(" Folderi: \n"); + print(" Korisnički folderi: \n"); # Get the document folder hash @@ -6303,7 +6306,7 @@ undef(%Value); &vSendMenuBar(%Value); - print(" Document Folder: \n"); + print(" Korisnički folder: \n"); # Start the form @@ -6315,15 +6318,15 @@ print("\n"); print("Odabranima se smatraju svi rezultati ukoliko niste učinili nikakav dodatan odabir. \n"); print("\n"); - print("Prikaži odabrane rezultates\n"); + print("Prikaži odabrane rezultate\n"); if ( $main::ConfigurationData{'allow-similiar-search'} eq "yes" ) { print("Prikaži rezultate slične odabranim rezultatima\n"); } if ( $main::ConfigurationData{'allow-relevance-feedback-searches'} eq "yes" ) { print("Run search with selected documents as relevance feedback\n"); } - print("Delete selected documents from this document folder\n"); - print("Move selected documents to a new document folder\n"); + print("Obriši odabrane jedinice iz ovog foldera\n"); + print("Preseli odabrane jedinice u novi folder\n"); # Get the document folder hash @@ -6342,7 +6345,7 @@ $DocumentFolderEntry = ($DocumentFolderEntry =~ /^$main::UserAccountDirectoryPath\/(.*)/) ? $1 : $DocumentFolderEntry; $DocumentFolderEntry = &lEncodeURLData($DocumentFolderEntry); - print("Move selected documents to the '$FolderName' document folder\n"); + print("Preseli odabrane jedinice u folder '$FolderName' \n"); } print("\n"); @@ -6359,7 +6362,7 @@ print(" Naziv: $ArticleFolder{'FolderName'} \n"); # Print the folder description - $ArticleFolder{'FolderDescription'} = defined($ArticleFolder{'FolderDescription'}) ? $ArticleFolder{'FolderDescription'} : "(No description defined)"; + $ArticleFolder{'FolderDescription'} = defined($ArticleFolder{'FolderDescription'}) ? $ArticleFolder{'FolderDescription'} : "(Nije naveden)"; $ArticleFolder{'FolderDescription'} =~ s/\n//g; $ArticleFolder{'FolderDescription'} =~ s/\r//g; print(" Opis: $ArticleFolder{'FolderDescription'} \n"); @@ -6369,7 +6372,7 @@ print(" Datum kreiranja: $Value \n"); $Value = &sGetPrintableDateFromTime($ArticleFolder{'UpdateTime'}); - print(" Datum zadnje promijene: $Value \n"); + print(" Datum zadnje promijene: $Value \n"); print("\n"); @@ -6888,7 +6891,6 @@ # Print out the message header (Content-Type) if ( $DeliveryMethod eq "attachement" ) { print("Mime-Version: 1.0\n"); - print("Content-Type: multipart/mixed; boundary=\"============_-1234567890==_============\"\n"); } else { print("Mime-Version: 1.0\n"); @@ -7384,6 +7386,8 @@ my ($FieldName, $FieldDescription, undef) = split(/\t/, $FieldInformation, 3); $main::SearchFieldDescriptions{$FieldName} = $FieldDescription; } + } else { + &vLog("Error - cant read database description from '$Database'\n"); } } @@ -7400,8 +7404,14 @@ foreach my $ItemEntry ( @_ ) { $Value{$ItemEntry} = $ItemEntry; } - + print("\n"); + print " + Označi + sve, + niti jednu. + + "; my @html_database; @@ -7438,4 +7448,16 @@ } print("\n"); + } + +#-------------------------------------------------------------------------- +# +sub nuke_accents { + my $tmp = $_[0]; + $tmp =~ tr/ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁčáíóúĄąŽžĘęźČşÁÂĚŞŻżĂăđĐĎËďŇÍÎěŢŮÓÔŃńňŠšŔÚŕŰýÝţ´˝˛ˇ˘¸¨˙Řř/CueaauccleOoiZACELlooLlSsOUTtLcaiouAaZzEezCsAAESZzAadDDEdNIIeTUOoNnnSsRUrUyYt'".'',"'Rr/; + # convert search string to lower case -> make search case insensitive + $tmp =~ tr/A-Z/a-z/; + return $tmp; +} +
\n"); - print("Click 'back' on your browser, change the 'search name' and try again, \n"); - print("alternatively you can check the box which allows you to automatically over-write a saved search with the same name.\n"); + print("Kliknite 'back' u browseru, promijenite 'Naziv' i pokušajte ponovo, \n"); + print("ili kliknuti na kvadratić koji vam omogućava da automatski presnimite sačuvani upit s istim imenom.\n"); print("
\n"); goto bailFromSetSaveSearch; @@ -4884,13 +4887,13 @@ if ( !defined($Value) && (defined($main::FormData{'Regular'}) && ($main::FormData{'Regular'} eq "yes")) ) { # Regular delivery was requested, but the email address was not specified in the settings - print("
\n"); - print("You need to specify your email address in your settings if you want this search to run on a regular basis, \n"); - print("without your email address, we are not able to send you the search result.
\n"); - print("Click the 'Settings' option from the menu sidebar, fill in your email address and save the settings, \n"); - print("then click 'back' on your browser three times to go back to the form which allows you to save a search.\n"); + print("Potrebno je specificirati e-mail adresu ukoliko želite da se pretraživanje po ovom upitu odvije periodično. \n"); + print("bez e-mail adrese, nismo vam u mogućnosti isporučiti rezultate.
\n"); + print("Kliknite na 'Korisničke postavke', upišite e-mail adresu i sačuvajte postavke, \n"); + print("nakon toga kliknite na 'back' u svom browseru tri puta kako biste se vratili na formu koja vam nudi da sačuvate upit.\n"); print("
\n"); goto bailFromSetSaveSearch; @@ -5017,7 +5020,7 @@ # Print out the saved searches - print("
\n"); - print("You need to select at least one saved search in order to be able to perform an action on it.\n"); + print("Potrebno je odabrati barem jedan sačuvani upit nad kojim će se izvršiti akcija.\n"); print("
\n"); goto bailFromProcessSavedSearch; } @@ -5322,10 +5325,10 @@ if ( $ENV{'PATH_INFO'} eq "/DeleteSavedSearch" ) { if ( unlink($SavedSearchFilePath) ) { - printf("
Successfully deleted: %s\n", $Value{'SearchName'}); + printf("
Uspješno pobrisano: %s\n", $Value{'SearchName'}); } else { - printf("
Failed to delete: %s\n", $Value{'SearchName'}); + printf("
Nije pobrisano: %s\n", $Value{'SearchName'}); } } elsif ( ($ENV{'PATH_INFO'} eq "/ActivateSavedSearch") || ($ENV{'PATH_INFO'} eq "/SuspendSavedSearch") ) { @@ -5339,12 +5342,12 @@ $Value{'SearchStatus'} = ($ENV{'PATH_INFO'} eq "/ActivateSavedSearch") ? "Active" : "Inactive" ; if ( &iSaveXMLFileFromHash($SavedSearchFilePath, "SavedSearch", %Value) ) { - printf("
Successfully %s: %s\n", - ($ENV{'PATH_INFO'} eq "/ActivateSavedSearch") ? "activated" : "suspended", $Value{'SearchName'}); + printf("
Uspješno %s: %s\n", + ($ENV{'PATH_INFO'} eq "/ActivateSavedSearch") ? "uključeno" : "isključeno", $Value{'SearchName'}); } else { - printf("
Failed to %s: %s\n", - ($ENV{'PATH_INFO'} eq "/ActivateSavedSearch") ? "activated" : "suspended", $Value{'SearchName'}); + printf("
Nije %s: %s\n", + ($ENV{'PATH_INFO'} eq "/ActivateSavedSearch") ? "uključeno" : "isključeno", $Value{'SearchName'}); } } } @@ -5446,7 +5449,7 @@ # Print up the title - print("
\n"); - print("