/[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.9 by dpavlin, Mon Jun 24 17:52:31 2002 UTC revision 1.13 by dpavlin, Tue Jun 25 15:02:32 2002 UTC
# Line 14  Line 14 
14    
15  #print "Content-type: text/plain\n\n";  #print "Content-type: text/plain\n\n";
16    
17  use Data::Dumper;  #use Data::Dumper;
18    
19  #--------------------------------------------------------------------------  #--------------------------------------------------------------------------
20  #  #
# Line 232  $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 411  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">';
396          print("</HEAD>\n<BODY BGCOLOR=\"#FFFFFF\">\n");          print("</HEAD>\n<BODY BGCOLOR=\"#FFFFFF\">\n");
397    
398    
# Line 521  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>");  
507    
508            $DISABLED = ( %MenuBar && defined($MenuBar{'GetSearch'}) ) ? "DISABLED" : "";
509          }          print("<INPUT NAME=\"GetSearch\" TYPE=SUBMIT VALUE=\"Forma za pretra¾ivanje\" $DISABLED class=\"navigacija\">");
         else {  
   
                 print("<INPUT NAME=\"GetSearch\" TYPE=IMAGE SRC=\"$main::ConfigurationData{'image-base-path'}/$main::ImageNames{'active-search'}\" ALT=\"Search\" BORDER=0>");  
   
   
   
         }  
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=\"Search History\" $DISABLED class=\"navigacija\">";
                 }  
                 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=\"List Saved Search\" $DISABLED class=\"navigacija\">";
                 }  
                 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=\"List Folder\" $DISABLED class=\"navigacija\">";
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=\"Get User Settings\" $DISABLED class=\"navigacija\">";
                 }  
                   
                 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 1571  sub sMakeSearchString { Line 1529  sub sMakeSearchString {
1529    
1530          # nuke accented chars          # nuke accented chars
1531          $SearchString =~ tr/Çüéâäùæç³ëÕõî¬ÄÆÉÅåôö¥µ¦¶ÖÜ«»£èáíóú¡±®¾Êê¼ÈºÁÂ̪¯¿ÃãðÐÏËïÒÍÎìÞÙÓÔÑñò©¹ÀÚàÛýÝþ´­½²·¢¸¨ÿØø/CueaauccleOoiZACELlooLlSsOUTtLcaiouAaZzEezCsAAESZzAadDDEdNIIeTUOoNnnSsRUrUyYt'-".'',"'Rr/;          $SearchString =~ tr/Çüéâäùæç³ëÕõî¬ÄÆÉÅåôö¥µ¦¶ÖÜ«»£èáíóú¡±®¾Êê¼ÈºÁÂ̪¯¿ÃãðÐÏËïÒÍÎìÞÙÓÔÑñò©¹ÀÚàÛýÝþ´­½²·¢¸¨ÿØø/CueaauccleOoiZACELlooLlSsOUTtLcaiouAaZzEezCsAAESZzAadDDEdNIIeTUOoNnnSsRUrUyYt'-".'',"'Rr/;
1532            # convert search string to lower case -> make search case insensitive
1533            $SearchString =~ tr/A-Z/a-z/;
1534    
1535          # Add the internal search terms          # Add the internal search terms
1536    
# Line 7158  sub vLog { Line 7118  sub vLog {
7118                  }                  }
7119                                    
7120    
7121                  if ( defined($main::FormData{'GetSearch.x'}) ) {                  if ( defined($main::FormData{'GetSearch'}) ) {
7122                          $ENV{'PATH_INFO'} = "/GetSearch";                          $ENV{'PATH_INFO'} = "/GetSearch";
7123                          delete($main::FormData{'GetSearch.x'});                          delete($main::FormData{'GetSearch'});
7124                          delete($main::FormData{'GetSearch.y'});                          delete($main::FormData{'GetSearch'});
7125                  }                  }
7126                                    
7127                  if ( defined($main::FormData{'ListSearchHistory.x'}) ) {                  if ( defined($main::FormData{'ListSearchHistory'}) ) {
7128                          $ENV{'PATH_INFO'} = "/ListSearchHistory";                          $ENV{'PATH_INFO'} = "/ListSearchHistory";
7129                          delete($main::FormData{'ListSearchHistory.x'});                          delete($main::FormData{'ListSearchHistory'});
7130                          delete($main::FormData{'ListSearchHistory.y'});                          delete($main::FormData{'ListSearchHistory'});
7131                  }                  }
7132                                    
7133                  if ( defined($main::FormData{'ListSavedSearch.x'}) ) {                  if ( defined($main::FormData{'ListSavedSearch'}) ) {
7134                          $ENV{'PATH_INFO'} = "/ListSavedSearch";                          $ENV{'PATH_INFO'} = "/ListSavedSearch";
7135                          delete($main::FormData{'ListSavedSearch.x'});                          delete($main::FormData{'ListSavedSearch'});
7136                          delete($main::FormData{'ListSavedSearch.y'});                          delete($main::FormData{'ListSavedSearch'});
7137                  }                  }
7138                                    
7139                  if ( defined($main::FormData{'ListFolder.x'}) ) {                  if ( defined($main::FormData{'ListFolder'}) ) {
7140                          $ENV{'PATH_INFO'} = "/ListFolder";                          $ENV{'PATH_INFO'} = "/ListFolder";
7141                          delete($main::FormData{'ListFolder.x'});                          delete($main::FormData{'ListFolder'});
7142                          delete($main::FormData{'ListFolder.y'});                          delete($main::FormData{'ListFolder'});
7143                  }                  }
7144                                    
7145                  if ( defined($main::FormData{'GetUserSettings.x'}) ) {                  if ( defined($main::FormData{'GetUserSettings'}) ) {
7146                          $ENV{'PATH_INFO'} = "/GetUserSettings";                          $ENV{'PATH_INFO'} = "/GetUserSettings";
7147                          delete($main::FormData{'GetUserSettings.x'});                          delete($main::FormData{'GetUserSettings'});
7148                          delete($main::FormData{'GetUserSettings.y'});                          delete($main::FormData{'GetUserSettings'});
7149                  }                  }
7150                                    
7151    

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

  ViewVC Help
Powered by ViewVC 1.1.26