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"; |
#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.) |
1571 |
|
|
1572 |
# nuke accented chars |
# nuke accented chars |
1573 |
$SearchString =~ tr/Çüéâäùæç³ëÕõî¬ÄÆÉÅåôö¥µ¦¶ÖÜ«»£èáíóú¡±®¾Êê¼ÈºÁÂ̪¯¿ÃãðÐÏËïÒÍÎìÞÙÓÔÑñò©¹ÀÚàÛýÝþ´½²·¢¸¨ÿØø/CueaauccleOoiZACELlooLlSsOUTtLcaiouAaZzEezCsAAESZzAadDDEdNIIeTUOoNnnSsRUrUyYt'-".'',"'Rr/; |
$SearchString =~ tr/Çüéâäùæç³ëÕõî¬ÄÆÉÅåôö¥µ¦¶ÖÜ«»£èáíóú¡±®¾Êê¼ÈºÁÂ̪¯¿ÃãðÐÏËïÒÍÎìÞÙÓÔÑñò©¹ÀÚàÛýÝþ´½²·¢¸¨ÿØø/CueaauccleOoiZACELlooLlSsOUTtLcaiouAaZzEezCsAAESZzAadDDEdNIIeTUOoNnnSsRUrUyYt'-".'',"'Rr/; |
1574 |
|
# convert search string to lower case -> make search case insensitive |
1575 |
|
$SearchString =~ tr/A-Z/a-z/; |
1576 |
|
|
1577 |
# Add the internal search terms |
# Add the internal search terms |
1578 |
|
|
2114 |
my (@Words, $Word, @OffsetPairs, $OffsetPair, %Offsets, $Offset, $Start, $End, $OldStart, $OldEnd, $CurrentSummaryLength); |
my (@Words, $Word, @OffsetPairs, $OffsetPair, %Offsets, $Offset, $Start, $End, $OldStart, $OldEnd, $CurrentSummaryLength); |
2115 |
my ($DatabaseSummaryFilterKey, $DatabaseSummaryFilterFunction); |
my ($DatabaseSummaryFilterKey, $DatabaseSummaryFilterFunction); |
2116 |
my ($Value, %Value, @Values, $ValueEntry); |
my ($Value, %Value, @Values, $ValueEntry); |
2117 |
|
|
2118 |
|
|
2119 |
# Check input parameters |
# Check input parameters |
2120 |
if ( !defined($SearchResults) || !%Content ) { |
if ( !defined($SearchResults) || !%Content ) { |
2121 |
return (0); |
return (0); |
2122 |
} |
} |
2123 |
|
|
|
|
|
|
|
|
2124 |
# Split the search results text into a search results list |
# Split the search results text into a search results list |
2125 |
@SearchResults = split(/\n/, $SearchResults); |
@SearchResults = split(/\n/, $SearchResults); |
|
|
|
2126 |
|
|
2127 |
|
|
2128 |
# First we count up the number of results and scoop up |
# First we count up the number of results and scoop up |
2432 |
} |
} |
2433 |
|
|
2434 |
|
|
2435 |
|
### FIX:: ADD SORT HERE |
2436 |
if ( $ResultCount > 0 ) { |
if ( $ResultCount > 0 ) { |
2437 |
|
|
2438 |
# Loop over each entry in the hits list |
# Loop over each entry in the hits list |
2690 |
if ( $HTML ) { |
if ( $HTML ) { |
2691 |
print("<!-- resultItem -->\n"); |
print("<!-- resultItem -->\n"); |
2692 |
#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>"); |
2693 |
|
# decode some basic html from headline <b> <i> |
2694 |
|
$Headline =~ s/<(\/?[bi])>/<$1>/g; |
2695 |
|
|
2696 |
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> "); |
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> "); |
2697 |
} else { |
} else { |
2698 |
printf("%3d $Headline ($main::DatabaseDescriptions{$Database})\n", $Score); |
printf("%3d $Headline ($main::DatabaseDescriptions{$Database})\n", $Score); |
3216 |
print("<OPTION VALUE=\"SORT:DATE:DESC\" $Value> Datum - najprije novije\n"); |
print("<OPTION VALUE=\"SORT:DATE:DESC\" $Value> Datum - najprije novije\n"); |
3217 |
$Value = (defined($main::FormData{'Order'}) && ($main::FormData{'Order'} eq "DATEASCSORT")) ? "SELECTED" : ""; |
$Value = (defined($main::FormData{'Order'}) && ($main::FormData{'Order'} eq "DATEASCSORT")) ? "SELECTED" : ""; |
3218 |
print("<OPTION VALUE=\"SORT:DATE:ASC\" $Value> Datum - najprije starije\n"); |
print("<OPTION VALUE=\"SORT:DATE:ASC\" $Value> Datum - najprije starije\n"); |
3219 |
|
### FIX:: SORT |
3220 |
|
# print("<OPTION VALUE=\"SORT:700+:DESC\"> autor\n"); |
3221 |
|
# print("<OPTION VALUE=\"SORT:200+:DESC\"> naslov\n"); |
3222 |
print("</SELECT> </TD></TR>\n"); |
print("</SELECT> </TD></TR>\n"); |
3223 |
|
|
3224 |
|
|