/[webpac-proto]/search/Search.cgi
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /search/Search.cgi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.1.1 by dpavlin, Thu Jun 13 17:01:56 2002 UTC revision 1.27 by dpavlin, Thu Oct 24 18:42:18 2002 UTC
# Line 1  Line 1 
1  #!/usr/bin/perl -w  #!/usr/bin/perl -w
2    
3  #*****************************************************************************  #*****************************************************************************
4  #       Copyright (C) 1993-2000, FS Consulting Inc. All rights reserved          *  #       Copyright (C) 1993-2000, FS Consulting Inc. All rights reserved      *
5  #                                                                                                                                                        *  #                                                                            *
6  #                                                                                                                                                        *  #                                                                            *
7  #  This notice is intended as a precaution against inadvertent publication       *  #  This notice is intended as a precaution against inadvertent publication   *
8  #  and does not constitute an admission or acknowledgement that publication      *  #  and does not constitute an admission or acknowledgement that publication  *
9  #  has occurred or constitute a waiver of confidentiality.                                       *  #  has occurred or constitute a waiver of confidentiality.                   *
10  #                                                                                                                                                        *  #                                                                            *
11  #  This software is the proprietary and confidential property                            *  #  This software is the proprietary and confidential property                *
12  #  of FS Consulting, Inc.                                                                                                        *  #  of FS Consulting, Inc.                                                    *
13  #*****************************************************************************  #*****************************************************************************
14    
15    #print "Content-type: text/plain\n\n";
16    
17    #use Data::Dumper;
18    
19  #--------------------------------------------------------------------------  #--------------------------------------------------------------------------
20  #  #
21  # Author: Francois Schiettecatte (FS Consulting, Inc.)  # Author: Francois Schiettecatte (FS Consulting, Inc.)
# Line 179  $main::MPSSession = 0; Line 183  $main::MPSSession = 0;
183  #  #
184    
185    
186  # List of default configuration settings  # read configuration fields
187  %main::DefaultSettings = (  require "config.pm";
         'lowest-year',  '1990',  
         'max-score',    '1000',  
         'allow-summary-displays','no',  
         'allow-similiar-search','no',  
         'allow-regular-searches','no',  
         'deliver-empty-results-from-regular-search','no',  
 #       'allow-relevance-feedback-searches','no',  
         'mailer-application','/usr/lib/sendmail',  
         'server-log','mps.log',  
         'output-colums','yes',  
 #       'show-past-date-list','yes',  
         'database-for-SearchFieldDescriptions','ps',  
 );  
   
 # DbP: Define which fields you have in normal and advanced search  
 # first define all available fields and then how many fields of that  
 # are visible.  
 @main::NormalSearchFieldNames = (  
         '700+',  
         '200+',  
         '610',  
         '210',  
         '10',  
   
 );  
 $main::NormalSearchDropdowns = 3 ;  
   
 @main::AdvancedSearchFieldNames = (  
         '700+',  
         '200+',  
         '610',  
         '210',  
         '225',  
         '300+',  
         '330',  
         '464',  
         '675',  
         '686',  
         '990',  
         '991',  
         '10',  
         '001',  
 );  
 $main::AdvancedSearchDropdowns = 4 ;  
   
188    
189  # List of required configuration settings  # List of required configuration settings
190  @main::RequiredSettings = (  @main::RequiredSettings = (
# Line 273  $main::QueryReportItemName = "document"; Line 232  $main::QueryReportItemName = "document";
232  $main::QueryReportMimeType = "application/x-wais-report";  $main::QueryReportMimeType = "application/x-wais-report";
233    
234    
   
 # 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',  
 );  
   
   
235  # Array of mime type names, we use this to map  # Array of mime type names, we use this to map
236  # mime types to mime type names (which are more readable)  # mime types to mime type names (which are more readable)
237  %main::MimeTypeNames = (  %main::MimeTypeNames = (
# Line 436  sub vSendHTMLHeader { Line 376  sub vSendHTMLHeader {
376          if ( ! $ENV{'GATEWAY_INTERFACE'} ) {          if ( ! $ENV{'GATEWAY_INTERFACE'} ) {
377                  return;                  return;
378          }          }
379            
380          # Bail if we have already sent the header          # Bail if we have already sent the header
381          if ( $main::HeaderSent ) {          if ( $main::HeaderSent ) {
382                  return;                  return;
# Line 452  sub vSendHTMLHeader { Line 392  sub vSendHTMLHeader {
392                  print("$JavaScript\n");                  print("$JavaScript\n");
393          }          }
394          print '<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-2">';          print '<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-2">';
395          print("</HEAD>\n<BODY BGCOLOR=\"#FFFFFF\">\n");          print '<link rel="STYLESHEET" type="text/css" href="'.$main::ConfigurationData{'image-base-path'}.'/stil.css">';
396            print("</HEAD>\n<BODY BGCOLOR=\"ffffe8\">\n");
397    
398    
399          # Send the header snippet file          # Send the header snippet file
# Line 461  sub vSendHTMLHeader { Line 402  sub vSendHTMLHeader {
402    
403          # Send the banner          # Send the banner
404          print("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>\n");          print("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>\n");
405          print("<TR><TD VALIGN=TOP ALIGN=RIGHT> <A HREF=\"/\" OnMouseOver=\"self.status='Return Home'; return true\"><IMG SRC=\"$main::ConfigurationData{'image-base-path'}/$main::ImageNames{'banner'}\" ALT=\"Return Home\" BORDER=0></A> </TD></TR>\n");  #       print("<TR><TD VALIGN=TOP ALIGN=RIGHT> <A HREF=\"/\" OnMouseOver=\"self.status='Return Home'; return true\"><IMG SRC=\"$main::ConfigurationData{'image-base-path'}/$main::ImageNames{'banner'}\" ALT=\"Return Home\" BORDER=0></A> </TD></TR>\n");
406          print("</TABLE>\n");  
407            print("<TR><TD VALIGN=TOP ALIGN=RIGHT> <A HREF=\"/\" OnMouseOver=\"self.status='Return Home'; return true\"><H3>Katalozi knji¾nica Filozofskog fakulteta</H3> </A> </TD></TR>\n");
408    
409            print("</TABLE>\n");
410                                    
411    
412          # Set the flag saying that the header has been sent          # Set the flag saying that the header has been sent
# Line 559  sub vSendMenuBar { Line 503  sub vSendMenuBar {
503                  }                  }
504          }          }
505    
506          if ( %MenuBar && defined($MenuBar{'GetSearch'}) ) {          my $DISABLED;
                 print("<IMG SRC=\"$main::ConfigurationData{'image-base-path'}/$main::ImageNames{'inactive-search'}\" ALT=\"Search\" BORDER=0>");  
         }  
         else {  
                 print("<INPUT NAME=\"GetSearch\" TYPE=IMAGE SRC=\"$main::ConfigurationData{'image-base-path'}/$main::ImageNames{'active-search'}\" ALT=\"Search\" BORDER=0>");  
507    
508                    $DISABLED = ( %MenuBar && defined($MenuBar{'GetSearch'}) ) ? "DISABLED" : "";
509          }          print("<INPUT NAME=\"GetSearch\" TYPE=SUBMIT VALUE=\"Pretra¾ivanje\" $DISABLED class=\"navigacija${DISABLED}\">");
510    
511          if ( defined($main::RemoteUser) ) {          if ( defined($main::RemoteUser) ) {
512                  if ( %MenuBar && defined($MenuBar{'ListSearchHistory'}) ) {                  $DISABLED = ( %MenuBar && defined($MenuBar{'ListSearchHistory'}) ) ? "DISABLED" : "";
513                          print("<IMG SRC=\"$main::ConfigurationData{'image-base-path'}/$main::ImageNames{'inactive-search-history'}\" ALT=\"Search History\" BORDER=0>");                  print"<INPUT NAME=\"ListSearchHistory\" TYPE=SUBMIT VALUE=\"Prija¹nja pretra¾ivanja\" $DISABLED class=\"navigacija${DISABLED}\">";
                 }  
                 else {  
                         print("<INPUT NAME=\"ListSearchHistory\" TYPE=IMAGE SRC=\"$main::ConfigurationData{'image-base-path'}/$main::ImageNames{'active-search-history'}\" ALT=\"Search History\" BORDER=0>");  
                 }  
514    
515                  if ( %MenuBar && defined($MenuBar{'ListSavedSearch'}) ) {                  $DISABLED = ( %MenuBar && defined($MenuBar{'ListSavedSearch'}) ) ? "DISABLED" : "";
516                          print("<IMG SRC=\"$main::ConfigurationData{'image-base-path'}/$main::ImageNames{'inactive-saved-searches'}\" ALT=\"Saved Searches\" BORDER=0>");                  print"<INPUT NAME=\"ListSavedSearch\" TYPE=SUBMIT VALUE=\"Saèuvani upiti\" $DISABLED class=\"navigacija${DISABLED}\">";
                 }  
                 else {  
                         print("<INPUT NAME=\"ListSavedSearch\" TYPE=IMAGE SRC=\"$main::ConfigurationData{'image-base-path'}/$main::ImageNames{'active-saved-searches'}\" ALT=\"Saved Searches\" BORDER=0>");  
                 }  
517    
518                  if ( %MenuBar && defined($MenuBar{'ListFolder'}) ) {                  $DISABLED = ( %MenuBar && defined($MenuBar{'ListFolder'}) ) ? "DISABLED" : "";
519                          print("<IMG SRC=\"$main::ConfigurationData{'image-base-path'}/$main::ImageNames{'inactive-document-folders'}\" ALT=\"Doument Folders\" BORDER=0>");                  print"<INPUT NAME=\"ListFolder\" TYPE=SUBMIT VALUE=\"Korisnièki folderi\" $DISABLED class=\"navigacija${DISABLED}\">";
520                  }          
521                  else {                  $DISABLED = ( %MenuBar && defined($MenuBar{'GetUserSettings'}) ) ? "DISABLED" : "";
522                          print("<INPUT NAME=\"ListFolder\" TYPE=IMAGE SRC=\"$main::ConfigurationData{'image-base-path'}/$main::ImageNames{'active-document-folders'}\" ALT=\"Document Folders\" BORDER=0>");                  print"<INPUT NAME=\"GetUserSettings\" TYPE=SUBMIT VALUE=\"Korisnièke postavke\" $DISABLED class=\"navigacija${DISABLED}\">";
                 }  
                   
                 if ( %MenuBar && defined($MenuBar{'GetUserSettings'}) ) {  
                         print("<IMG SRC=\"$main::ConfigurationData{'image-base-path'}/$main::ImageNames{'inactive-settings'}\" ALT=\"My Preferences\" BORDER=0>");  
                 }  
                 else {  
                         print("<INPUT NAME=\"GetUserSettings\" TYPE=IMAGE SRC=\"$main::ConfigurationData{'image-base-path'}/$main::ImageNames{'active-settings'}\" ALT=\"My Settings\" BORDER=0>");  
                 }  
523          }          }
524    
525    
# Line 1585  sub sMakeSearchString { Line 1509  sub sMakeSearchString {
1509          # Initialize the search string          # Initialize the search string
1510          $SearchString = "";          $SearchString = "";
1511    
1512            # tip gradje
1513            if ( defined($main::FormData{'tip'}) ) {
1514                    my @t;
1515                    foreach my $tip ( split(/\0/, $main::FormData{'tip'}) ) {
1516                            push @t,"tip=$tip";
1517                    }
1518                    $SearchString .= "(".join(" or ",@t).") and ";
1519            }
1520    
1521          # Add the search terms          # Add the search terms
1522          $SearchString .= defined($Content{'Any'}) ? ((($SearchString ne "") ? " AND " : "") . $Content{'Any'}) : "";          $SearchString .= defined($Content{'Any'}) ? ((($SearchString ne "") ? " AND " : "") . nuke_accents($Content{'Any'}) ) : "";
1523    
1524    
1525          # Add the generic field names          # Add the generic field names
# Line 1595  sub sMakeSearchString { Line 1527  sub sMakeSearchString {
1527                    
1528                  my ($FieldName) = "FieldName" . $Value;                  my ($FieldName) = "FieldName" . $Value;
1529                  my ($FieldContent) = "FieldContent" . $Value;                  my ($FieldContent) = "FieldContent" . $Value;
1530    
1531                    
1532                    if ( defined($Content{$FieldName}) && defined($Content{$FieldContent}) ) {
1533                    
1534                  if ( defined($Content{$FieldName}) ) {                          if ($Content{$FieldName} eq "ISBN") {
1535                          $SearchString .= defined($Content{$FieldContent}) ?                                  # fix stupid problem with dashes in data
1536                                          (($SearchString ne "") ? " AND " : "") . "$Content{$FieldName}=(" . $Content{$FieldContent} . ")" : "";                                  $Content{$FieldContent} .= "*";
1537                            }
1538    
1539                            $SearchString .=  ($SearchString ne "") ? " AND " : "";
1540                            $SearchString .= "$Content{$FieldName}=(" . nuke_accents($Content{$FieldContent}) . ")";
1541                  }                  }
1542          }          }
1543    
         # nuke accented chars  
         $SearchString =~ tr/Çüéâäùæç³ëÕõî¬ÄÆÉÅåôö¥µ¦¶ÖÜ«»£èáíóú¡±®¾Êê¼ÈºÁÂ̪¯¿ÃãðÐÏËïÒÍÎìÞÙÓÔÑñò©¹ÀÚàÛýÝþ´­½²·¢¸¨ÿØø/CueaauccleOoiZACELlooLlSsOUTtLcaiouAaZzEezCsAAESZzAadDDEdNIIeTUOoNnnSsRUrUyYt'-".'',"'Rr/;  
   
