/[local]/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.23 by dpavlin, Wed Jul 17 16:55:07 2002 UTC revision 1.24 by dpavlin, Wed Jul 17 18:37:39 2002 UTC
# Line 1509  sub sMakeSearchString { Line 1509  sub sMakeSearchString {
1509          # Initialize the search string          # Initialize the search string
1510          $SearchString = "";          $SearchString = "";
1511    
1512  sub nuke_accents {          # tip gradje
1513          my $tmp = $_[0];          if ( defined($main::FormData{'tip'}) ) {
1514          $tmp =~ tr/Çüéâäùæç³ëÕõî¬ÄÆÉÅåôö¥µ¦¶ÖÜ«»£èáíóú¡±®¾Êê¼ÈºÁÂ̪¯¿ÃãðÐÏËïÒÍÎìÞÙÓÔÑñò©¹ÀÚàÛýÝþ´­½²·¢¸¨ÿØø/CueaauccleOoiZACELlooLlSsOUTtLcaiouAaZzEezCsAAESZzAadDDEdNIIeTUOoNnnSsRUrUyYt'-".'',"'Rr/;                  my @t;
1515          # convert search string to lower case -> make search case insensitive                  foreach my $tip ( split(/\0/, $main::FormData{'tip'}) ) {
1516          $tmp =~ tr/A-Z/a-z/;                          push @t,"tip=$tip";
1517          return $tmp;                  }
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 " : "") . nuke_accents($Content{'Any'}) ) : "";          $SearchString .= defined($Content{'Any'}) ? ((($SearchString ne "") ? " AND " : "") . nuke_accents($Content{'Any'}) ) : "";
# Line 3055  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            foreach my $tip (keys %default::tip) {
3060                    print '<input TYPE="checkbox" NAME="tip" VALUE="',nuke_accents($default::tip{$tip}),'" >',$default::tip{$tip},"&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 3222  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 3328  sub vGetSearchResults { Line 3331  sub vGetSearchResults {
3331                  $main::FormData{'Max'} = $main::DefaultMaxDoc;                  $main::FormData{'Max'} = $main::DefaultMaxDoc;
3332          }          }
3333    
           
3334          # Generate the search string          # Generate the search string
3335          $SearchString = &sMakeSearchString(%main::FormData);          $SearchString = &sMakeSearchString(%main::FormData);
3336    
# Line 7442  sub ShowDatabaseCheckBoxes { Line 7444  sub ShowDatabaseCheckBoxes {
7444    
7445          print("</TABLE>\n");          print("</TABLE>\n");
7446  }  }
7447    
7448    #--------------------------------------------------------------------------
7449    #
7450    sub nuke_accents {
7451            my $tmp = $_[0];
7452            $tmp =~ tr/Çüéâäùæç³ëÕõî¬ÄÆÉÅåôö¥µ¦¶ÖÜ«»£èáíóú¡±®¾Êê¼ÈºÁÂ̪¯¿ÃãðÐÏËïÒÍÎìÞÙÓÔÑñò©¹ÀÚàÛýÝþ´­½²·¢¸¨ÿØø/CueaauccleOoiZACELlooLlSsOUTtLcaiouAaZzEezCsAAESZzAadDDEdNIIeTUOoNnnSsRUrUyYt'-".'',"'Rr/;
7453            # convert search string to lower case -> make search case insensitive
7454            $tmp =~ tr/A-Z/a-z/;
7455            return $tmp;
7456    }
7457    

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24

  ViewVC Help
Powered by ViewVC 1.1.26