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.) |
2112 |
my (@Words, $Word, @OffsetPairs, $OffsetPair, %Offsets, $Offset, $Start, $End, $OldStart, $OldEnd, $CurrentSummaryLength); |
my (@Words, $Word, @OffsetPairs, $OffsetPair, %Offsets, $Offset, $Start, $End, $OldStart, $OldEnd, $CurrentSummaryLength); |
2113 |
my ($DatabaseSummaryFilterKey, $DatabaseSummaryFilterFunction); |
my ($DatabaseSummaryFilterKey, $DatabaseSummaryFilterFunction); |
2114 |
my ($Value, %Value, @Values, $ValueEntry); |
my ($Value, %Value, @Values, $ValueEntry); |
2115 |
|
|
2116 |
|
|
2117 |
# Check input parameters |
# Check input parameters |
2118 |
if ( !defined($SearchResults) || !%Content ) { |
if ( !defined($SearchResults) || !%Content ) { |
2119 |
return (0); |
return (0); |
2120 |
} |
} |
2121 |
|
|
|
|
|
|
|
|
2122 |
# Split the search results text into a search results list |
# Split the search results text into a search results list |
2123 |
@SearchResults = split(/\n/, $SearchResults); |
@SearchResults = split(/\n/, $SearchResults); |
|
|
|
2124 |
|
|
2125 |
|
|
2126 |
# First we count up the number of results and scoop up |
# First we count up the number of results and scoop up |
2430 |
} |
} |
2431 |
|
|
2432 |
|
|
2433 |
|
### FIX:: ADD SORT HERE |
2434 |
if ( $ResultCount > 0 ) { |
if ( $ResultCount > 0 ) { |
2435 |
|
|
2436 |
# Loop over each entry in the hits list |
# Loop over each entry in the hits list |
2688 |
if ( $HTML ) { |
if ( $HTML ) { |
2689 |
print("<!-- resultItem -->\n"); |
print("<!-- resultItem -->\n"); |
2690 |
#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>"); |
2691 |
|
# decode some basic html from headline <b> <i> |
2692 |
|
$Headline =~ s/<(\/?[bi])>/<$1>/g; |
2693 |
|
|
2694 |
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> "); |
2695 |
} else { |
} else { |
2696 |
printf("%3d $Headline ($main::DatabaseDescriptions{$Database})\n", $Score); |
printf("%3d $Headline ($main::DatabaseDescriptions{$Database})\n", $Score); |
3214 |
print("<OPTION VALUE=\"SORT:DATE:DESC\" $Value> Datum - najprije novije\n"); |
print("<OPTION VALUE=\"SORT:DATE:DESC\" $Value> Datum - najprije novije\n"); |
3215 |
$Value = (defined($main::FormData{'Order'}) && ($main::FormData{'Order'} eq "DATEASCSORT")) ? "SELECTED" : ""; |
$Value = (defined($main::FormData{'Order'}) && ($main::FormData{'Order'} eq "DATEASCSORT")) ? "SELECTED" : ""; |
3216 |
print("<OPTION VALUE=\"SORT:DATE:ASC\" $Value> Datum - najprije starije\n"); |
print("<OPTION VALUE=\"SORT:DATE:ASC\" $Value> Datum - najprije starije\n"); |
3217 |
|
### FIX:: SORT |
3218 |
|
# print("<OPTION VALUE=\"SORT:700+:DESC\"> autor\n"); |
3219 |
|
# print("<OPTION VALUE=\"SORT:200+:DESC\"> naslov\n"); |
3220 |
print("</SELECT> </TD></TR>\n"); |
print("</SELECT> </TD></TR>\n"); |
3221 |
|
|
3222 |
|
|