1544          # Add the internal search terms          # Add the internal search terms
1545    
   
1546          # Add the date restriction on the load time          # Add the date restriction on the load time
1547          if ( defined($Content{'LastRunTime'}) && ($Content{'LastRunTime'} > 0) ) {          if ( defined($Content{'LastRunTime'}) && ($Content{'LastRunTime'} > 0) ) {
1548                  $SearchString .= (($SearchString ne "") ? " AND " : "") . "time_t>=$Content{'LastRunTime'}";                  $SearchString .= (($SearchString ne "") ? " AND " : "") . "time_t>=$Content{'LastRunTime'}";
# Line 2028  sub bDisplayDocuments { Line 1962  sub bDisplayDocuments {
1962          # Print the title          # Print the title
1963          if ( $HTML ) {          if ( $HTML ) {
1964                  printf("<TD ALIGN=LEFT VALIGN=TOP>%s%s:</TD><TD ALIGN=LEFT VALIGN=TOP>\n",                  printf("<TD ALIGN=LEFT VALIGN=TOP>%s%s:</TD><TD ALIGN=LEFT VALIGN=TOP>\n",
1965                                  defined($Title) ? $Title : "Document", (scalar(@Documents) > 1) ? "s" : "");  #                               defined($Title) ? $Title : "Document", (scalar(@Documents) > 1) ? "s" : "");
1966                                    $Title);
1967          }          }
1968          else {          else {
1969                  printf("%s%s:\n", defined($Title) ? $Title : "Document", (scalar(@Documents) > 1) ? "s" : "");  #               printf("%s%s:\n", defined($Title) ? $Title : "Document", (scalar(@Documents) > 1) ? "s" : "");
1970                    print $Title;
1971          }          }
1972    
1973    
# Line 2052  sub bDisplayDocuments { Line 1988  sub bDisplayDocuments {
1988                          $Headline =~ s/&nbsp;//gs;                          $Headline =~ s/&nbsp;//gs;
1989                          $Headline =~ s/<.*?>//gs;                          $Headline =~ s/<.*?>//gs;
1990                          $Headline =~ s/\s+/ /gs;                          $Headline =~ s/\s+/ /gs;
1991                            # decode some basic html from headline <b> <i>
1992                            $Headline =~ s/&lt;(\/?[bi])&gt;/<$1>/g;
1993                                                    
1994                          # Create a generic link for this document                          # Create a generic link for this document
1995                          $Value = "";                          $Value = "";
# Line 2082  sub bDisplayDocuments { Line 2020  sub bDisplayDocuments {
2020    
2021                          # Put up the headline and the score, this one links to the document                          # Put up the headline and the score, this one links to the document
2022                          if ( $HTML ) {                          if ( $HTML ) {
2023                                  print("$SelectorText <A HREF=\"$LinkText\" OnMouseOver=\"self.status='Retrieve this document'; return true\"> $Headline <I> ( $main::DatabaseDescriptions{$Value{'Database'}} ) </I> </A> <BR>\n");  #                               print("$SelectorText <A HREF=\"$LinkText\" OnMouseOver=\"self.status='Retrieve this document'; return true\"> $Headline <I> ( $main::DatabaseDescriptions{$Value{'Database'}} ) </I> </A> <BR>\n");
2024                                    print("$SelectorText <A HREF=\"$LinkText\" OnMouseOver=\"self.status='Retrieve this document'; return true\"> $Headline </A> <BR>\n");
2025    
2026  #                               if ( defined($URL) && ($URL ne "") ) {  #                               if ( defined($URL) && ($URL ne "") ) {
2027  #                                       $Value = (length($URL) > $main::DefaultMaxVisibleUrlLength) ? substr($URL, 0, $main::DefaultMaxVisibleUrlLength) . "..." : $URL;  #                                       $Value = (length($URL) > $main::DefaultMaxVisibleUrlLength) ? substr($URL, 0, $main::DefaultMaxVisibleUrlLength) . "..." : $URL;
# Line 2146  sub bsDisplaySearchResults { Line 2085  sub bsDisplaySearchResults {
2085          my (@Words, $Word, @OffsetPairs, $OffsetPair, %Offsets, $Offset, $Start, $End, $OldStart, $OldEnd, $CurrentSummaryLength);          my (@Words, $Word, @OffsetPairs, $OffsetPair, %Offsets, $Offset, $Start, $End, $OldStart, $OldEnd, $CurrentSummaryLength);
2086          my ($DatabaseSummaryFilterKey, $DatabaseSummaryFilterFunction);          my ($DatabaseSummaryFilterKey, $DatabaseSummaryFilterFunction);
2087          my ($Value, %Value, @Values, $ValueEntry);          my ($Value, %Value, @Values, $ValueEntry);
2088            
2089            
2090          # Check input parameters          # Check input parameters
2091          if ( !defined($SearchResults) || !%Content ) {          if ( !defined($SearchResults) || !%Content ) {
2092                  return (0);                  return (0);
2093          }          }
2094                    
   
           
2095          # Split the search results text into a search results list          # Split the search results text into a search results list
2096          @SearchResults = split(/\n/, $SearchResults);                            @SearchResults = split(/\n/, $SearchResults);                  
                   
2097                    
2098                    
2099          # First we count up the number of results and scoop up          # First we count up the number of results and scoop up
# Line 2265  sub bsDisplaySearchResults { Line 2201  sub bsDisplaySearchResults {
2201                          print("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>\n");                          print("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>\n");
2202                    
2203                          # Print the selector                          # Print the selector
2204                          print("<TR><TD ALIGN=LEFT VALIGN=TOP>Odabranima se smatraju svi rezultati ukoliko niste uèinili nikakav dodatan odabir.</TD><TD ALIGN=RIGHT VALIGN=TOP> \n");                          print("<TR><TD ALIGN=LEFT VALIGN=TOP>Odabrani su svi rezultati ukoliko niste uèinili nikakav dodatan odabir.</TD><TD ALIGN=RIGHT VALIGN=TOP> \n");
2205                                                    
2206                          if ( $ResultCount > 0 ) {                          if ( $ResultCount > 0 ) {
2207                                                                    
# Line 2280  sub bsDisplaySearchResults { Line 2216  sub bsDisplaySearchResults {
2216                                          if ( $main::ConfigurationData{'allow-relevance-feedback-searches'} eq "yes" ) {                                          if ( $main::ConfigurationData{'allow-relevance-feedback-searches'} eq "yes" ) {
2217                                                  print("<OPTION VALUE=\"GetSearchResults\">Run search with selected documents as relevance feedback\n");                                                  print("<OPTION VALUE=\"GetSearchResults\">Run search with selected documents as relevance feedback\n");
2218                                          }                                          }
2219                                          print("<OPTION VALUE=\"GetSaveSearch\">Saèuvaj rezultate pretra¾ivanja\n");                                          print("<OPTION VALUE=\"GetSaveSearch\">Saèuvaj upit\n");
2220                                          print("<OPTION VALUE=\"GetSaveFolder\">Saèuvaj odabrane rezultate u novi folder\n");                                          print("<OPTION VALUE=\"GetSaveFolder\">Saèuvaj odabrane rezultate u novi folder\n");
2221                                                    
2222                                          # Get the document folder hash                                          # Get the document folder hash
# Line 2416  sub bsDisplaySearchResults { Line 2352  sub bsDisplaySearchResults {
2352    
2353    
2354                  if ( $HTML ) {                  if ( $HTML ) {
2355                          printf("<TR><TD ALIGN=LEFT VALIGN=TOP> Pronaðeno: </TD> <TD ALIGN=LEFT VALIGN=TOP> %s rezultata (Maksimalni broj pode¹en na: $Content{'Max'} )  </TD></TR>\n",                          printf("<TR><TD ALIGN=LEFT VALIGN=TOP> Pronaðeno: </TD> <TD ALIGN=LEFT VALIGN=TOP> <font color=\"#990000\"> %s rezultata </font>(Maksimalni broj pode¹en na: $Content{'Max'} )  </TD></TR>\n",
2356                                          ($ResultCount > 0) ? $ResultCount : "no");                                          ($ResultCount > 0) ? $ResultCount : "no");
2357                                    
2358                          print("</TABLE>\n");                          print("</TABLE>\n");
# Line 2467  sub bsDisplaySearchResults { Line 2403  sub bsDisplaySearchResults {
2403          }          }
2404    
2405    
2406            ### FIX:: ADD SORT HERE
2407          if ( $ResultCount > 0 ) {          if ( $ResultCount > 0 ) {
2408    
2409                  # Loop over each entry in the hits list                  # Loop over each entry in the hits list
# Line 2724  sub bsDisplaySearchResults { Line 2660  sub bsDisplaySearchResults {
2660                          # Put up the headline and the score, this one links to the document                          # Put up the headline and the score, this one links to the document
2661                          if ( $HTML ) {                          if ( $HTML ) {
2662                                  print("<!-- resultItem -->\n");                                  print("<!-- resultItem -->\n");
2663                                  print("<TR><TD ALIGN=LEFT VALIGN=TOP WIDTH=1%> $SelectorText </TD> <TD ALIGN=LEFT VALIGN=TOP WIDTH=1%> <!-- relevance --> <B> $Score </B> <!-- /relevance --> </TD> <TD ALIGN=LEFT VALIGN=TOP> <A HREF=\"$LinkText\" OnMouseOver=\"self.status='Retrieve this document'; return true\"> $Headline <I> ( $main::DatabaseDescriptions{$Database} ) </I> </A> <BR> <FONT SIZE=-2>");                                  #print("<TR><TD ALIGN=LEFT VALIGN=TOP WIDTH=1%> $SelectorText </TD> <TD ALIGN=LEFT VALIGN=TOP WIDTH=1%> <!-- relevance --> <B> $Score </B> <!-- /relevance --> </TD> <TD ALIGN=LEFT VALIGN=TOP> <A HREF=\"$LinkText\" OnMouseOver=\"self.status='Retrieve this document'; return true\"> $Headline <I> ( $main::DatabaseDescriptions{$Database} ) </I> </A> <BR> <FONT SIZE=-2>");
2664                          }                                  # decode some basic html from headline <b> <i>
2665                          else {                                  $Headline =~ s/&lt;(\/?[bi])&gt;/<$1>/g;
2666                                  printf("%3d $Headline ($main::DatabaseDescriptions{$Database})\n", $Score);  
2667                                    print("<TR><TD ALIGN=LEFT VALIGN=TOP WIDTH=1%> $SelectorText </TD><TD ALIGN=LEFT VALIGN=TOP COLSPAN=2> <A HREF=\"$LinkText\" OnMouseOver=\"self.status='Retrieve this document'; return true\"> $Headline </A> <BR> <FONT SIZE=-2>&nbsp;");
2668                            } else {
2669                                    printf("%3d $Headline \n", $Score);
2670                          }                          }
2671    
2672    if (0) { ## don't display description
2673    
2674                          # Put up the summary                          # Put up the summary
2675                          if ( defined($SummaryText) && ($SummaryText ne "") ) {                          if ( defined($SummaryText) && ($SummaryText ne "") ) {
# Line 2746  sub bsDisplaySearchResults { Line 2686  sub bsDisplaySearchResults {
2686                          if ( ! defined($Remainder) ) {                          if ( ! defined($Remainder) ) {
2687                                  if ( $HTML ) {                                  if ( $HTML ) {
2688                                          print("Formatttt: $MimeTypeName, ");                                          print("Formatttt: $MimeTypeName, ");
2689                            
2690                                  }                                  }
2691                                  else {                                  else {
2692                                          print("    Format: $MimeTypeName, ");                                          print("    Format: $MimeTypeName, ");
# Line 2754  sub bsDisplaySearchResults { Line 2695  sub bsDisplaySearchResults {
2695    
2696    
2697                          # Put up the date if we got it                          # Put up the date if we got it
2698                          if ( defined($Date) && ($Date ne "") ) {                           if ( defined($Date) && ($Date ne "") ) {
2699                                  print("Date: $Date");                                  print("Date: $Date");
2700                                                                    
2701                                  # Put up the time if we got it                                  # Put up the time if we got it
2702                                  if ( defined($Time) && ($Time ne "") ) {                                   if ( defined($Time) && ($Time ne "") ) {
2703                                          print(" $Time");                                          print(" $Time");
2704                                  }                                  }
2705                                                                    
# Line 2889  sub bsDisplaySearchResults { Line 2830  sub bsDisplaySearchResults {
2830                                  }                                  }
2831                                  print("\n");                                  print("\n");
2832    
2833    } #if
2834                                  # Finish off the entry                                  # Finish off the entry
2835                                  if ( $HTML ) {                                  if ( $HTML ) {
2836                                          print("</FONT></TD></TR>\n");                                          print("</FONT></TD></TR>\n");
# Line 3003  sub vGetSearch { Line 2945  sub vGetSearch {
2945    
2946    
2947          # Make sure that we send the header          # Make sure that we send the header
2948          $Value = ($ENV{'PATH_INFO'} eq "/GetExpandedSearch") ? "Pretra¾ivanje s vi¹e kriterija" : "Jednostavno pretra¾ivanje";          $Value = ($ENV{'PATH_INFO'} eq "/GetExpandedSearch") ? "Slo¾eno pretra¾ivanje" : "Jednostavno pretra¾ivanje";
2949          &vSendHTMLHeader($Value, undef);  
2950            &vSendHTMLHeader($Value, $main::JavaScript_SetChecked);
2951    
2952          undef(%Value);          undef(%Value);
2953          $Value{'GetSearch'} = "GetSearch";          $Value{'GetSearch'} = "GetSearch";
# Line 3043  sub vGetSearch { Line 2986  sub vGetSearch {
2986    
2987          if ( $ENV{'PATH_INFO'} eq "/GetExpandedSearch" ) {          if ( $ENV{'PATH_INFO'} eq "/GetExpandedSearch" ) {
2988                  print("<INPUT TYPE=HIDDEN NAME=\"Action\" VALUE=\"GetSimpleSearch\">\n");                  print("<INPUT TYPE=HIDDEN NAME=\"Action\" VALUE=\"GetSimpleSearch\">\n");
2989                  print("<INPUT SRC=\"$main::ConfigurationData{'image-base-path'}/$main::ImageNames{'collapse'}\" BORDER=0 TYPE=IMAGE> Kliknite na trokutiæ da biste suzili formu.\n");                  print("<INPUT SRC=\"$main::ConfigurationData{'image-base-path'}/$main::ImageNames{'collapse'}\" BORDER=0 TYPE=IMAGE> Jednostavno pretra¾ivanje (kliknite na trokutiæ)\n");
2990          }          }
2991          else {          else {
2992                  print("<INPUT TYPE=HIDDEN NAME=\"Action\" VALUE=\"GetExpandedSearch\">\n");                  print("<INPUT TYPE=HIDDEN NAME=\"Action\" VALUE=\"GetExpandedSearch\">\n");
2993                  print("<INPUT SRC=\"$main::ConfigurationData{'image-base-path'}/$main::ImageNames{'expand'}\" BORDER=0 TYPE=IMAGE>  Kliknite na trokutiæ da biste pro¹irili formu.\n");                  print("<INPUT SRC=\"$main::ConfigurationData{'image-base-path'}/$main::ImageNames{'expand'}\" BORDER=0 TYPE=IMAGE> Slo¾eno pretra¾ivanje (kliknite na trokutiæ)\n");
2994          }          }
2995          print("</FORM></TD>\n");          print("</FORM></TD>\n");
2996                    
# Line 3055  sub vGetSearch { Line 2998  sub vGetSearch {
2998    
2999          # Send the start of the form and the buttons          # Send the start of the form and the buttons
3000          print("<TD ALIGN=RIGHT VALIGN=TOP>\n");          print("<TD ALIGN=RIGHT VALIGN=TOP>\n");
3001          print("<FORM ACTION=\"$ENV{'SCRIPT_NAME'}/GetSearchResults\" METHOD=POST> <INPUT TYPE=SUBMIT VALUE=\"Pretra¾i bazu\"> <INPUT TYPE=RESET VALUE=\"Pobri¹i polja\">\n");          print("<FORM ACTION=\"$ENV{'SCRIPT_NAME'}/GetSearchResults\" NAME=\"Search\" METHOD=POST> <INPUT TYPE=SUBMIT VALUE=\"Pretra¾i bazu\"> <INPUT TYPE=RESET VALUE=\"Vrati poèetne vrijednosti\">\n");
3002          print("</TD></TR>\n");          print("</TD></TR>\n");
3003    
3004          print("<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=3><BR></TD></TR>\n");          print("<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=3><BR></TD></TR>\n");
# Line 3075  sub vGetSearch { Line 3018  sub vGetSearch {
3018    
3019          for (my $field=1; $field<= $nr_fields; $field++) {          for (my $field=1; $field<= $nr_fields; $field++) {
3020    
3021                  print("<TR><TD ALIGN=LEFT VALIGN=TOP>");                  print "<TR>";
3022                  if ($field == 1 ) {                  if ($field == 1 ) {
3023                          print ("Pretra¾i u odreðenom polju:");                          print "<TD ALIGN=LEFT VALIGN=TOP ROWSPAN=$nr_fields>";
3024                            print "Pretra¾i u odabranom polju:";
3025                            print "</td>";
3026                  }                  }
3027                  print ("</TD><TD ALIGN=RIGHT VALIGN=TOP>");                  print ("<TD ALIGN=RIGHT VALIGN=TOP>");
3028    
3029                  print ("<SELECT NAME=\"FieldName${field}\">");                  print ("<SELECT NAME=\"FieldName${field}\">");
3030                  for (my $i=0; $i<=$#SearchFieldNames; $i++) {                  for (my $i=0; $i<=$#SearchFieldNames; $i++) {
3031                          my $ItemEntry = $SearchFieldNames[$i];                          my $ItemEntry = $SearchFieldNames[$i];
3032                          my $Selected = ($main::FormData{"FieldName${field}"} == $ItemEntry || $i == ($field-1)) ? "SELECTED" : "";                          my $Selected = "";
3033                            if ($main::FormData{"FieldName${field}"} && $main::FormData{"FieldName${field}"} eq $ItemEntry) {
3034                                    $Selected = "SELECTED";
3035                            } elsif ($i == ($field - 1)) {
3036                                    $Selected = "SELECTED";
3037                            }
3038                          print("<OPTION VALUE=\"$ItemEntry\" $Selected> $main::SearchFieldDescriptions{$ItemEntry}\n");                          print("<OPTION VALUE=\"$ItemEntry\" $Selected> $main::SearchFieldDescriptions{$ItemEntry}\n");
3039                  }                  }
3040                  my $Value = defined($main::FormData{"FieldContent${field}"}) ? "VALUE='".$main::FormData{"FieldContent${field}"}."'" : "";                  my $Value = "";
3041                  print("</SELECT></TD><TD ALIGN=LEFT><INPUT NAME=\"FieldContent${field}\" TYPE=TEXT $Value SIZE=45> </TD></TR>\n");                  if (defined($main::FormData{"FieldContent${field}"})) {
3042                            $Value = "VALUE='".$main::FormData{"FieldContent${field}"}."'";
3043                    }
3044                    print("</SELECT></TD><TD ALIGN=LEFT VALIGN=TOP><INPUT NAME=\"FieldContent${field}\" TYPE=TEXT $Value SIZE=45> </TD></TR>\n");
3045          }          }
3046    
3047    
# Line 3102  sub vGetSearch { Line 3055  sub vGetSearch {
3055          print("<OPTION VALUE=\"OR\" $Value> Bilo koju rijeè (OR)\n");          print("<OPTION VALUE=\"OR\" $Value> Bilo koju rijeè (OR)\n");
3056          print("</SELECT> </TD></TR>\n");          print("</SELECT> </TD></TR>\n");
3057    
3058            print "<tr><td align=left valign=top> Prika¾i samo tip graðe: </td><td align=left valign=top colspan=2>";
3059            while (@default::tip_html) {
3060                    print '<input TYPE="checkbox" NAME="tip" VALUE="',nuke_accents(shift @default::tip_html),'" >',shift @default::tip_html,"&nbsp&nbsp;";
3061            }
3062            print "</td></tr>\n";
3063    
3064          print("<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=3><HR WIDTH=50%></TD></TR>\n");          print("<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=3><HR WIDTH=50%></TD></TR>\n");
3065                    
# Line 3110  sub vGetSearch { Line 3068  sub vGetSearch {
3068          # Database selection          # Database selection
3069          if ( %main::DatabaseDescriptions ) {          if ( %main::DatabaseDescriptions ) {
3070    
3071                  print("<TR><TD ALIGN=LEFT VALIGN=TOP COLSPAN=2> Odaberite bazu koju ¾elite pretra¾ivati: </TD> <TD ALIGN=LEFT VALIGN=TOP>\n");                  print("<TR><TD ALIGN=LEFT VALIGN=TOP COLSPAN=2> Odaberite knji¾nicu èiji fond ¾elite pretra¾ivati:</TD></TR>
3072                    <TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=4>
3073                    ");
3074                                    
3075                  # Parse out the database names and put them into a                  # Parse out the database names and put them into a
3076                  # hash table, they should be separated with a '\0'                  # hash table, they should be separated with a '\0'
# Line 3124  sub vGetSearch { Line 3084  sub vGetSearch {
3084                                  @ItemList = split(",", $SelectedDatabases);                                  @ItemList = split(",", $SelectedDatabases);
3085                          }                          }
3086                  }                  }
                 foreach $ItemEntry ( @ItemList ) {  
                         $Value{$ItemEntry} = $ItemEntry;  
                 }  
                   
   
   
                 $Flag = 0;  
                 print("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>\n");  
   
                 my @html_database;  
   
                 foreach my $key ( sort keys %main::DatabaseSort ) {  
                         $DatabaseName = $main::DatabaseSort{$key};  
                         $Value = ((defined($Value{$DatabaseName})) || (scalar(keys(%main::DatabaseDescriptions)) == 1) || !defined($main::RemoteUser) ) ? "CHECKED" : "";  
                         $ItemEntry = &lEncodeURLData($DatabaseName);  
                         if ($main::DatabaseDescriptions{$DatabaseName}) {  
                                 push @html_database,"<TD ALIGN=LEFT VALIGN=TOP><INPUT TYPE=\"checkbox\" NAME=\"Database\" VALUE=\"$DatabaseName\" $Value> <A HREF=\"$ENV{'SCRIPT_NAME'}/GetDatabaseInfo?Database=$ItemEntry\" OnMouseOver=\"self.status='Informacije io bazi $main::DatabaseDescriptions{$DatabaseName} '; return true\"> $main::DatabaseDescriptions{$DatabaseName}  </A> </TD>\n";  
                         } else {  
                                 push @html_database,"<td align=left valign=top>$main::DatabaseDescriptions{$DatabaseName}</td>\n";  
                         }  
                 }  
3087    
3088                    &ShowDatabaseCheckBoxes(@ItemList);
                 if ($main::ConfigurationData{'output-colums'}) {  
                         # create database names in columns  
   
                         my $max = $#html_database+1 ;  
   
                         my $j=0;  
                         for(my $i=0; $i < $max ; $i=$i+2) {  
                                 print("<tr>",$html_database[$j],$html_database[$j+int($max/2)],"</tr>");  
                                 $j++;  
                         }  
   
                 } else {  
                         for(my $i=0; $i <= $#html_database ; $i=$i+1) {  
                                 print("<tr>",$html_database[$i],"</tr>");  
                         }  
                 }  
   
                 print("</TABLE>\n");  
3089    
3090                  print("</TD></TR>\n");                  print("</TD></TR>\n");
3091                                    
# Line 3214  sub vGetSearch { Line 3135  sub vGetSearch {
3135    
3136    
3137                  # Send the end date                  # Send the end date
3138                  print("<TR><TD ALIGN=LEFT VALIGN=TOP COLSPAN=2> Ogranièi na knjige izdane prije godine:: </TD> <TD ALIGN=LEFT VALIGN=TOP> <SELECT NAME=\"Before\">\n");                  print("<TR><TD ALIGN=LEFT VALIGN=TOP COLSPAN=2> Ogranièi na knjige izdane prije godine: </TD> <TD ALIGN=LEFT VALIGN=TOP> <SELECT NAME=\"Before\">\n");
3139                  $Value = (!defined($main::FormData{'Before'})) ? "SELECTED" : "";                  $Value = (!defined($main::FormData{'Before'})) ? "SELECTED" : "";
3140                  print("<OPTION VALUE=\"\" $Value>Bez ogranièenja...\n");                  print("<OPTION VALUE=\"\" $Value>Bez ogranièenja...\n");
3141                                    
# Line 3252  sub vGetSearch { Line 3173  sub vGetSearch {
3173          print("<OPTION VALUE=\"SORT:DATE:DESC\" $Value> Datum - najprije novije\n");          print("<OPTION VALUE=\"SORT:DATE:DESC\" $Value> Datum - najprije novije\n");
3174          $Value = (defined($main::FormData{'Order'}) && ($main::FormData{'Order'} eq "DATEASCSORT")) ? "SELECTED" : "";          $Value = (defined($main::FormData{'Order'}) && ($main::FormData{'Order'} eq "DATEASCSORT")) ? "SELECTED" : "";
3175          print("<OPTION VALUE=\"SORT:DATE:ASC\" $Value> Datum - najprije starije\n");          print("<OPTION VALUE=\"SORT:DATE:ASC\" $Value> Datum - najprije starije\n");
3176    ### FIX:: SORT
3177    #       print("<OPTION VALUE=\"SORT:700+:DESC\"> autor\n");
3178    #       print("<OPTION VALUE=\"SORT:200+:DESC\"> naslov\n");
3179          print("</SELECT> </TD></TR>\n");          print("</SELECT> </TD></TR>\n");
3180    
3181    
3182          print("<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=3><HR WIDTH=50%></TD></TR>\n");          print("<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=3><HR WIDTH=50%></TD></TR>\n");
3183          print("<TR><TD ALIGN=RIGHT COLSPAN=3><INPUT TYPE=SUBMIT VALUE=\"Pretra¾i bazu\"> <INPUT TYPE=RESET VALUE=\"Pobri¹i polja\"></TD></TR>\n");          print("<TR><TD ALIGN=RIGHT COLSPAN=3><INPUT TYPE=SUBMIT VALUE=\"Pretra¾i bazu\"> <INPUT TYPE=RESET VALUE=\"Vrati poèetne vrijednosti\"></TD></TR>\n");
3184    
3185          print("</FORM>\n");          print("</FORM>\n");
3186          print("</TABLE>\n");          print("</TABLE>\n");
# Line 3303  sub vGetSearchResults { Line 3227  sub vGetSearchResults {
3227          my ($DatabaseRelevanceFeedbackFilterKey, $DatabaseRelevanceFeedbackFilterFunction);          my ($DatabaseRelevanceFeedbackFilterKey, $DatabaseRelevanceFeedbackFilterFunction);
3228          my (@Values, %Value, $Value);          my (@Values, %Value, $Value);
3229    
   
           
3230          # Check to see if there are any documents selected, if there are, they need          # Check to see if there are any documents selected, if there are, they need
3231          # to be converted to RF documents before we put up the header, this is because          # to be converted to RF documents before we put up the header, this is because
3232          # the header creates a search link from existing search fields, we also deduplicate          # the header creates a search link from existing search fields, we also deduplicate
# Line 3359  sub vGetSearchResults { Line 3281  sub vGetSearchResults {
3281                  $main::FormData{'Database'} = join("\0", keys(%Databases));                  $main::FormData{'Database'} = join("\0", keys(%Databases));
3282          }          }
3283    
3284            # now add all databases that had to be included always
3285            foreach (my $db = @main::always_selected_databases) {
3286                    $Databases{$db} = $Value{$db};
3287            }
3288    
3289          # Make sure that we send the header          # Make sure that we send the header
3290          &vSendHTMLHeader("Rezultati pretra¾ivanja", undef);          &vSendHTMLHeader("Rezultati pretra¾ivanja", undef);
3291          undef(%Value);          undef(%Value);
3292          &vSendMenuBar(%Value);          &vSendMenuBar(%Value);
3293    
   
3294          # Check that at least one database was selected          # Check that at least one database was selected
3295          if ( !defined($main::FormData{'Database'}) ) {          if ( !defined($main::FormData{'Database'}) && $#main::always_selected_databases < 0 ) {
3296                  print("<H3>Database Search:</H3>\n");                  print("<H3>Pretra¾ivanje baza:</H3>\n");
3297                  print("<H3><CENTER>Sorry, no database(s) were selected for searching.</CENTER></H3>\n");                  print("<H3><CENTER>Niste odabrali knji¾nicu koju ¾elite pretra¾ivati.</CENTER></H3>\n");
3298                  print("<P>\n");                  print("<P>\n");
3299                  print("There needs to be a least one database selected in order to perform the search.\n");                  print("Potrebno je da barem jedna knji¾nica bude odabrana, kako biste mogli pretra¾ivati.\n");
3300                  print("Click <B>'back'</B> on your browser, select at least one database and try again.\n");                  print("Kliknite na <B>'back'</B> u svom browseru, odaberite barem jednu knji¾nicu i poku¹ajte ponovo.\n");
3301                  goto bailFromGetSearchResults;                  goto bailFromGetSearchResults;
3302          }          }
3303    
# Line 3402  sub vGetSearchResults { Line 3326  sub vGetSearchResults {
3326    
3327          # Convert all the '\0' to ','          # Convert all the '\0' to ','
3328          $Databases =~ tr/\0/,/;          $Databases =~ tr/\0/,/;
3329            
3330            # add always selected databases
3331            if (@main::always_selected_databases) {
3332                    $Databases .= ",".join(",",@main::always_selected_databases);
3333            }
3334    
3335          # Add the max doc restriction          # Add the max doc restriction
3336          if ( !defined($main::FormData{'Max'}) ) {          if ( !defined($main::FormData{'Max'}) ) {
3337                  $main::FormData{'Max'} = $main::DefaultMaxDoc;                  $main::FormData{'Max'} = $main::DefaultMaxDoc;
3338          }          }
3339    
           
3340          # Generate the search string          # Generate the search string
3341          $SearchString = &sMakeSearchString(%main::FormData);          $SearchString = &sMakeSearchString(%main::FormData);
3342    
# Line 3820  sub vGetDocument { Line 3747  sub vGetDocument {
3747                  if ( $main::ConfigurationData{'allow-relevance-feedback-searches'} eq "yes" ) {                  if ( $main::ConfigurationData{'allow-relevance-feedback-searches'} eq "yes" ) {
3748                          print("<OPTION VALUE=\"GetSearchResults\">Run search with selected documents as relevance feedback\n");                          print("<OPTION VALUE=\"GetSearchResults\">Run search with selected documents as relevance feedback\n");
3749                  }                  }
3750                  print("<OPTION VALUE=\"GetSaveFolder\">Save selected documents to a new document folder\n");                  print("<OPTION VALUE=\"GetSaveFolder\">Saèuvaj odabrane jedinice u novi folder\n");
3751    
3752                  # Get the document folder hash                  # Get the document folder hash
3753                  %QualifiedDocumentFolders = &hGetDocumentFolders;                  %QualifiedDocumentFolders = &hGetDocumentFolders;
# Line 4046  sub vGetUserSettings { Line 3973  sub vGetUserSettings {
3973    
3974    
3975          # Make sure that we send the header          # Make sure that we send the header
3976          &vSendHTMLHeader("My Settings", undef);          &vSendHTMLHeader("My Settings", $main::JavaScript_SetChecked);
3977          undef(%Value);          undef(%Value);
3978          $Value{'GetUserSettings'} = "GetUserSettings";          $Value{'GetUserSettings'} = "GetUserSettings";
3979          &vSendMenuBar(%Value);          &vSendMenuBar(%Value);
# Line 4084  sub vGetUserSettings { Line 4011  sub vGetUserSettings {
4011          print("<H3> Postavke: </H3>\n");          print("<H3> Postavke: </H3>\n");
4012    
4013          print("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>\n");          print("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>\n");
4014          print("<FORM ACTION=\"$ENV{'SCRIPT_NAME'}/SetUserSettings\" METHOD=POST>\n");          print("<FORM ACTION=\"$ENV{'SCRIPT_NAME'}/SetUserSettings\" NAME=\"Search\" METHOD=POST>\n");
4015                                    
4016          # Send the buttons          # Send the buttons
4017          print("<TR><TD ALIGN=RIGHT VALIGN=TOP COLSPAN=2> <INPUT TYPE=RESET VALUE=\"Pobri¹i polja\"> <INPUT TYPE=SUBMIT VALUE=\"Saèuvaj postavke\"> </TD></TR>\n");          print("<TR><TD ALIGN=RIGHT VALIGN=TOP COLSPAN=2> <INPUT TYPE=SUBMIT VALUE=\"Saèuvaj postavke\">  <INPUT TYPE=RESET VALUE=\"Vrati poèetne vrijednosti\"> </TD></TR>\n");
4018                    
4019                    
4020    
# Line 4119  sub vGetUserSettings { Line 4046  sub vGetUserSettings {
4046    
4047          print("<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=2><HR WIDTH=50%></TD></TR>\n");            print("<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=2><HR WIDTH=50%></TD></TR>\n");  
4048                    
4049          print("<TR><TD ALIGN=LEFT VALIGN=TOP COLSPAN=2> <B> Search Preferences: </B> </TD></TR>\n");          print("<TR><TD ALIGN=LEFT VALIGN=TOP COLSPAN=2> <B> Postavke pretra¾ivanja: </B> </TD></TR>\n");
4050    
4051          # Send a pull-down which allows the user to select which search form to default to          # Send a pull-down which allows the user to select which search form to default to
4052          print("<TR><TD ALIGN=LEFT VALIGN=TOP> Forma za pretra¾ivanje: </TD> <TD ALIGN=LEFT VALIGN=TOP> <SELECT NAME=\"DefaultSearch\">\n");          print("<TR><TD ALIGN=LEFT VALIGN=TOP> Forma za pretra¾ivanje: </TD> <TD ALIGN=LEFT VALIGN=TOP> <SELECT NAME=\"DefaultSearch\">\n");
4053          $Value = (defined($DefaultSearch) && ($DefaultSearch eq "Simple")) ? "SELECTED" : "";          $Value = (defined($DefaultSearch) && ($DefaultSearch eq "Simple")) ? "SELECTED" : "";
4054          print("<OPTION VALUE=\"Simple\" $Value> Jednostavna forma za pretra¾ivanje\n");          print("<OPTION VALUE=\"Simple\" $Value>Forma za jednostavno pretra¾ivanje\n");
4055          $Value = (defined($DefaultSearch) && ($DefaultSearch eq "Expanded")) ? "SELECTED" : "";          $Value = (defined($DefaultSearch) && ($DefaultSearch eq "Expanded")) ? "SELECTED" : "";
4056          print("<OPTION VALUE=\"Expanded\" $Value>Forma za pretra¾ivanje s vi¹e kriterija\n");          print("<OPTION VALUE=\"Expanded\" $Value>Forma za slo¾eno pretra¾ivanje\n");
4057          print("</SELECT> </TD></TR>\n");          print("</SELECT> </TD></TR>\n");
4058    
4059          # Send a pull-down which allows the user to select how many previous searches to store          # Send a pull-down which allows the user to select how many previous searches to store
# Line 4146  sub vGetUserSettings { Line 4073  sub vGetUserSettings {
4073    
4074                  print("<TR><TD ALIGN=LEFT VALIGN=TOP COLSPAN=2> <B> Odabrane baze: </B> </TD></TR>\n");                  print("<TR><TD ALIGN=LEFT VALIGN=TOP COLSPAN=2> <B> Odabrane baze: </B> </TD></TR>\n");
4075    
4076                  print("<TR><TD ALIGN=LEFT VALIGN=TOP> Oznaèite baze koje uvijek ¾elite pretra¾ivati: </TD> <TD ALIGN=LEFT VALIGN=TOP>\n");                  print("<TR><TD ALIGN=LEFT VALIGN=TOP COLSPAN=2> Oznaèite knji¾nice koje uvijek ¾elite pretra¾ivati:</TD></TR><TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=2>\n");
4077                                    
4078                  # Parse out the database names and put them into a                  # Parse out the database names and put them into a
4079                  # hash table, they should be separated with a '\n'                  # hash table, they should be separated with a '\n'
                 undef(%Value);  
4080                  if ( defined($SelectedDatabases) && ($SelectedDatabases ne "") ) {                  if ( defined($SelectedDatabases) && ($SelectedDatabases ne "") ) {
4081                          @ItemList = split(",", $SelectedDatabases);                          @ItemList = split(",", $SelectedDatabases);
                         foreach $ItemEntry ( @ItemList ) {  
                                 $Value{$ItemEntry} = $ItemEntry;  
                         }  
                 }  
                   
                 $Flag = 0;  
                 print("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%\n");  
                   
                 foreach $DatabaseName ( sort(keys(%main::DatabaseDescriptions)) ) {  
                           
                         if ( $Flag == 0 ) {  
                                 print("<TR>");  
                         }  
                           
                         $Value = ((defined($Value{$DatabaseName})) || (scalar(keys(%main::DatabaseDescriptions)) == 1)) ? "CHECKED" : "";  
                         $ItemEntry = &lEncodeURLData($DatabaseName);  
                         print("<TD ALIGN=LEFT VALIGN=TOP><INPUT TYPE=\"checkbox\" NAME=\"SelectedDatabases\" VALUE=\"$DatabaseName\" $Value> <A HREF=\"$ENV{'SCRIPT_NAME'}/GetDatabaseInfo?Database=$ItemEntry\" OnMouseOver=\"self.status='Get Information about the $main::DatabaseDescriptions{$DatabaseName} database'; return true\">  $main::DatabaseDescriptions{$DatabaseName} </A></TD>\n");  
                           
                         if ( $Flag == 1 ) {  
                                 print("</TR>");  
                                 $Flag = 0;  
                         }  
                         else {  
                                 $Flag = 1;  
                         }  
4082                  }                  }
4083                  print("</TABLE>\n");  
4084                    &ShowDatabaseCheckBoxes(@ItemList);
4085            
4086                  print("</TD></TR>\n");                  print("</TD></TR>\n");
4087          }          }
4088    
# Line 4208  sub vGetUserSettings { Line 4111  sub vGetUserSettings {
4111          }          }
4112    
4113    
4114          print("<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=2><HR WIDTH=50%></TD></TR>\n");  #       print("<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=2><HR WIDTH=50%></TD></TR>\n");
4115                    
4116          print("<TR><TD ALIGN=LEFT VALIGN=TOP COLSPAN=2> <B> Document Retrieval Preferences: </B> </TD></TR>\n");  #       print("<TR><TD ALIGN=LEFT VALIGN=TOP COLSPAN=2> <B> Document Retrieval Preferences: </B> </TD></TR>\n");
4117    
4118          # Send a pull-down which allows the user to select whether to display summaries or not, and how long we want them          # Send a pull-down which allows the user to select whether to display summaries or not, and how long we want them
4119          if ( defined($main::ConfigurationData{'allow-similiar-search'}) && ($main::ConfigurationData{'allow-similiar-search'} eq "yes") ) {          if ( defined($main::ConfigurationData{'allow-similiar-search'}) && ($main::ConfigurationData{'allow-similiar-search'} eq "yes") ) {
# Line 4231  sub vGetUserSettings { Line 4134  sub vGetUserSettings {
4134    
4135                  print("<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=2><HR WIDTH=50%></TD></TR>\n");                  print("<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=2><HR WIDTH=50%></TD></TR>\n");
4136    
4137                  print("<TR><TD ALIGN=LEFT VALIGN=TOP COLSPAN=2> <B> Saved Searches Defaults: </B> </TD></TR>\n");                  print("<TR><TD ALIGN=LEFT VALIGN=TOP COLSPAN=2> <B> Postavke saèuvanih upita: </B> </TD></TR>\n");
4138    
4139                  # Send a pull-down which allows the user to select the automatic search frequency (default to weekly)                  # Send a pull-down which allows the user to select the automatic search frequency (default to weekly)
4140                  print("<TR><TD ALIGN=LEFT VALIGN=TOP> Saved search frequency: </TD> <TD ALIGN=LEFT VALIGN=TOP> <SELECT NAME=\"SearchFrequency\">\n");                  print("<TR><TD ALIGN=LEFT VALIGN=TOP> Frekvencija pretra¾ivanja: </TD> <TD ALIGN=LEFT VALIGN=TOP> <SELECT NAME=\"SearchFrequency\">\n");
4141                  foreach $ItemEntry ( @main::SearchFrequencies ) {                  foreach $ItemEntry ( @main::SearchFrequencies ) {
4142                          $Value = (defined($SearchFrequency) && ($SearchFrequency eq $ItemEntry)) ? "SELECTED" : "";                          $Value = (defined($SearchFrequency) && ($SearchFrequency eq $ItemEntry)) ? "SELECTED" : "";
4143                          print("<OPTION VALUE=\"$ItemEntry\" $Value> $ItemEntry \n");                          print("<OPTION VALUE=\"$ItemEntry\" $Value> $ItemEntry \n");
# Line 4242  sub vGetUserSettings { Line 4145  sub vGetUserSettings {
4145                  print("</SELECT> </TD></TR>\n");                  print("</SELECT> </TD></TR>\n");
4146    
4147                  # Send a pull-down which allows the user to select the automatic search  delivery format                  # Send a pull-down which allows the user to select the automatic search  delivery format
4148                  print("<TR><TD ALIGN=LEFT VALIGN=TOP> Saved search delivery format: </TD> <TD ALIGN=LEFT VALIGN=TOP> <SELECT NAME=\"DeliveryFormat\">\n");                  print("<TR><TD ALIGN=LEFT VALIGN=TOP> Format za isporuku rezultata: </TD> <TD ALIGN=LEFT VALIGN=TOP> <SELECT NAME=\"DeliveryFormat\">\n");
4149                  foreach $ItemEntry ( sort(keys(%main::DeliveryFormats)) ) {                  foreach $ItemEntry ( sort(keys(%main::DeliveryFormats)) ) {
4150                          $Value = (defined($DeliveryFormat) && ($DeliveryFormat eq  $ItemEntry)) ? "SELECTED" : "";                          $Value = (defined($DeliveryFormat) && ($DeliveryFormat eq  $ItemEntry)) ? "SELECTED" : "";
4151                          print("<OPTION VALUE=\"$ItemEntry\" $Value> $main::DeliveryFormats{$ItemEntry}\n");                          print("<OPTION VALUE=\"$ItemEntry\" $Value> $main::DeliveryFormats{$ItemEntry}\n");
# Line 4250  sub vGetUserSettings { Line 4153  sub vGetUserSettings {
4153                  print("</SELECT> </TD></TR>\n");                  print("</SELECT> </TD></TR>\n");
4154    
4155                  # Send a pull-down which allows the user to select the automatic delivery method                  # Send a pull-down which allows the user to select the automatic delivery method
4156                  print("<TR><TD ALIGN=LEFT VALIGN=TOP> Saved search delivery method: </TD> <TD ALIGN=LEFT VALIGN=TOP> <SELECT NAME=\"DeliveryMethod\">\n");                  print("<TR><TD ALIGN=LEFT VALIGN=TOP> Metoda isporuke rezultata: </TD> <TD ALIGN=LEFT VALIGN=TOP> <SELECT NAME=\"DeliveryMethod\">\n");
4157                  foreach $ItemEntry ( sort(keys(%main::DeliveryMethods)) ) {                  foreach $ItemEntry ( sort(keys(%main::DeliveryMethods)) ) {
4158                          $Value = (defined($DeliveryMethod) && ($DeliveryMethod eq  $ItemEntry)) ? "SELECTED" : "";                          $Value = (defined($DeliveryMethod) && ($DeliveryMethod eq  $ItemEntry)) ? "SELECTED" : "";
4159                          print("<OPTION VALUE=\"$ItemEntry\" $Value> $main::DeliveryMethods{$ItemEntry}\n");                          print("<OPTION VALUE=\"$ItemEntry\" $Value> $main::DeliveryMethods{$ItemEntry}\n");
# Line 4323  sub vSetUserSettings { Line 4226  sub vSetUserSettings {
4226          $Value{'UserName'} = $main::FormData{'UserName'};          $Value{'UserName'} = $main::FormData{'UserName'};
4227          $Value{'EmailAddress'} = $main::FormData{'EmailAddress'};          $Value{'EmailAddress'} = $main::FormData{'EmailAddress'};
4228          $Value{'DefaultSearch'} = $main::FormData{'DefaultSearch'};          $Value{'DefaultSearch'} = $main::FormData{'DefaultSearch'};
4229          $Value{'SelectedDatabases'} = $main::FormData{'SelectedDatabases'};          $Value{'SelectedDatabases'} = $main::FormData{'Database'};
4230          if ( defined($Value{'SelectedDatabases'}) ) {          if ( defined($Value{'SelectedDatabases'}) ) {
4231                  $Value{'SelectedDatabases'} =~ s/\0/,/g;                  $Value{'SelectedDatabases'} =~ s/\0/,/g;
4232          }          }
# Line 4751  sub vGetSaveSearch { Line 4654  sub vGetSaveSearch {
4654                    
4655    
4656          # Give the user a form to fill out          # Give the user a form to fill out
4657          print("<H3> Saving a search: </H3>\n");          print("<H3> Èuvanje upita: </H3>\n");
4658    
4659    
4660    
# Line 4771  sub vGetSaveSearch { Line 4674  sub vGetSaveSearch {
4674          print("<FORM ACTION=\"$ENV{'SCRIPT_NAME'}/SetSaveSearch\" onSubmit=\"return checkForm(this)\" METHOD=POST>\n");          print("<FORM ACTION=\"$ENV{'SCRIPT_NAME'}/SetSaveSearch\" onSubmit=\"return checkForm(this)\" METHOD=POST>\n");
4675    
4676          # Send the buttons          # Send the buttons
4677          print("<TR><TD ALIGN=RIGHT VALIGN=TOP COLSPAN=2> <INPUT TYPE=RESET VALUE=\"Pobri¹i polja\"> <INPUT TYPE=SUBMIT VALUE=\"Save this Search\"> </TD></TR>\n");          print("<TR><TD ALIGN=RIGHT VALIGN=TOP COLSPAN=2>  <INPUT TYPE=SUBMIT VALUE=\"Saèuvaj upit\"> <INPUT TYPE=RESET VALUE=\"Vrati poèetne vrijednosti\"></TD></TR>\n");
4678    
4679          print("<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=2><HR WIDTH=50%></TD></TR>\n");          print("<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=2><HR WIDTH=50%></TD></TR>\n");
4680    
# Line 4804  sub vGetSaveSearch { Line 4707  sub vGetSaveSearch {
4707          print("<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=2><HR WIDTH=50%></TD></TR>\n");          print("<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=2><HR WIDTH=50%></TD></TR>\n");
4708    
4709          # Send the search name and search description fields          # Send the search name and search description fields
4710          print("<TR><TD ALIGN=LEFT VALIGN=TOP> Search Name (required): </TD> <TD ALIGN=LEFT VALIGN=TOP> <INPUT NAME=\"SearchName\" TYPE=TEXT SIZE=45> </TD></TR>\n");          print("<TR><TD ALIGN=LEFT VALIGN=TOP> Naziv (obavezno): </TD> <TD ALIGN=LEFT VALIGN=TOP> <INPUT NAME=\"SearchName\" TYPE=TEXT SIZE=45> </TD></TR>\n");
4711    
4712          print("<TR><TD ALIGN=LEFT VALIGN=TOP> Search Description: </TD> <TD ALIGN=LEFT VALIGN=TOP> <TEXTAREA INPUT NAME=\"SearchDescription\" COLS=45 ROWS=6 WRAP=VIRTUAL></TEXTAREA> </TD></TR>\n");          print("<TR><TD ALIGN=LEFT VALIGN=TOP> Opis: </TD> <TD ALIGN=LEFT VALIGN=TOP> <TEXTAREA INPUT NAME=\"SearchDescription\" COLS=45 ROWS=6 WRAP=VIRTUAL></TEXTAREA> </TD></TR>\n");
4713    
4714          if ( defined($main::FormData{'RfDocument'}) ) {          if ( defined($main::FormData{'RfDocument'}) ) {
4715                  print("<TR>\n");                  print("<TR>\n");
# Line 4817  sub vGetSaveSearch { Line 4720  sub vGetSaveSearch {
4720    
4721          print("<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=2><HR WIDTH=50%></TD></TR>\n");          print("<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=2><HR WIDTH=50%></TD></TR>\n");
4722    
4723          print("<TR><TD ALIGN=LEFT VALIGN=TOP> Kliknite na ovaj kvadratiæ ako ¾elite postojeæi folder s istim imenom zamijeniti ovim novim: </TD> <TD ALIGN=LEFT VALIGN=TOP><INPUT TYPE=\"checkbox\" NAME=\"OverWrite\" VALUE=\"yes\"> </TD></TR>\n");          print("<TR><TD ALIGN=LEFT VALIGN=TOP> Kliknite na ovaj kvadratiæ ako ¾elite postojeæi upit s istim imenom zamijeniti ovim novim: </TD> <TD ALIGN=LEFT VALIGN=TOP><INPUT TYPE=\"checkbox\" NAME=\"OverWrite\" VALUE=\"yes\"> </TD></TR>\n");
4724                    
4725                    
4726                    
# Line 4826  sub vGetSaveSearch { Line 4729  sub vGetSaveSearch {
4729                    
4730                  print("<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=2><HR WIDTH=50%></TD></TR>\n");                  print("<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=2><HR WIDTH=50%></TD></TR>\n");
4731    
4732                  print("<TR><TD ALIGN=LEFT VALIGN=TOP> Check to run this search on a regular basis: </TD> <TD ALIGN=LEFT VALIGN=TOP> <INPUT TYPE=CHECKBOX VALUE=\"yes\" NAME=\"Regular\"> </TD></TR>\n");                  print("<TR><TD ALIGN=LEFT VALIGN=TOP> Kliknite ovaj kvadratiæ ukoliko ¾elite automatsko periodièko pretra¾ivanje po ovom upitu: </TD> <TD ALIGN=LEFT VALIGN=TOP> <INPUT TYPE=CHECKBOX VALUE=\"yes\" NAME=\"Regular\"> </TD></TR>\n");
4733    
4734                  # Send a pull-down which allows the user to select the automatic search frequency                  # Send a pull-down which allows the user to select the automatic search frequency
4735                  print("<TR><TD ALIGN=LEFT VALIGN=TOP> Select the search frequency: </TD> <TD ALIGN=LEFT VALIGN=TOP> <SELECT NAME=\"SearchFrequency\">\n");                  print("<TR><TD ALIGN=LEFT VALIGN=TOP> Odaberite frekvenciju automatskog pretra¾ivanja: </TD> <TD ALIGN=LEFT VALIGN=TOP> <SELECT NAME=\"SearchFrequency\">\n");
4736                  foreach $ValueEntry ( @main::SearchFrequencies ) {                  foreach $ValueEntry ( @main::SearchFrequencies ) {
4737                          $Value = (defined($SearchFrequency) && ($SearchFrequency eq $ValueEntry)) ? "SELECTED" : "";                          $Value = (defined($SearchFrequency) && ($SearchFrequency eq $ValueEntry)) ? "SELECTED" : "";
4738                          print("<OPTION VALUE=\"$ValueEntry\" $Value> $ValueEntry \n");                          print("<OPTION VALUE=\"$ValueEntry\" $Value> $ValueEntry \n");
# Line 4837  sub vGetSaveSearch { Line 4740  sub vGetSaveSearch {
4740                  print("</SELECT> </TD></TR>\n");                  print("</SELECT> </TD></TR>\n");
4741    
4742                  # Send a pull-down which allows the user to select the automatic search delivery format                  # Send a pull-down which allows the user to select the automatic search delivery format
4743                  print("<TR><TD ALIGN=LEFT VALIGN=TOP> Select the delivery format: </TD> <TD ALIGN=LEFT VALIGN=TOP> <SELECT NAME=\"DeliveryFormat\">\n");                  print("<TR><TD ALIGN=LEFT VALIGN=TOP> Odaberite format za isporuku rezultata pretra¾ivanja: </TD> <TD ALIGN=LEFT VALIGN=TOP> <SELECT NAME=\"DeliveryFormat\">\n");
4744                  foreach $ValueEntry ( sort(keys(%main::DeliveryFormats)) ) {                  foreach $ValueEntry ( sort(keys(%main::DeliveryFormats)) ) {
4745                          $Value = (defined($DeliveryFormat) && ($DeliveryFormat eq  $ValueEntry)) ? "SELECTED" : "";                          $Value = (defined($DeliveryFormat) && ($DeliveryFormat eq  $ValueEntry)) ? "SELECTED" : "";
4746                          print("<OPTION VALUE=\"$ValueEntry\" $Value> $main::DeliveryFormats{$ValueEntry}\n");                          print("<OPTION VALUE=\"$ValueEntry\" $Value> $main::DeliveryFormats{$ValueEntry}\n");
# Line 4845  sub vGetSaveSearch { Line 4748  sub vGetSaveSearch {
4748                  print("</SELECT> </TD></TR>\n");                  print("</SELECT> </TD></TR>\n");
4749    
4750                  # Send a pull-down which allows the user to select the automatic search delivery method                  # Send a pull-down which allows the user to select the automatic search delivery method
4751                  print("<TR><TD ALIGN=LEFT VALIGN=TOP> Select the delivery method: </TD> <TD ALIGN=LEFT VALIGN=TOP> <SELECT NAME=\"DeliveryMethod\">\n");                  print("<TR><TD ALIGN=LEFT VALIGN=TOP> Odaberite metodu isporuke: </TD> <TD ALIGN=LEFT VALIGN=TOP> <SELECT NAME=\"DeliveryMethod\">\n");
4752                  foreach $ValueEntry ( sort(keys(%main::DeliveryMethods)) ) {                  foreach $ValueEntry ( sort(keys(%main::DeliveryMethods)) ) {
4753                          $Value = (defined($DeliveryMethod) && ($DeliveryMethod eq  $ValueEntry)) ? "SELECTED" : "";                          $Value = (defined($DeliveryMethod) && ($DeliveryMethod eq  $ValueEntry)) ? "SELECTED" : "";
4754                          print("<OPTION VALUE=\"$ValueEntry\" $Value> $main::DeliveryMethods{$ValueEntry}\n");                          print("<OPTION VALUE=\"$ValueEntry\" $Value> $main::DeliveryMethods{$ValueEntry}\n");
# Line 4966  sub vSetSaveSearch { Line 4869  sub vSetSaveSearch {
4869                          && !(defined($main::FormData{'OverWrite'}) && ($main::FormData{'OverWrite'} eq "yes")) ) {                          && !(defined($main::FormData{'OverWrite'}) && ($main::FormData{'OverWrite'} eq "yes")) ) {
4870    
4871                  # There is already a saved search with this name, so we suggest corrective action to the user.                  # There is already a saved search with this name, so we suggest corrective action to the user.
4872                  print("<H3> Saving a Search: </H3>\n");                  print("<H3> Èuvanje upita: </H3>\n");
4873                  print("<H3><CENTER> Sorry, there is already a saved search with this name. </CENTER></H3>\n");                  print("<H3><CENTER> Veæ postoji upit pod ovim imenom. </CENTER></H3>\n");
4874                  print("<P>\n");                  print("<P>\n");
4875                  print("Click <B>'back'</B> on your browser, change the <B>'search name'</B> and try again, \n");                  print("Kliknite <B>'back'</B> u browseru, promijenite <B>'Naziv'</B> i poku¹ajte ponovo, \n");
4876                  print("alternatively you can check the box which allows you to automatically over-write a saved search with the same name.\n");                  print("ili kliknuti na kvadratiæ koji vam omoguæava da automatski presnimite saèuvani upit s istim imenom.\n");
4877                  print("<P>\n");                  print("<P>\n");
4878    
4879                  goto bailFromSetSaveSearch;                  goto bailFromSetSaveSearch;
# Line 4984  sub vSetSaveSearch { Line 4887  sub vSetSaveSearch {
4887          if ( !defined($Value) && (defined($main::FormData{'Regular'}) && ($main::FormData{'Regular'} eq "yes")) ) {          if ( !defined($Value) && (defined($main::FormData{'Regular'}) && ($main::FormData{'Regular'} eq "yes")) ) {
4888                                    
4889                  # Regular delivery was requested, but the email address was not specified in the settings                  # Regular delivery was requested, but the email address was not specified in the settings
4890                  print("<H3> Saving a Search: </H3>\n");                  print("<H3> Èuvanje upita: </H3>\n");
4891                  print("<H3><CENTER> Sorry, your email address is not specified in your settings. </CENTER></H3>\n");                  print("<H3><CENTER> E-mail adresa nije specificirana u va¹im postavkama. </CENTER></H3>\n");
4892                  print("<P>\n");                  print("<P>\n");
4893                  print("You need to specify your email address in your settings if you want this search to run on a regular basis, \n");                  print("Potrebno je specificirati e-mail adresu ukoliko ¾elite da se pretra¾ivanje po ovom upitu odvije periodièno. \n");
4894                  print("without your email address, we are not able to send you the search result. <P>\n");                  print("bez e-mail adrese, nismo vam u moguænosti isporuèiti rezultate. <P>\n");
4895                  print("Click the <B>'Settings'</B> option from the menu sidebar, fill in your email address and save the settings, \n");                  print("Kliknite na <B>'Korisnièke postavke'</B>, upi¹ite e-mail adresu i saèuvajte postavke, \n");
4896                  print("then click <B>'back'</B> on your browser three times to go back to the form which allows you to save a search.\n");                  print("nakon toga kliknite na <B>'back'</B> u svom browseru tri puta kako biste se vratili na formu koja vam nudi da saèuvate upit.\n");
4897                  print("<P>\n");                  print("<P>\n");
4898    
4899                  goto bailFromSetSaveSearch;                  goto bailFromSetSaveSearch;
# Line 5117  sub vListSavedSearch { Line 5020  sub vListSavedSearch {
5020    
5021    
5022          # Print out the saved searches          # Print out the saved searches
5023          print("<H3> Saèuvana pretra¾ivanja: </H3>\n");          print("<H3> Saèuvani upiti: </H3>\n");
5024                    
5025    
5026    
# Line 5133  sub vListSavedSearch { Line 5036  sub vListSavedSearch {
5036                    
5037                  print("<TR><TD ALIGN=RIGHT VALIGN=TOP COLSPAN=3> \n");                  print("<TR><TD ALIGN=RIGHT VALIGN=TOP COLSPAN=3> \n");
5038                  print("<SELECT NAME=\"Action\">\n");                  print("<SELECT NAME=\"Action\">\n");
5039                  print("<OPTION VALUE=\"ActivateSavedSearch\">Aktiviraj oznaèena saèuvana pretra¾ivanja\n");                  print("<OPTION VALUE=\"ActivateSavedSearch\">Ukljuèi periodièno automatsko pretra¾ivanje po odabranim upitima\n");
5040                  print("<OPTION VALUE=\"SuspendSavedSearch\">Stavi u mirovanje oznaèena saèuvana pretra¾ivanja\n");                  print("<OPTION VALUE=\"SuspendSavedSearch\">Iskljuèi periodièno automatsko pretra¾ivanje po odabranim upitima\n");
5041                  print("<OPTION VALUE=\"DeleteSavedSearch\">Obri¹i oznaèena saèuvana pretra¾ivanja\n");                  print("<OPTION VALUE=\"DeleteSavedSearch\">Obri¹i oznaèene saèuvane upite\n");
5042                  print("</SELECT>\n");                  print("</SELECT>\n");
5043                  print("<INPUT TYPE=SUBMIT VALUE=\"Do It!\">\n");                  print("<INPUT TYPE=SUBMIT VALUE=\"Do It!\">\n");
5044                  print("</TD></TR>\n");                  print("</TD></TR>\n");
# Line 5212  sub vListSavedSearch { Line 5115  sub vListSavedSearch {
5115    
5116                                                    
5117                          if ( defined($SearchFrequency) || defined($DeliveryFormat) || defined($DeliveryMethod) ) {                          if ( defined($SearchFrequency) || defined($DeliveryFormat) || defined($DeliveryMethod) ) {
5118                                  print("<TR><TD></TD><TD ALIGN=LEFT VALIGN=TOP> Run: </TD> <TD ALIGN=LEFT VALIGN=TOP> $SearchFrequency </TD></TR>\n");                                  print("<TR><TD></TD><TD ALIGN=LEFT VALIGN=TOP NOWRAP> Automatsko pokretanje: </TD> <TD ALIGN=LEFT VALIGN=TOP> $SearchFrequency </TD></TR>\n");
5119                                  print("<TR><TD></TD><TD ALIGN=LEFT VALIGN=TOP> Delivery format: </TD> <TD ALIGN=LEFT VALIGN=TOP> $main::DeliveryFormats{$DeliveryFormat} </TD></TR>\n");                                  print("<TR><TD></TD><TD ALIGN=LEFT VALIGN=TOP> Format isporuke: </TD> <TD ALIGN=LEFT VALIGN=TOP> $main::DeliveryFormats{$DeliveryFormat} </TD></TR>\n");
5120                                  print("<TR><TD></TD><TD ALIGN=LEFT VALIGN=TOP> Delivery method : </TD> <TD ALIGN=LEFT VALIGN=TOP> $main::DeliveryMethods{$DeliveryMethod} </TD></TR>\n");                                  print("<TR><TD></TD><TD ALIGN=LEFT VALIGN=TOP> Methoda isporuke: </TD> <TD ALIGN=LEFT VALIGN=TOP> $main::DeliveryMethods{$DeliveryMethod} </TD></TR>\n");
5121                          }                          }
5122                                                    
5123                          $Value = &sGetPrintableDateFromTime($CreationTime);                          $Value = &sGetPrintableDateFromTime($CreationTime);
5124                          print("<TR><TD></TD><TD ALIGN=LEFT VALIGN=TOP> Datum kreiranja: </TD> <TD ALIGN=LEFT VALIGN=TOP> $Value </TD></TR>\n");                          print("<TR><TD></TD><TD ALIGN=LEFT VALIGN=TOP NOWRAP> Datum kreiranja: </TD> <TD ALIGN=LEFT VALIGN=TOP> $Value </TD></TR>\n");
5125    
5126                                                    
5127                          if ( defined($SearchFrequency) || defined($DeliveryFormat) || defined($DeliveryMethod) ) {                          if ( defined($SearchFrequency) || defined($DeliveryFormat) || defined($DeliveryMethod) ) {
5128    
5129                                  if ( defined($LastRunTime) ) {                                  if ( defined($LastRunTime) ) {
5130                                          $Value = &sGetPrintableDateFromTime($LastRunTime);                                          $Value = &sGetPrintableDateFromTime($LastRunTime);
5131                                          print("<TR><TD></TD><TD ALIGN=LEFT VALIGN=TOP> Last Run: </TD> <TD ALIGN=LEFT VALIGN=TOP> $Value </TD></TR>\n");                                          print("<TR><TD></TD><TD ALIGN=LEFT VALIGN=TOP NOWRAP> Zadnje pokretanje: </TD> <TD ALIGN=LEFT VALIGN=TOP> $Value </TD></TR>\n");
5132                                  }                                  }
5133    
5134                                  printf("<TR><TD></TD><TD ALIGN=LEFT VALIGN=TOP> Status: </TD> <TD ALIGN=LEFT VALIGN=TOP> %s </TD></TR>",                                  printf("<TR><TD></TD><TD ALIGN=LEFT VALIGN=TOP> Status: </TD> <TD ALIGN=LEFT VALIGN=TOP> %s </TD></TR>",
# Line 5233  sub vListSavedSearch { Line 5136  sub vListSavedSearch {
5136    
5137                          }                          }
5138                                    
5139                          print("<TR><TD ALIGN=LEFT VALIGN=TOP></TD><TD ALIGN=LEFT VALIGN=TOP></TD> <TD ALIGN=LEFT VALIGN=TOP> <A HREF=\"$ENV{'SCRIPT_NAME'}/GetSavedSearch?SavedSearchObject=$SavedSearchEntry\" OnMouseOver=\"self.status='Display the search form with this search'; return true\"> [ Otvori formu za pretra¾ivanje s upisanim ovim pretra¾ivanjem ] </A> </TD></TR>\n");                          print("<TR><TD ALIGN=LEFT VALIGN=TOP></TD><TD ALIGN=LEFT VALIGN=TOP></TD> <TD ALIGN=LEFT VALIGN=TOP> <A HREF=\"$ENV{'SCRIPT_NAME'}/GetSavedSearch?SavedSearchObject=$SavedSearchEntry\" OnMouseOver=\"self.status='Display the search form with this search'; return true\"> [ Otvori formu za pretra¾ivanje s upisanim ovim upitom ] </A> </TD></TR>\n");
5140                  }                  }
5141                                    
5142                  print("</FORM></TABLE>\n");                  print("</FORM></TABLE>\n");
5143          }          }
5144          else {          else {
5145                  print("<H3><CENTER> Sorry, currently, there are no saved searches. </CENTER></H3>\n");                  print("<H3><CENTER> Trenutno nemate saèuvanih upita!. </CENTER></H3>\n");
5146          }          }
5147                    
5148                    
# Line 5370  sub vProcessSavedSearch { Line 5273  sub vProcessSavedSearch {
5273                    
5274          # Set the title          # Set the title
5275          if ( $ENV{'PATH_INFO'} eq "/DeleteSavedSearch" ) {          if ( $ENV{'PATH_INFO'} eq "/DeleteSavedSearch" ) {
5276                  $Title = "Obri¹i saèuvana pretra¾ivanja";                  $Title = "Brisanje saèuvanih pretra¾ivanja";
5277          }          }
5278          elsif ( $ENV{'PATH_INFO'} eq "/ActivateSavedSearch" ) {          elsif ( $ENV{'PATH_INFO'} eq "/ActivateSavedSearch" ) {
5279                  $Title = "Aktiviraj saèuvana pretra¾ivanja";                  $Title = "Ukljuèivanje automatskog periodiènog pretra¾ivanja";
5280          }          }
5281          elsif ( $ENV{'PATH_INFO'} eq "/SuspendSavedSearch" ) {          elsif ( $ENV{'PATH_INFO'} eq "/SuspendSavedSearch" ) {
5282                  $Title = "Stavi u mirovanje saèuvana pretra¾ivanja";                  $Title = "Iskljuèivanje automatskog periodiènog pretra¾ivanja";
5283          }          }
5284                    
5285                    
# Line 5391  sub vProcessSavedSearch { Line 5294  sub vProcessSavedSearch {
5294          # Check to see if the saved search object is defined          # Check to see if the saved search object is defined
5295          if ( ! defined($main::FormData{'SavedSearchObject'}) ) {          if ( ! defined($main::FormData{'SavedSearchObject'}) ) {
5296                  # Could not find the saved search object                  # Could not find the saved search object
5297                  print("<H3><CENTER> Sorry, no searches were selected. </CENTER></H3>\n");                  print("<H3><CENTER>Niste odabrali niti jedan upit. </CENTER></H3>\n");
5298                  print("<P>\n");                  print("<P>\n");
5299                  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");
5300                  print("<P>\n");                  print("<P>\n");
5301                  goto bailFromProcessSavedSearch;                  goto bailFromProcessSavedSearch;
5302          }          }
# Line 5422  sub vProcessSavedSearch { Line 5325  sub vProcessSavedSearch {
5325    
5326                  if ( $ENV{'PATH_INFO'} eq "/DeleteSavedSearch" ) {                  if ( $ENV{'PATH_INFO'} eq "/DeleteSavedSearch" ) {
5327                          if ( unlink($SavedSearchFilePath) ) {                          if ( unlink($SavedSearchFilePath) ) {
5328                                  printf("<P>Successfully deleted: %s\n", $Value{'SearchName'});                                  printf("<P>Uspje¹no pobrisano: %s\n", $Value{'SearchName'});
5329                          }                          }
5330                          else {                          else {
5331                                  printf("<P>Failed to delete: %s\n", $Value{'SearchName'});                                  printf("<P>Nije pobrisano: %s\n", $Value{'SearchName'});
5332                          }                          }
5333                  }                  }
5334                  elsif ( ($ENV{'PATH_INFO'} eq "/ActivateSavedSearch") || ($ENV{'PATH_INFO'} eq "/SuspendSavedSearch") ) {                  elsif ( ($ENV{'PATH_INFO'} eq "/ActivateSavedSearch") || ($ENV{'PATH_INFO'} eq "/SuspendSavedSearch") ) {
# Line 5439  sub vProcessSavedSearch { Line 5342  sub vProcessSavedSearch {
5342                                  $Value{'SearchStatus'} =  ($ENV{'PATH_INFO'} eq "/ActivateSavedSearch") ? "Active" : "Inactive" ;                                  $Value{'SearchStatus'} =  ($ENV{'PATH_INFO'} eq "/ActivateSavedSearch") ? "Active" : "Inactive" ;
5343                                                                    
5344                                  if ( &iSaveXMLFileFromHash($SavedSearchFilePath, "SavedSearch", %Value) ) {                                  if ( &iSaveXMLFileFromHash($SavedSearchFilePath, "SavedSearch", %Value) ) {
5345                                          printf("<P>Successfully %s: %s\n",                                          printf("<P>Uspje¹no %s: %s\n",
5346                                                          ($ENV{'PATH_INFO'} eq "/ActivateSavedSearch") ? "activated" : "suspended", $Value{'SearchName'});                                                          ($ENV{'PATH_INFO'} eq "/ActivateSavedSearch") ? "ukljuèeno" : "iskljuèeno", $Value{'SearchName'});
5347                                  }                                  }
5348                                  else {                                  else {
5349                                          printf("<P>Failed to %s: %s\n",                                          printf("<P>Nije %s: %s\n",
5350                                                          ($ENV{'PATH_INFO'} eq "/ActivateSavedSearch") ? "activated" : "suspended", $Value{'SearchName'});                                                          ($ENV{'PATH_INFO'} eq "/ActivateSavedSearch") ? "ukljuèeno" : "iskljuèeno", $Value{'SearchName'});
5351                                  }                                  }
5352                          }                          }
5353                  }                  }
# Line 5546  sub vGetSaveFolder { Line 5449  sub vGetSaveFolder {
5449    
5450    
5451          # Print up the title          # Print up the title
5452          print("<H3> Snimanje foldera s dokumentima: </H3>\n");          print("<H3> Kreiranje korisnièkog foldera: </H3>\n");
5453    
5454          # Print up the form          # Print up the form
5455          printf("<FORM ACTION=\"$ENV{'SCRIPT_NAME'}/SetSaveFolder\" onSubmit=\"return checkForm(this)\" METHOD=POST>\n");          printf("<FORM ACTION=\"$ENV{'SCRIPT_NAME'}/SetSaveFolder\" onSubmit=\"return checkForm(this)\" METHOD=POST>\n");
# Line 5555  sub vGetSaveFolder { Line 5458  sub vGetSaveFolder {
5458          print("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>\n");          print("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>\n");
5459    
5460          # Send the buttons          # Send the buttons
5461          print("<TR><TD ALIGN=RIGHT VALIGN=TOP COLSPAN=2> <INPUT TYPE=RESET VALUE=\"Pobri¹i polja\"> <INPUT TYPE=SUBMIT VALUE=\"Save this Folder\"> </TD></TR>\n");          print("<TR><TD ALIGN=RIGHT VALIGN=TOP COLSPAN=2> <INPUT TYPE=SUBMIT VALUE=\"Saèuvaj folder\"> <INPUT TYPE=RESET VALUE=\"Vrati poèetne vrijednosti\"> </TD></TR>\n");
5462    
5463          print("<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=2><HR WIDTH=50%></TD></TR>\n");          print("<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=2><HR WIDTH=50%></TD></TR>\n");
5464                    
# Line 5595  sub vGetSaveFolder { Line 5498  sub vGetSaveFolder {
5498                  # Delete the old content                  # Delete the old content
5499                  delete($main::FormData{'Documents'});                  delete($main::FormData{'Documents'});
5500    
5501    ###FIX
5502                  if ( defined($main::FormData{'Document'}) ) {                  if ( defined($main::FormData{'Document'}) ) {
5503                          print("<TR>\n");                          print("<TR>\n");
5504                          &bDisplayDocuments("Document", $main::FormData{'Document'}, "Document", undef, undef, 1);                          &bDisplayDocuments("Document", $main::FormData{'Document'}, "Document", undef, undef, 1);
# Line 5932  sub vSetSaveFolder { Line 5835  sub vSetSaveFolder {
5835                          }                          }
5836                  }                  }
5837                    
5838                  print("<H3> Saving a Document Folder: </H3>\n");                  print("<H3> Èuvanje korisnièkog foldera: </H3>\n");
5839                  print("<P>\n");                  print("<P>\n");
5840                  print("<H3><CENTER> Your document folder was successfully saved. </CENTER></H3>\n");                  print("<H3><CENTER> Va¹ folder je uspje¹no saèuvan! </CENTER></H3>\n");
5841                                    
5842                                    
5843          }          }
# Line 6006  sub vListFolder { Line 5909  sub vListFolder {
5909    
5910                    
5911          # Print out the document folders          # Print out the document folders
5912          print("<H3> Folderi: </H3>\n");          print("<H3> Korisnièki folderi: </H3>\n");
5913                    
5914    
5915          # Get the document folder hash          # Get the document folder hash
# Line 6403  sub vGetFolder { Line 6306  sub vGetFolder {
6306          undef(%Value);          undef(%Value);
6307          &vSendMenuBar(%Value);          &vSendMenuBar(%Value);
6308                    
6309          print("<H3> Document Folder: </H3>\n");          print("<H3> Korisnièki folder: </H3>\n");
6310    
6311                    
6312          # Start the form          # Start the form
# Line 6415  sub vGetFolder { Line 6318  sub vGetFolder {
6318                  print("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>\n");                  print("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>\n");
6319                  print("<TR><TD ALIGN=LEFT VALIGN=TOP>Odabranima se smatraju svi rezultati ukoliko niste uèinili nikakav dodatan odabir.</TD><TD ALIGN=RIGHT VALIGN=TOP> \n");                  print("<TR><TD ALIGN=LEFT VALIGN=TOP>Odabranima se smatraju svi rezultati ukoliko niste uèinili nikakav dodatan odabir.</TD><TD ALIGN=RIGHT VALIGN=TOP> \n");
6320                  print("<SELECT NAME=\"Action\">\n");                  print("<SELECT NAME=\"Action\">\n");
6321                  print("<OPTION VALUE=\"GetDocument\">Prika¾i odabrane rezultates\n");                  print("<OPTION VALUE=\"GetDocument\">Prika¾i odabrane rezultate\n");
6322                  if ( $main::ConfigurationData{'allow-similiar-search'} eq "yes" ) {                  if ( $main::ConfigurationData{'allow-similiar-search'} eq "yes" ) {
6323                          print("<OPTION VALUE=\"GetSimilarDocument\">Prika¾i rezultate sliène odabranim rezultatima\n");                          print("<OPTION VALUE=\"GetSimilarDocument\">Prika¾i rezultate sliène odabranim rezultatima\n");
6324                  }                  }
6325                  if ( $main::ConfigurationData{'allow-relevance-feedback-searches'} eq "yes" ) {                  if ( $main::ConfigurationData{'allow-relevance-feedback-searches'} eq "yes" ) {
6326                          print("<OPTION VALUE=\"GetSearchResults\">Run search with selected documents as relevance feedback\n");                          print("<OPTION VALUE=\"GetSearchResults\">Run search with selected documents as relevance feedback\n");
6327                  }                  }
6328                  print("<OPTION VALUE=\"DeleteDocument&DocumentFolderObject=$main::FormData{'DocumentFolderObject'}\">Delete selected documents from this document folder\n");                  print("<OPTION VALUE=\"DeleteDocument&DocumentFolderObject=$main::FormData{'DocumentFolderObject'}\">Obri¹i odabrane jedinice iz ovog foldera\n");
6329                  print("<OPTION VALUE=\"GetSaveFolder&FromDocumentFolderObject=$main::FormData{'DocumentFolderObject'}\">Move selected documents to a new document folder\n");                  print("<OPTION VALUE=\"GetSaveFolder&FromDocumentFolderObject=$main::FormData{'DocumentFolderObject'}\">Preseli odabrane jedinice u novi folder\n");
6330                    
6331                                    
6332                  # Get the document folder hash                  # Get the document folder hash
# Line 6442  sub vGetFolder { Line 6345  sub vGetFolder {
6345                          $DocumentFolderEntry = ($DocumentFolderEntry =~ /^$main::UserAccountDirectoryPath\/(.*)/) ? $1 : $DocumentFolderEntry;                          $DocumentFolderEntry = ($DocumentFolderEntry =~ /^$main::UserAccountDirectoryPath\/(.*)/) ? $1 : $DocumentFolderEntry;
6346                          $DocumentFolderEntry = &lEncodeURLData($DocumentFolderEntry);                          $DocumentFolderEntry = &lEncodeURLData($DocumentFolderEntry);
6347                                                    
6348                          print("<OPTION VALUE=\"SetSaveFolder&DocumentFolderObject=$DocumentFolderEntry&FromDocumentFolderObject=$main::FormData{'DocumentFolderObject'}\">Move selected documents to the '$FolderName' document folder\n");                          print("<OPTION VALUE=\"SetSaveFolder&DocumentFolderObject=$DocumentFolderEntry&FromDocumentFolderObject=$main::FormData{'DocumentFolderObject'}\">Preseli odabrane jedinice u folder '$FolderName' \n");
6349                  }                  }
6350                    
6351                  print("</SELECT>\n");                  print("</SELECT>\n");
# Line 6459  sub vGetFolder { Line 6362  sub vGetFolder {
6362          print("<TR><TD ALIGN=LEFT VALIGN=TOP> Naziv: </TD> <TD ALIGN=LEFT VALIGN=TOP> $ArticleFolder{'FolderName'} </TD></TR>\n");          print("<TR><TD ALIGN=LEFT VALIGN=TOP> Naziv: </TD> <TD ALIGN=LEFT VALIGN=TOP> $ArticleFolder{'FolderName'} </TD></TR>\n");
6363    
6364          # Print the folder description          # Print the folder description
6365          $ArticleFolder{'FolderDescription'} = defined($ArticleFolder{'FolderDescription'}) ? $ArticleFolder{'FolderDescription'} : "(No description defined)";          $ArticleFolder{'FolderDescription'} = defined($ArticleFolder{'FolderDescription'}) ? $ArticleFolder{'FolderDescription'} : "(Nije naveden)";
6366          $ArticleFolder{'FolderDescription'} =~ s/\n/<BR>/g;          $ArticleFolder{'FolderDescription'} =~ s/\n/<BR>/g;
6367          $ArticleFolder{'FolderDescription'} =~ s/\r/<BR>/g;          $ArticleFolder{'FolderDescription'} =~ s/\r/<BR>/g;
6368          print("<TR><TD ALIGN=LEFT VALIGN=TOP> Opis: </TD> <TD ALIGN=LEFT VALIGN=TOP> $ArticleFolder{'FolderDescription'} </TD></TR>\n");          print("<TR><TD ALIGN=LEFT VALIGN=TOP> Opis: </TD> <TD ALIGN=LEFT VALIGN=TOP> $ArticleFolder{'FolderDescription'} </TD></TR>\n");
# Line 6469  sub vGetFolder { Line 6372  sub vGetFolder {
6372          print("<TR><TD ALIGN=LEFT VALIGN=TOP> Datum kreiranja: </TD> <TD ALIGN=LEFT VALIGN=TOP> $Value </TD></TR>\n");          print("<TR><TD ALIGN=LEFT VALIGN=TOP> Datum kreiranja: </TD> <TD ALIGN=LEFT VALIGN=TOP> $Value </TD></TR>\n");
6373                    
6374          $Value = &sGetPrintableDateFromTime($ArticleFolder{'UpdateTime'});          $Value = &sGetPrintableDateFromTime($ArticleFolder{'UpdateTime'});
6375          print("<TR><TD ALIGN=LEFT VALIGN=TOP> Datum zadnje promijene: </TD> <TD ALIGN=LEFT VALIGN=TOP> $Value </TD></TR>\n");          print("<TR><TD ALIGN=LEFT VALIGN=TOP NOWRAP> Datum zadnje promijene: </TD> <TD ALIGN=LEFT VALIGN=TOP> $Value </TD></TR>\n");
6376                    
6377          print("<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=2><HR WIDTH=50%></TD></TR>\n");          print("<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=2><HR WIDTH=50%></TD></TR>\n");
6378    
# Line 6988  sub vRunSavedSearches { Line 6891  sub vRunSavedSearches {
6891                          # Print out the message header (Content-Type)                          # Print out the message header (Content-Type)
6892                          if ( $DeliveryMethod eq "attachement" ) {                          if ( $DeliveryMethod eq "attachement" ) {
6893                                  print("Mime-Version: 1.0\n");                                  print("Mime-Version: 1.0\n");
                                 print("Content-Type: multipart/mixed; boundary=\"============_-1234567890==_============\"\n");  
6894                          }                          }
6895                          else {                          else {
6896                                  print("Mime-Version: 1.0\n");                                  print("Mime-Version: 1.0\n");
# Line 7217  sub vLog { Line 7119  sub vLog {
7119                  }                  }
7120                                    
7121    
7122                  if ( defined($main::FormData{'GetSearch.x'}) ) {                  if ( defined($main::FormData{'GetSearch'}) ) {
7123                          $ENV{'PATH_INFO'} = "/GetSearch";                          $ENV{'PATH_INFO'} = "/GetSearch";
7124                          delete($main::FormData{'GetSearch.x'});                          delete($main::FormData{'GetSearch'});
7125                          delete($main::FormData{'GetSearch.y'});                          delete($main::FormData{'GetSearch'});
7126                  }                  }
7127                                    
7128                  if ( defined($main::FormData{'ListSearchHistory.x'}) ) {                  if ( defined($main::FormData{'ListSearchHistory'}) ) {
7129                          $ENV{'PATH_INFO'} = "/ListSearchHistory";                          $ENV{'PATH_INFO'} = "/ListSearchHistory";
7130                          delete($main::FormData{'ListSearchHistory.x'});                          delete($main::FormData{'ListSearchHistory'});
7131                          delete($main::FormData{'ListSearchHistory.y'});                          delete($main::FormData{'ListSearchHistory'});
7132                  }                  }
7133                                    
7134                  if ( defined($main::FormData{'ListSavedSearch.x'}) ) {                  if ( defined($main::FormData{'ListSavedSearch'}) ) {
7135                          $ENV{'PATH_INFO'} = "/ListSavedSearch";                          $ENV{'PATH_INFO'} = "/ListSavedSearch";
7136                          delete($main::FormData{'ListSavedSearch.x'});                          delete($main::FormData{'ListSavedSearch'});
7137                          delete($main::FormData{'ListSavedSearch.y'});                          delete($main::FormData{'ListSavedSearch'});
7138                  }                  }
7139                                    
7140                  if ( defined($main::FormData{'ListFolder.x'}) ) {                  if ( defined($main::FormData{'ListFolder'}) ) {
7141                          $ENV{'PATH_INFO'} = "/ListFolder";                          $ENV{'PATH_INFO'} = "/ListFolder";
7142                          delete($main::FormData{'ListFolder.x'});                          delete($main::FormData{'ListFolder'});
7143                          delete($main::FormData{'ListFolder.y'});                          delete($main::FormData{'ListFolder'});
7144                  }                  }
7145                                    
7146                  if ( defined($main::FormData{'GetUserSettings.x'}) ) {                  if ( defined($main::FormData{'GetUserSettings'}) ) {
7147                          $ENV{'PATH_INFO'} = "/GetUserSettings";                          $ENV{'PATH_INFO'} = "/GetUserSettings";
7148                          delete($main::FormData{'GetUserSettings.x'});                          delete($main::FormData{'GetUserSettings'});
7149                          delete($main::FormData{'GetUserSettings.y'});                          delete($main::FormData{'GetUserSettings'});
7150                  }                  }
7151                                    
7152    
# Line 7484  sub fill_SearchFieldDescriptions_fromDB Line 7386  sub fill_SearchFieldDescriptions_fromDB
7386                          my ($FieldName, $FieldDescription, undef) = split(/\t/, $FieldInformation, 3);                          my ($FieldName, $FieldDescription, undef) = split(/\t/, $FieldInformation, 3);
7387                          $main::SearchFieldDescriptions{$FieldName} = $FieldDescription;                          $main::SearchFieldDescriptions{$FieldName} = $FieldDescription;
7388                  }                  }
7389            } else {
7390                    &vLog("Error - cant read database description from '$Database'\n");
7391            }
7392    }
7393    
7394    #--------------------------------------------------------------------------
7395    # show list of all databases
7396    #
7397    # usage: ShowDatabaseCheckBoxes(@SelectedDatabases)
7398    
7399    sub ShowDatabaseCheckBoxes {
7400            # Parse out the database names and put them into a
7401            # hash table, they should be separated with a '\0'
7402            my %Value;
7403    
7404            foreach my $ItemEntry ( @_ ) {
7405                    $Value{$ItemEntry} = $ItemEntry;
7406            }
7407    
7408            print("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>\n");
7409            print "<tr><td colspan=3 align=\"center\">
7410                    <font size=-1>Oznaèi
7411                            <a href=\"javascript:SetChecked(1)\">sve</a>,
7412                            <a href=\"javascript:SetChecked(0)\">niti jednu</a>.
7413                    </font>
7414                    </td></tr>";
7415    
7416            my @html_database;
7417    
7418            foreach my $key ( sort keys %main::DatabaseSort ) {
7419                    my $DatabaseName = $main::DatabaseSort{$key};
7420                    my $Value = ((defined($Value{$DatabaseName})) || (scalar(keys(%main::DatabaseDescriptions)) == 1) || !defined($main::RemoteUser) ) ? "CHECKED" : "";
7421                    my $ItemEntry = &lEncodeURLData($DatabaseName);
7422                    if ($main::DatabaseDescriptions{$DatabaseName}) {
7423                            push @html_database,"<TD ALIGN=LEFT VALIGN=TOP><INPUT TYPE=\"checkbox\" NAME=\"Database\" VALUE=\"$DatabaseName\" $Value> <A HREF=\"$ENV{'SCRIPT_NAME'}/GetDatabaseInfo?Database=$ItemEntry\" OnMouseOver=\"self.status='Informacije io bazi $main::DatabaseDescriptions{$DatabaseName} '; return true\"> $main::DatabaseDescriptions{$DatabaseName}  </A> </TD>\n";
7424                    } else {
7425                            push @html_database,"<td align=left valign=top>$main::DatabaseDescriptions{$DatabaseName}</td>\n";
7426                    }
7427            }
7428    
7429    
7430            if ($main::ConfigurationData{'output-colums'}) {
7431                    # create database names in columns
7432    
7433                    my $cols = $main::ConfigurationData{'show-nr-colums'};
7434                    my $next = int($#html_database/$cols) ;
7435    
7436                    for(my $i=0; $i <= $next ; $i++) {
7437                            print("<tr>");
7438                            for(my $j=0; $j <= $cols; $j++) {
7439                                    print($html_database[$i+$next*$j+$j] || '');
7440                            }
7441                            print("</tr>");
7442                    }
7443    
7444            } else {
7445                    for(my $i=0; $i <= $#html_database ; $i=$i+1) {
7446                            print("<tr>",$html_database[$i],"</tr>");
7447                    }
7448          }          }
7449    
7450            print("</TABLE>\n");
7451    
7452  }  }
7453    
7454    #--------------------------------------------------------------------------
7455    #
7456    sub nuke_accents {
7457            my $tmp = $_[0];
7458            $tmp =~ tr/Çüéâäùæç³ëÕõî¬ÄÆÉÅåôö¥µ¦¶ÖÜ«»£èáíóú¡±®¾Êê¼ÈºÁÂ̪¯¿ÃãðÐÏËïÒÍÎìÞÙÓÔÑñò©¹ÀÚàÛýÝþ´½²·¢¸¨ÿØø/CueaauccleOoiZACELlooLlSsOUTtLcaiouAaZzEezCsAAESZzAadDDEdNIIeTUOoNnnSsRUrUyYt'".'',"'Rr/;
7459            # convert search string to lower case -> make search case insensitive
7460            $tmp =~ tr/A-Z/a-z/;
7461            return $tmp;
7462    }
7463    

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.27

  ViewVC Help
Powered by ViewVC 1.1.26