--- search/Search.cgi 2002/06/24 14:50:44 1.6 +++ search/Search.cgi 2002/06/24 17:53:11 1.10 @@ -1,19 +1,21 @@ #!/usr/bin/perl -w #***************************************************************************** -# Copyright (C) 1993-2000, FS Consulting Inc. All rights reserved * -# * -# * -# This notice is intended as a precaution against inadvertent publication * -# and does not constitute an admission or acknowledgement that publication * -# has occurred or constitute a waiver of confidentiality. * -# * -# This software is the proprietary and confidential property * -# of FS Consulting, Inc. * +# Copyright (C) 1993-2000, FS Consulting Inc. All rights reserved * +# * +# * +# This notice is intended as a precaution against inadvertent publication * +# and does not constitute an admission or acknowledgement that publication * +# has occurred or constitute a waiver of confidentiality. * +# * +# This software is the proprietary and confidential property * +# of FS Consulting, Inc. * #***************************************************************************** #print "Content-type: text/plain\n\n"; +#use Data::Dumper; + #-------------------------------------------------------------------------- # # Author: Francois Schiettecatte (FS Consulting, Inc.) @@ -2110,18 +2112,15 @@ my (@Words, $Word, @OffsetPairs, $OffsetPair, %Offsets, $Offset, $Start, $End, $OldStart, $OldEnd, $CurrentSummaryLength); my ($DatabaseSummaryFilterKey, $DatabaseSummaryFilterFunction); my ($Value, %Value, @Values, $ValueEntry); - - + + # Check input parameters if ( !defined($SearchResults) || !%Content ) { return (0); } - - # Split the search results text into a search results list @SearchResults = split(/\n/, $SearchResults); - # First we count up the number of results and scoop up @@ -2431,7 +2430,7 @@ } - +### FIX:: ADD SORT HERE if ( $ResultCount > 0 ) { # Loop over each entry in the hits list @@ -2689,6 +2688,9 @@ if ( $HTML ) { print("\n"); #print(" $SelectorText $Score $Headline ( $main::DatabaseDescriptions{$Database} )
"); + # decode some basic html from headline + $Headline =~ s/<(\/?[bi])>/<$1>/g; + print(" $SelectorText $Headline
 "); } else { printf("%3d $Headline ($main::DatabaseDescriptions{$Database})\n", $Score); @@ -3102,7 +3104,13 @@ # Database selection if ( %main::DatabaseDescriptions ) { - print(" Odaberite bazu koju želite pretraživati: + print(" Odaberite bazu koju želite pretraživati: + + Označi + sve, + niti jednu. + + "); # Parse out the database names and put them into a @@ -3117,56 +3125,8 @@ @ItemList = split(",", $SelectedDatabases); } } - foreach $ItemEntry ( @ItemList ) { - $Value{$ItemEntry} = $ItemEntry; - } - - - $Flag = 0; - - print(' - all - none - '); - - print("\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,"\n"; - } else { - push @html_database,"\n"; - } - } - - - if ($main::ConfigurationData{'output-colums'}) { - # create database names in columns - - my $cols = $main::ConfigurationData{'show-nr-colums'}; - my $next = int($#html_database/$cols) ; - - for(my $i=0; $i <= $next ; $i++) { - print(""); - for(my $j=0; $j <= $cols; $j++) { - print($html_database[$i+$next*$j+$j] || ''); - } - print(""); - } - - } else { - for(my $i=0; $i <= $#html_database ; $i=$i+1) { - print("",$html_database[$i],""); - } - } - - print("
$main::DatabaseDescriptions{$DatabaseName} $main::DatabaseDescriptions{$DatabaseName}
\n"); + &ShowDatabaseCheckBoxes(@ItemList); print("\n"); @@ -3254,6 +3214,9 @@ print("