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.) |
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 = ( |
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="'.$main::ConfigurationData{'image-base-path'}.'/stil.css">'; |
396 |
print("</HEAD>\n<BODY BGCOLOR=\"#FFFFFF\">\n"); |
print("</HEAD>\n<BODY BGCOLOR=\"#FFFFFF\">\n"); |
397 |
|
|
398 |
|
|
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>"); |
|
|
|
|
|
|
|
|
} |
|
|
else { |
|
|
|
|
|
print("<INPUT NAME=\"GetSearch\" TYPE=IMAGE SRC=\"$main::ConfigurationData{'image-base-path'}/$main::ImageNames{'active-search'}\" ALT=\"Search\" BORDER=0>"); |
|
|
|
|
|
|
|
507 |
|
|
508 |
} |
$DISABLED = ( %MenuBar && defined($MenuBar{'GetSearch'}) ) ? "DISABLED" : ""; |
509 |
|
print("<INPUT NAME=\"GetSearch\" TYPE=SUBMIT VALUE=\"Pretra¾ivanje\" $DISABLED class=\"navigacija${DISABLED}\">"); |
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=\"Prija¹nja pretra¾ivanja\" $DISABLED class=\"navigacija${DISABLED}\">"; |
|
} |
|
|
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=\"Spremljena pretra¾ivanja\" $DISABLED class=\"navigacija${DISABLED}\">"; |
|
} |
|
|
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=\"Korisnièki folderi\" $DISABLED class=\"navigacija${DISABLED}\">"; |
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=\"Korisnièke postavke\" $DISABLED class=\"navigacija${DISABLED}\">"; |
|
} |
|
|
|
|
|
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 |
|
|
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 |
|
|
2072 |
my (@Words, $Word, @OffsetPairs, $OffsetPair, %Offsets, $Offset, $Start, $End, $OldStart, $OldEnd, $CurrentSummaryLength); |
my (@Words, $Word, @OffsetPairs, $OffsetPair, %Offsets, $Offset, $Start, $End, $OldStart, $OldEnd, $CurrentSummaryLength); |
2073 |
my ($DatabaseSummaryFilterKey, $DatabaseSummaryFilterFunction); |
my ($DatabaseSummaryFilterKey, $DatabaseSummaryFilterFunction); |
2074 |
my ($Value, %Value, @Values, $ValueEntry); |
my ($Value, %Value, @Values, $ValueEntry); |
2075 |
|
|
2076 |
|
|
2077 |
# Check input parameters |
# Check input parameters |
2078 |
if ( !defined($SearchResults) || !%Content ) { |
if ( !defined($SearchResults) || !%Content ) { |
2079 |
return (0); |
return (0); |
2080 |
} |
} |
2081 |
|
|
|
|
|
|
|
|
2082 |
# Split the search results text into a search results list |
# Split the search results text into a search results list |
2083 |
@SearchResults = split(/\n/, $SearchResults); |
@SearchResults = split(/\n/, $SearchResults); |
|
|
|
2084 |
|
|
2085 |
|
|
2086 |
# First we count up the number of results and scoop up |
# First we count up the number of results and scoop up |
2390 |
} |
} |
2391 |
|
|
2392 |
|
|
2393 |
|
### FIX:: ADD SORT HERE |
2394 |
if ( $ResultCount > 0 ) { |
if ( $ResultCount > 0 ) { |
2395 |
|
|
2396 |
# Loop over each entry in the hits list |
# Loop over each entry in the hits list |
2648 |
if ( $HTML ) { |
if ( $HTML ) { |
2649 |
print("<!-- resultItem -->\n"); |
print("<!-- resultItem -->\n"); |
2650 |
#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>"); |
2651 |
|
# decode some basic html from headline <b> <i> |
2652 |
|
$Headline =~ s/<(\/?[bi])>/<$1>/g; |
2653 |
|
|
2654 |
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> "); |
2655 |
} else { |
} else { |
2656 |
printf("%3d $Headline ($main::DatabaseDescriptions{$Database})\n", $Score); |
printf("%3d $Headline ($main::DatabaseDescriptions{$Database})\n", $Score); |
2932 |
|
|
2933 |
|
|
2934 |
# Make sure that we send the header |
# Make sure that we send the header |
2935 |
$Value = ($ENV{'PATH_INFO'} eq "/GetExpandedSearch") ? "Pretra¾ivanje s vi¹e kriterija" : "Jednostavno pretra¾ivanje"; |
$Value = ($ENV{'PATH_INFO'} eq "/GetExpandedSearch") ? "Slo¾eno pretra¾ivanje" : "Jednostavno pretra¾ivanje"; |
2936 |
&vSendHTMLHeader($Value, undef); |
|
2937 |
|
&vSendHTMLHeader($Value, $main::JavaScript_SetChecked); |
2938 |
|
|
2939 |
undef(%Value); |
undef(%Value); |
2940 |
$Value{'GetSearch'} = "GetSearch"; |
$Value{'GetSearch'} = "GetSearch"; |
2973 |
|
|
2974 |
if ( $ENV{'PATH_INFO'} eq "/GetExpandedSearch" ) { |
if ( $ENV{'PATH_INFO'} eq "/GetExpandedSearch" ) { |
2975 |
print("<INPUT TYPE=HIDDEN NAME=\"Action\" VALUE=\"GetSimpleSearch\">\n"); |
print("<INPUT TYPE=HIDDEN NAME=\"Action\" VALUE=\"GetSimpleSearch\">\n"); |
2976 |
print("<INPUT SRC=\"$main::ConfigurationData{'image-base-path'}/$main::ImageNames{'collapse'}\" BORDER=0 TYPE=IMAGE> Kliknite na trokutiæ da biste suzili formu.\n"); |
print("<INPUT SRC=\"$main::ConfigurationData{'image-base-path'}/$main::ImageNames{'collapse'}\" BORDER=0 TYPE=IMAGE> Jednostavo pretra¾ivanje (kliknite na trokutiæ)\n"); |
2977 |
} |
} |
2978 |
else { |
else { |
2979 |
print("<INPUT TYPE=HIDDEN NAME=\"Action\" VALUE=\"GetExpandedSearch\">\n"); |
print("<INPUT TYPE=HIDDEN NAME=\"Action\" VALUE=\"GetExpandedSearch\">\n"); |
2980 |
print("<INPUT SRC=\"$main::ConfigurationData{'image-base-path'}/$main::ImageNames{'expand'}\" BORDER=0 TYPE=IMAGE> Kliknite na trokutiæ da biste pro¹irili formu.\n"); |
print("<INPUT SRC=\"$main::ConfigurationData{'image-base-path'}/$main::ImageNames{'expand'}\" BORDER=0 TYPE=IMAGE> Slo¾eno pretra¾ivanje (kliknite na trokutiæ)\n"); |
2981 |
} |
} |
2982 |
print("</FORM></TD>\n"); |
print("</FORM></TD>\n"); |
2983 |
|
|
2985 |
|
|
2986 |
# Send the start of the form and the buttons |
# Send the start of the form and the buttons |
2987 |
print("<TD ALIGN=RIGHT VALIGN=TOP>\n"); |
print("<TD ALIGN=RIGHT VALIGN=TOP>\n"); |
2988 |
print("<FORM ACTION=\"$ENV{'SCRIPT_NAME'}/GetSearchResults\" METHOD=POST> <INPUT TYPE=SUBMIT VALUE=\"Pretra¾i bazu\"> <INPUT TYPE=RESET VALUE=\"Pobri¹i polja\">\n"); |
print("<FORM ACTION=\"$ENV{'SCRIPT_NAME'}/GetSearchResults\" NAME=\"Search\" METHOD=POST> <INPUT TYPE=SUBMIT VALUE=\"Pretra¾i bazu\"> <INPUT TYPE=RESET VALUE=\"Pobri¹i polja\">\n"); |
2989 |
print("</TD></TR>\n"); |
print("</TD></TR>\n"); |
2990 |
|
|
2991 |
print("<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=3><BR></TD></TR>\n"); |
print("<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=3><BR></TD></TR>\n"); |
2992 |
|
|
2993 |
# Send the standard fields |
# Send the standard fields |
2994 |
$Value = defined($main::FormData{'Any'}) ? "VALUE='$main::FormData{'Any'}'" : ""; |
$Value = defined($main::FormData{'Any'}) ? "VALUE='$main::FormData{'Any'}'" : ""; |
2995 |
print("<TR><TD ALIGN=LEFT VALIGN=TOP COLSPAN=2> Pretra¾i u bilo kojem polju: </TD> <TD ALIGN=LEFT VALIGN=TOP> <INPUT NAME=\"Any\" TYPE=TEXT $Value SIZE=45> </TD></TR>\n"); |
print("<TR><TD ALIGN=LEFT VALIGN=TOP COLSPAN=2> Tra¾ene rijeèi neka budu u bilo kojem polju: </TD> <TD ALIGN=LEFT VALIGN=TOP> <INPUT NAME=\"Any\" TYPE=TEXT $Value SIZE=45> </TD></TR>\n"); |
2996 |
|
|
2997 |
|
|
2998 |
my $nr_fields = $main::NormalSearchDropdowns; |
my $nr_fields = $main::NormalSearchDropdowns; |
3005 |
|
|
3006 |
for (my $field=1; $field<= $nr_fields; $field++) { |
for (my $field=1; $field<= $nr_fields; $field++) { |
3007 |
|
|
3008 |
print("<TR><TD ALIGN=LEFT VALIGN=TOP>"); |
print "<TR>"; |
3009 |
if ($field == 1 ) { |
if ($field == 1 ) { |
3010 |
print ("Pretra¾i u odreðenom polju:"); |
print "<TD ALIGN=LEFT VALIGN=TOP ROWSPAN=$nr_fields>"; |
3011 |
|
print "Tra¾ene rijeèi neka budu u odabranom polju:"; |
3012 |
|
print "</td>"; |
3013 |
} |
} |
3014 |
print ("</TD><TD ALIGN=RIGHT VALIGN=TOP>"); |
print ("<TD ALIGN=RIGHT VALIGN=TOP>"); |
3015 |
|
|
3016 |
print ("<SELECT NAME=\"FieldName${field}\">"); |
print ("<SELECT NAME=\"FieldName${field}\">"); |
3017 |
for (my $i=0; $i<=$#SearchFieldNames; $i++) { |
for (my $i=0; $i<=$#SearchFieldNames; $i++) { |
3029 |
if (defined($main::FormData{"FieldContent${field}"})) { |
if (defined($main::FormData{"FieldContent${field}"})) { |
3030 |
$Value = "VALUE='".$main::FormData{"FieldContent${field}"}."'"; |
$Value = "VALUE='".$main::FormData{"FieldContent${field}"}."'"; |
3031 |
} |
} |
3032 |
print("</SELECT></TD><TD ALIGN=LEFT><INPUT NAME=\"FieldContent${field}\" TYPE=TEXT $Value SIZE=45> </TD></TR>\n"); |
print("</SELECT></TD><TD ALIGN=LEFT VALIGN=TOP><INPUT NAME=\"FieldContent${field}\" TYPE=TEXT $Value SIZE=45> </TD></TR>\n"); |
3033 |
} |
} |
3034 |
|
|
3035 |
|
|
3051 |
# Database selection |
# Database selection |
3052 |
if ( %main::DatabaseDescriptions ) { |
if ( %main::DatabaseDescriptions ) { |
3053 |
|
|
3054 |
print("<TR><TD ALIGN=LEFT VALIGN=TOP COLSPAN=3> Odaberite bazu koju ¾elite pretra¾ivati: </TD></TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=4> |
print("<TR><TD ALIGN=LEFT VALIGN=TOP COLSPAN=2> Odaberite bazu koju ¾elite pretra¾ivati:</TD></TR> |
3055 |
|
<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=4> |
3056 |
"); |
"); |
3057 |
|
|
3058 |
# Parse out the database names and put them into a |
# Parse out the database names and put them into a |
3067 |
@ItemList = split(",", $SelectedDatabases); |
@ItemList = split(",", $SelectedDatabases); |
3068 |
} |
} |
3069 |
} |
} |
|
foreach $ItemEntry ( @ItemList ) { |
|
|
$Value{$ItemEntry} = $ItemEntry; |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$Flag = 0; |
|
|
print("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>\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,"<TD ALIGN=LEFT VALIGN=TOP><INPUT TYPE=\"checkbox\" NAME=\"Database\" VALUE=\"$DatabaseName\" $Value> <A HREF=\"$ENV{'SCRIPT_NAME'}/GetDatabaseInfo?Database=$ItemEntry\" OnMouseOver=\"self.status='Informacije io bazi $main::DatabaseDescriptions{$DatabaseName} '; return true\"> $main::DatabaseDescriptions{$DatabaseName} </A> </TD>\n"; |
|
|
} else { |
|
|
push @html_database,"<td align=left valign=top>$main::DatabaseDescriptions{$DatabaseName}</td>\n"; |
|
|
} |
|
|
} |
|
|
|
|
3070 |
|
|
3071 |
if ($main::ConfigurationData{'output-colums'}) { |
&ShowDatabaseCheckBoxes(@ItemList); |
|
# 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("<tr>"); |
|
|
for(my $j=0; $j <= $cols; $j++) { |
|
|
print($html_database[$i+$next*$j+$j] || ''); |
|
|
} |
|
|
print("</tr>"); |
|
|
} |
|
|
|
|
|
} else { |
|
|
for(my $i=0; $i <= $#html_database ; $i=$i+1) { |
|
|
print("<tr>",$html_database[$i],"</tr>"); |
|
|
} |
|
|
} |
|
|
|
|
|
print("</TABLE>\n"); |
|
3072 |
|
|
3073 |
print("</TD></TR>\n"); |
print("</TD></TR>\n"); |
3074 |
|
|
3156 |
print("<OPTION VALUE=\"SORT:DATE:DESC\" $Value> Datum - najprije novije\n"); |
print("<OPTION VALUE=\"SORT:DATE:DESC\" $Value> Datum - najprije novije\n"); |
3157 |
$Value = (defined($main::FormData{'Order'}) && ($main::FormData{'Order'} eq "DATEASCSORT")) ? "SELECTED" : ""; |
$Value = (defined($main::FormData{'Order'}) && ($main::FormData{'Order'} eq "DATEASCSORT")) ? "SELECTED" : ""; |
3158 |
print("<OPTION VALUE=\"SORT:DATE:ASC\" $Value> Datum - najprije starije\n"); |
print("<OPTION VALUE=\"SORT:DATE:ASC\" $Value> Datum - najprije starije\n"); |
3159 |
|
### FIX:: SORT |
3160 |
|
# print("<OPTION VALUE=\"SORT:700+:DESC\"> autor\n"); |
3161 |
|
# print("<OPTION VALUE=\"SORT:200+:DESC\"> naslov\n"); |
3162 |
print("</SELECT> </TD></TR>\n"); |
print("</SELECT> </TD></TR>\n"); |
3163 |
|
|
3164 |
|
|
3953 |
|
|
3954 |
|
|
3955 |
# Make sure that we send the header |
# Make sure that we send the header |
3956 |
&vSendHTMLHeader("My Settings", undef); |
&vSendHTMLHeader("My Settings", $main::JavaScript_SetChecked); |
3957 |
undef(%Value); |
undef(%Value); |
3958 |
$Value{'GetUserSettings'} = "GetUserSettings"; |
$Value{'GetUserSettings'} = "GetUserSettings"; |
3959 |
&vSendMenuBar(%Value); |
&vSendMenuBar(%Value); |
3991 |
print("<H3> Postavke: </H3>\n"); |
print("<H3> Postavke: </H3>\n"); |
3992 |
|
|
3993 |
print("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>\n"); |
print("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>\n"); |
3994 |
print("<FORM ACTION=\"$ENV{'SCRIPT_NAME'}/SetUserSettings\" METHOD=POST>\n"); |
print("<FORM ACTION=\"$ENV{'SCRIPT_NAME'}/SetUserSettings\" NAME=\"Search\" METHOD=POST>\n"); |
3995 |
|
|
3996 |
# Send the buttons |
# Send the buttons |
3997 |
print("<TR><TD ALIGN=RIGHT VALIGN=TOP COLSPAN=2> <INPUT TYPE=RESET VALUE=\"Pobri¹i polja\"> <INPUT TYPE=SUBMIT VALUE=\"Saèuvaj postavke\"> </TD></TR>\n"); |
print("<TR><TD ALIGN=RIGHT VALIGN=TOP COLSPAN=2> <INPUT TYPE=RESET VALUE=\"Pobri¹i polja\"> <INPUT TYPE=SUBMIT VALUE=\"Saèuvaj postavke\"> </TD></TR>\n"); |
4053 |
|
|
4054 |
print("<TR><TD ALIGN=LEFT VALIGN=TOP COLSPAN=2> <B> Odabrane baze: </B> </TD></TR>\n"); |
print("<TR><TD ALIGN=LEFT VALIGN=TOP COLSPAN=2> <B> Odabrane baze: </B> </TD></TR>\n"); |
4055 |
|
|
4056 |
print("<TR><TD ALIGN=LEFT VALIGN=TOP> Oznaèite baze koje uvijek ¾elite pretra¾ivati: </TD> <TD ALIGN=LEFT VALIGN=TOP>\n"); |
print("<TR><TD ALIGN=LEFT VALIGN=TOP COLSPAN=2> Oznaèite baze koje uvijek ¾elite pretra¾ivati:</TD></TR><TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=2>\n"); |
4057 |
|
|
4058 |
# Parse out the database names and put them into a |
# Parse out the database names and put them into a |
4059 |
# hash table, they should be separated with a '\n' |
# hash table, they should be separated with a '\n' |
|
undef(%Value); |
|
4060 |
if ( defined($SelectedDatabases) && ($SelectedDatabases ne "") ) { |
if ( defined($SelectedDatabases) && ($SelectedDatabases ne "") ) { |
4061 |
@ItemList = split(",", $SelectedDatabases); |
@ItemList = split(",", $SelectedDatabases); |
|
foreach $ItemEntry ( @ItemList ) { |
|
|
$Value{$ItemEntry} = $ItemEntry; |
|
|
} |
|
4062 |
} |
} |
4063 |
|
|
4064 |
$Flag = 0; |
&ShowDatabaseCheckBoxes(@ItemList); |
4065 |
print("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%\n"); |
|
|
|
|
|
foreach $DatabaseName ( sort(keys(%main::DatabaseDescriptions)) ) { |
|
|
|
|
|
if ( $Flag == 0 ) { |
|
|
print("<TR>"); |
|
|
} |
|
|
|
|
|
$Value = ((defined($Value{$DatabaseName})) || (scalar(keys(%main::DatabaseDescriptions)) == 1)) ? "CHECKED" : ""; |
|
|
$ItemEntry = &lEncodeURLData($DatabaseName); |
|
|
print("<TD ALIGN=LEFT VALIGN=TOP><INPUT TYPE=\"checkbox\" NAME=\"SelectedDatabases\" VALUE=\"$DatabaseName\" $Value> <A HREF=\"$ENV{'SCRIPT_NAME'}/GetDatabaseInfo?Database=$ItemEntry\" OnMouseOver=\"self.status='Get Information about the $main::DatabaseDescriptions{$DatabaseName} database'; return true\"> $main::DatabaseDescriptions{$DatabaseName} </A></TD>\n"); |
|
|
|
|
|
if ( $Flag == 1 ) { |
|
|
print("</TR>"); |
|
|
$Flag = 0; |
|
|
} |
|
|
else { |
|
|
$Flag = 1; |
|
|
} |
|
|
} |
|
|
print("</TABLE>\n"); |
|
4066 |
print("</TD></TR>\n"); |
print("</TD></TR>\n"); |
4067 |
} |
} |
4068 |
|
|
4206 |
$Value{'UserName'} = $main::FormData{'UserName'}; |
$Value{'UserName'} = $main::FormData{'UserName'}; |
4207 |
$Value{'EmailAddress'} = $main::FormData{'EmailAddress'}; |
$Value{'EmailAddress'} = $main::FormData{'EmailAddress'}; |
4208 |
$Value{'DefaultSearch'} = $main::FormData{'DefaultSearch'}; |
$Value{'DefaultSearch'} = $main::FormData{'DefaultSearch'}; |
4209 |
$Value{'SelectedDatabases'} = $main::FormData{'SelectedDatabases'}; |
$Value{'SelectedDatabases'} = $main::FormData{'Database'}; |
4210 |
if ( defined($Value{'SelectedDatabases'}) ) { |
if ( defined($Value{'SelectedDatabases'}) ) { |
4211 |
$Value{'SelectedDatabases'} =~ s/\0/,/g; |
$Value{'SelectedDatabases'} =~ s/\0/,/g; |
4212 |
} |
} |
7100 |
} |
} |
7101 |
|
|
7102 |
|
|
7103 |
if ( defined($main::FormData{'GetSearch.x'}) ) { |
if ( defined($main::FormData{'GetSearch'}) ) { |
7104 |
$ENV{'PATH_INFO'} = "/GetSearch"; |
$ENV{'PATH_INFO'} = "/GetSearch"; |
7105 |
delete($main::FormData{'GetSearch.x'}); |
delete($main::FormData{'GetSearch'}); |
7106 |
delete($main::FormData{'GetSearch.y'}); |
delete($main::FormData{'GetSearch'}); |
7107 |
} |
} |
7108 |
|
|
7109 |
if ( defined($main::FormData{'ListSearchHistory.x'}) ) { |
if ( defined($main::FormData{'ListSearchHistory'}) ) { |
7110 |
$ENV{'PATH_INFO'} = "/ListSearchHistory"; |
$ENV{'PATH_INFO'} = "/ListSearchHistory"; |
7111 |
delete($main::FormData{'ListSearchHistory.x'}); |
delete($main::FormData{'ListSearchHistory'}); |
7112 |
delete($main::FormData{'ListSearchHistory.y'}); |
delete($main::FormData{'ListSearchHistory'}); |
7113 |
} |
} |
7114 |
|
|
7115 |
if ( defined($main::FormData{'ListSavedSearch.x'}) ) { |
if ( defined($main::FormData{'ListSavedSearch'}) ) { |
7116 |
$ENV{'PATH_INFO'} = "/ListSavedSearch"; |
$ENV{'PATH_INFO'} = "/ListSavedSearch"; |
7117 |
delete($main::FormData{'ListSavedSearch.x'}); |
delete($main::FormData{'ListSavedSearch'}); |
7118 |
delete($main::FormData{'ListSavedSearch.y'}); |
delete($main::FormData{'ListSavedSearch'}); |
7119 |
} |
} |
7120 |
|
|
7121 |
if ( defined($main::FormData{'ListFolder.x'}) ) { |
if ( defined($main::FormData{'ListFolder'}) ) { |
7122 |
$ENV{'PATH_INFO'} = "/ListFolder"; |
$ENV{'PATH_INFO'} = "/ListFolder"; |
7123 |
delete($main::FormData{'ListFolder.x'}); |
delete($main::FormData{'ListFolder'}); |
7124 |
delete($main::FormData{'ListFolder.y'}); |
delete($main::FormData{'ListFolder'}); |
7125 |
} |
} |
7126 |
|
|
7127 |
if ( defined($main::FormData{'GetUserSettings.x'}) ) { |
if ( defined($main::FormData{'GetUserSettings'}) ) { |
7128 |
$ENV{'PATH_INFO'} = "/GetUserSettings"; |
$ENV{'PATH_INFO'} = "/GetUserSettings"; |
7129 |
delete($main::FormData{'GetUserSettings.x'}); |
delete($main::FormData{'GetUserSettings'}); |
7130 |
delete($main::FormData{'GetUserSettings.y'}); |
delete($main::FormData{'GetUserSettings'}); |
7131 |
} |
} |
7132 |
|
|
7133 |
|
|
7369 |
} |
} |
7370 |
} |
} |
7371 |
} |
} |
7372 |
|
|
7373 |
|
#-------------------------------------------------------------------------- |
7374 |
|
# show list of all databases |
7375 |
|
# |
7376 |
|
# usage: ShowDatabaseCheckBoxes(@SelectedDatabases) |
7377 |
|
|
7378 |
|
sub ShowDatabaseCheckBoxes { |
7379 |
|
# Parse out the database names and put them into a |
7380 |
|
# hash table, they should be separated with a '\0' |
7381 |
|
my %Value; |
7382 |
|
|
7383 |
|
foreach my $ItemEntry ( @_ ) { |
7384 |
|
$Value{$ItemEntry} = $ItemEntry; |
7385 |
|
} |
7386 |
|
|
7387 |
|
print("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>\n"); |
7388 |
|
print "<tr><td colspan=3 align=\"center\"> |
7389 |
|
<font size=-1>Oznaèi |
7390 |
|
<a href=\"javascript:SetChecked(1)\">sve</a>, |
7391 |
|
<a href=\"javascript:SetChecked(0)\">niti jednu</a>. |
7392 |
|
</font> |
7393 |
|
</td></tr>"; |
7394 |
|
|
7395 |
|
my @html_database; |
7396 |
|
|
7397 |
|
foreach my $key ( sort keys %main::DatabaseSort ) { |
7398 |
|
my $DatabaseName = $main::DatabaseSort{$key}; |
7399 |
|
my $Value = ((defined($Value{$DatabaseName})) || (scalar(keys(%main::DatabaseDescriptions)) == 1) || !defined($main::RemoteUser) ) ? "CHECKED" : ""; |
7400 |
|
my $ItemEntry = &lEncodeURLData($DatabaseName); |
7401 |
|
if ($main::DatabaseDescriptions{$DatabaseName}) { |
7402 |
|
push @html_database,"<TD ALIGN=LEFT VALIGN=TOP><INPUT TYPE=\"checkbox\" NAME=\"Database\" VALUE=\"$DatabaseName\" $Value> <A HREF=\"$ENV{'SCRIPT_NAME'}/GetDatabaseInfo?Database=$ItemEntry\" OnMouseOver=\"self.status='Informacije io bazi $main::DatabaseDescriptions{$DatabaseName} '; return true\"> $main::DatabaseDescriptions{$DatabaseName} </A> </TD>\n"; |
7403 |
|
} else { |
7404 |
|
push @html_database,"<td align=left valign=top>$main::DatabaseDescriptions{$DatabaseName}</td>\n"; |
7405 |
|
} |
7406 |
|
} |
7407 |
|
|
7408 |
|
|
7409 |
|
if ($main::ConfigurationData{'output-colums'}) { |
7410 |
|
# create database names in columns |
7411 |
|
|
7412 |
|
my $cols = $main::ConfigurationData{'show-nr-colums'}; |
7413 |
|
my $next = int($#html_database/$cols) ; |
7414 |
|
|
7415 |
|
for(my $i=0; $i <= $next ; $i++) { |
7416 |
|
print("<tr>"); |
7417 |
|
for(my $j=0; $j <= $cols; $j++) { |
7418 |
|
print($html_database[$i+$next*$j+$j] || ''); |
7419 |
|
} |
7420 |
|
print("</tr>"); |
7421 |
|
} |
7422 |
|
|
7423 |
|
} else { |
7424 |
|
for(my $i=0; $i <= $#html_database ; $i=$i+1) { |
7425 |
|
print("<tr>",$html_database[$i],"</tr>"); |
7426 |
|
} |
7427 |
|
} |
7428 |
|
|
7429 |
|
print("</TABLE>\n"); |
7430 |
|
} |