/[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.13 by dpavlin, Tue Jun 25 15:02:32 2002 UTC revision 1.17 by dpavlin, Tue Jun 25 16:47:58 2002 UTC
# Line 392  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 '<link rel="STYLESHEET" type="text/css" href="stil.css">';          print '<link rel="STYLESHEET" type="text/css" href="'.$main::ConfigurationData{'image-base-path'}.'/stil.css">';
396          print("</HEAD>\n<BODY BGCOLOR=\"#FFFFFF\">\n");          print("</HEAD>\n<BODY BGCOLOR=\"#FFFFFF\">\n");
397    
398    
# Line 506  sub vSendMenuBar { Line 506  sub vSendMenuBar {
506          my $DISABLED;          my $DISABLED;
507    
508          $DISABLED = ( %MenuBar && defined($MenuBar{'GetSearch'}) ) ? "DISABLED" : "";          $DISABLED = ( %MenuBar && defined($MenuBar{'GetSearch'}) ) ? "DISABLED" : "";
509          print("<INPUT NAME=\"GetSearch\" TYPE=SUBMIT VALUE=\"Forma za pretraživanje\" $DISABLED class=\"navigacija\">");          print("<INPUT NAME=\"GetSearch\" TYPE=SUBMIT VALUE=\"Pretraživanje\" $DISABLED class=\"navigacija${DISABLED}\">");
510    
511          if ( defined($main::RemoteUser) ) {          if ( defined($main::RemoteUser) ) {
512                  $DISABLED = ( %MenuBar && defined($MenuBar{'ListSearchHistory'}) ) ? "DISABLED" : "";                  $DISABLED = ( %MenuBar && defined($MenuBar{'ListSearchHistory'}) ) ? "DISABLED" : "";
513                  print"<INPUT NAME=\"ListSearchHistory\" TYPE=SUBMIT VALUE=\"Search History\" $DISABLED class=\"navigacija\">";                  print"<INPUT NAME=\"ListSearchHistory\" TYPE=SUBMIT VALUE=\"Prijašnja pretraživanja\" $DISABLED class=\"navigacija${DISABLED}\">";
514    
515                  $DISABLED = ( %MenuBar && defined($MenuBar{'ListSavedSearch'}) ) ? "DISABLED" : "";                  $DISABLED = ( %MenuBar && defined($MenuBar{'ListSavedSearch'}) ) ? "DISABLED" : "";
516                  print"<INPUT NAME=\"ListSavedSearch\" TYPE=SUBMIT VALUE=\"List Saved Search\" $DISABLED class=\"navigacija\">";                  print"<INPUT NAME=\"ListSavedSearch\" TYPE=SUBMIT VALUE=\"Spremljena pretraživanja\" $DISABLED class=\"navigacija${DISABLED}\">";
517    
518                  $DISABLED = ( %MenuBar && defined($MenuBar{'ListFolder'}) ) ? "DISABLED" : "";                  $DISABLED = ( %MenuBar && defined($MenuBar{'ListFolder'}) ) ? "DISABLED" : "";
519                  print"<INPUT NAME=\"ListFolder\" TYPE=SUBMIT VALUE=\"List Folder\" $DISABLED class=\"navigacija\">";                  print"<INPUT NAME=\"ListFolder\" TYPE=SUBMIT VALUE=\"Korisnički folderi\" $DISABLED class=\"navigacija${DISABLED}\">";
520                    
521                  $DISABLED = ( %MenuBar && defined($MenuBar{'GetUserSettings'}) ) ? "DISABLED" : "";                  $DISABLED = ( %MenuBar && defined($MenuBar{'GetUserSettings'}) ) ? "DISABLED" : "";
522                  print"<INPUT NAME=\"GetUserSettings\" TYPE=SUBMIT VALUE=\"Get User Settings\" $DISABLED class=\"navigacija\">";                  print"<INPUT NAME=\"GetUserSettings\" TYPE=SUBMIT VALUE=\"Korisničke postavke\" $DISABLED class=\"navigacija${DISABLED}\">";
523          }          }
524    
525    
# Line 2932  sub vGetSearch { Line 2932  sub vGetSearch {
2932    
2933    
2934          # Make sure that we send the header          # Make sure that we send the header
2935          $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";
         my $JavaScript = '<SCRIPT LANGUAGE="JavaScript">  
                 <!-- hide  
                 function SetChecked(val) {  
                         dml=document.Search;  
                         len = dml.elements.length;  
                         var i=0;  
                         for( i=0 ; i<len ; i++) {  
                                 if (dml.elements[i].name==\'Database\') {  
                                         dml.elements[i].checked=val;  
                                 }  
                         }  
                 }  
                 // -->  
                 </SCRIPT>  
                 ';  
2936    
2937          &vSendHTMLHeader($Value, $JavaScript);          &vSendHTMLHeader($Value, $main::JavaScript_SetChecked);
2938    
2939          undef(%Value);          undef(%Value);
2940          $Value{'GetSearch'} = "GetSearch";          $Value{'GetSearch'} = "GetSearch";
# Line 2988  sub vGetSearch { Line 2973  sub vGetSearch {
2973    
2974          if ( $ENV{'PATH_INFO'} eq "/GetExpandedSearch" ) {          if ( $ENV{'PATH_INFO'} eq "/GetExpandedSearch" ) {
2975                  print("<INPUT TYPE=HIDDEN NAME=\"Action\" VALUE=\"GetSimpleSearch\">\n");                  print("<INPUT TYPE=HIDDEN NAME=\"Action\" VALUE=\"GetSimpleSearch\">\n");
2976                  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> Jednostavo pretraživanje (kliknite na trokutić)\n");
2977          }          }
2978          else {          else {
2979                  print("<INPUT TYPE=HIDDEN NAME=\"Action\" VALUE=\"GetExpandedSearch\">\n");                  print("<INPUT TYPE=HIDDEN NAME=\"Action\" VALUE=\"GetExpandedSearch\">\n");
2980                  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");
2981          }          }
2982          print("</FORM></TD>\n");          print("</FORM></TD>\n");
2983                    
# Line 3007  sub vGetSearch { Line 2992  sub vGetSearch {
2992    
2993          # Send the standard fields          # Send the standard fields
2994          $Value = defined($main::FormData{'Any'}) ? "VALUE='$main::FormData{'Any'}'" : "";          $Value = defined($main::FormData{'Any'}) ? "VALUE='$main::FormData{'Any'}'" : "";
2995          print("<TR><TD ALIGN=LEFT VALIGN=TOP COLSPAN=2> Pretraži u bilo kojem polju: </TD> <TD ALIGN=LEFT VALIGN=TOP> <INPUT NAME=\"Any\" TYPE=TEXT $Value SIZE=45> </TD></TR>\n");          print("<TR><TD ALIGN=LEFT VALIGN=TOP COLSPAN=2> Tražene riječi neka budu u bilo kojem polju: </TD> <TD ALIGN=LEFT VALIGN=TOP> <INPUT NAME=\"Any\" TYPE=TEXT $Value SIZE=45> </TD></TR>\n");
2996                    
2997                    
2998          my $nr_fields = $main::NormalSearchDropdowns;          my $nr_fields = $main::NormalSearchDropdowns;
# Line 3020  sub vGetSearch { Line 3005  sub vGetSearch {
3005    
3006          for (my $field=1; $field<= $nr_fields; $field++) {          for (my $field=1; $field<= $nr_fields; $field++) {
3007    
3008                  print("<TR><TD ALIGN=LEFT VALIGN=TOP>");                  print "<TR>";
3009                  if ($field == 1 ) {                  if ($field == 1 ) {
3010                          print ("Pretraži u određenom polju:");                          print "<TD ALIGN=LEFT VALIGN=TOP ROWSPAN=$nr_fields>";
3011                            print "Tražene riječi neka budu u odabranom polju:";
3012                            print "</td>";
3013                  }                  }
3014                  print ("</TD><TD ALIGN=RIGHT VALIGN=TOP>");                  print ("<TD ALIGN=RIGHT VALIGN=TOP>");
3015    
3016                  print ("<SELECT NAME=\"FieldName${field}\">");                  print ("<SELECT NAME=\"FieldName${field}\">");
3017                  for (my $i=0; $i<=$#SearchFieldNames; $i++) {                  for (my $i=0; $i<=$#SearchFieldNames; $i++) {
# Line 3042  sub vGetSearch { Line 3029  sub vGetSearch {
3029                  if (defined($main::FormData{"FieldContent${field}"})) {                  if (defined($main::FormData{"FieldContent${field}"})) {
3030                          $Value = "VALUE='".$main::FormData{"FieldContent${field}"}."'";                          $Value = "VALUE='".$main::FormData{"FieldContent${field}"}."'";
3031                  }                  }
3032                  print("</SELECT></TD><TD ALIGN=LEFT><INPUT NAME=\"FieldContent${field}\" TYPE=TEXT $Value SIZE=45> </TD></TR>\n");                  print("</SELECT></TD><TD ALIGN=LEFT VALIGN=TOP><INPUT NAME=\"FieldContent${field}\" TYPE=TEXT $Value SIZE=45> </TD></TR>\n");
3033          }          }
3034    
3035    
# Line 3064  sub vGetSearch { Line 3051  sub vGetSearch {
3051          # Database selection          # Database selection
3052          if ( %main::DatabaseDescriptions ) {          if ( %main::DatabaseDescriptions ) {
3053    
3054                  print("<TR><TD ALIGN=LEFT VALIGN=TOP COLSPAN=2> Odaberite bazu koju želite pretraživati:                  print("<TR><TD ALIGN=LEFT VALIGN=TOP COLSPAN=2> Odaberite bazu koju želite pretraživati:</TD></TR>
3055                  </td><td>                  <TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=4>
                 <font size=-1>Označi  
                         <a href=\"javascript:SetChecked(1)\">sve</a>,  
                         <a href=\"javascript:SetChecked(0)\">niti jednu</a>.  
                 </font>  
                 </TD></TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=4>  
3056                  ");                  ");
3057                                    
3058                  # Parse out the database names and put them into a                  # Parse out the database names and put them into a
# Line 3971  sub vGetUserSettings { Line 3953  sub vGetUserSettings {
3953    
3954    
3955          # Make sure that we send the header          # Make sure that we send the header
3956          &vSendHTMLHeader("My Settings", undef);          &vSendHTMLHeader("My Settings", $main::JavaScript_SetChecked);
3957          undef(%Value);          undef(%Value);
3958          $Value{'GetUserSettings'} = "GetUserSettings";          $Value{'GetUserSettings'} = "GetUserSettings";
3959          &vSendMenuBar(%Value);          &vSendMenuBar(%Value);
# Line 4009  sub vGetUserSettings { Line 3991  sub vGetUserSettings {
3991          print("<H3> Postavke: </H3>\n");          print("<H3> Postavke: </H3>\n");
3992    
3993          print("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>\n");          print("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>\n");
3994          print("<FORM ACTION=\"$ENV{'SCRIPT_NAME'}/SetUserSettings\" METHOD=POST>\n");          print("<FORM ACTION=\"$ENV{'SCRIPT_NAME'}/SetUserSettings\" NAME=\"Search\" METHOD=POST>\n");
3995                                    
3996          # Send the buttons          # Send the buttons
3997          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=RESET VALUE=\"Pobriši polja\"> <INPUT TYPE=SUBMIT VALUE=\"Sačuvaj postavke\"> </TD></TR>\n");
# Line 4071  sub vGetUserSettings { Line 4053  sub vGetUserSettings {
4053    
4054                  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");
4055    
4056                  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 baze koje uvijek želite pretraživati:</TD></TR><TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=2>\n");
4057                                    
4058                  # Parse out the database names and put them into a                  # Parse out the database names and put them into a
4059                  # hash table, they should be separated with a '\n'                  # hash table, they should be separated with a '\n'
4060                  if ( defined($SelectedDatabases) && ($SelectedDatabases ne "") ) {                  if ( defined($SelectedDatabases) && ($SelectedDatabases ne "") ) {
4061                          @ItemList = split(",", $SelectedDatabases);                          @ItemList = split(",", $SelectedDatabases);
4062                  }                  }
4063            
4064                  &ShowDatabaseCheckBoxes(@ItemList);                  &ShowDatabaseCheckBoxes(@ItemList);
4065                    
4066                  print("</TD></TR>\n");                  print("</TD></TR>\n");
# Line 4224  sub vSetUserSettings { Line 4206  sub vSetUserSettings {
4206          $Value{'UserName'} = $main::FormData{'UserName'};          $Value{'UserName'} = $main::FormData{'UserName'};
4207          $Value{'EmailAddress'} = $main::FormData{'EmailAddress'};          $Value{'EmailAddress'} = $main::FormData{'EmailAddress'};
4208          $Value{'DefaultSearch'} = $main::FormData{'DefaultSearch'};          $Value{'DefaultSearch'} = $main::FormData{'DefaultSearch'};
4209          $Value{'SelectedDatabases'} = $main::FormData{'SelectedDatabases'};          $Value{'SelectedDatabases'} = $main::FormData{'Database'};
4210          if ( defined($Value{'SelectedDatabases'}) ) {          if ( defined($Value{'SelectedDatabases'}) ) {
4211                  $Value{'SelectedDatabases'} =~ s/\0/,/g;                  $Value{'SelectedDatabases'} =~ s/\0/,/g;
4212          }          }
# Line 7403  sub ShowDatabaseCheckBoxes { Line 7385  sub ShowDatabaseCheckBoxes {
7385          }          }
7386                                    
7387          print("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>\n");          print("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>\n");
7388            print "<tr><td colspan=3 align=\"center\">
7389                    <font size=-1>Označi
7390                            <a href=\"javascript:SetChecked(1)\">sve</a>,
7391                            <a href=\"javascript:SetChecked(0)\">niti jednu</a>.
7392                    </font>
7393                    </td></tr>";
7394    
7395          my @html_database;          my @html_database;
7396    

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.17

  ViewVC Help
Powered by ViewVC 1.1.26