--- search/Search.cgi 2002/06/13 17:01:56 1.1 +++ search/Search.cgi 2002/06/24 14:50:44 1.6 @@ -12,6 +12,8 @@ # of FS Consulting, Inc. * #***************************************************************************** +#print "Content-type: text/plain\n\n"; + #-------------------------------------------------------------------------- # # Author: Francois Schiettecatte (FS Consulting, Inc.) @@ -179,53 +181,8 @@ # -# List of default configuration settings -%main::DefaultSettings = ( - 'lowest-year', '1990', - 'max-score', '1000', - 'allow-summary-displays','no', - 'allow-similiar-search','no', - 'allow-regular-searches','no', - 'deliver-empty-results-from-regular-search','no', -# 'allow-relevance-feedback-searches','no', - 'mailer-application','/usr/lib/sendmail', - 'server-log','mps.log', - 'output-colums','yes', -# 'show-past-date-list','yes', - 'database-for-SearchFieldDescriptions','ps', -); - -# DbP: Define which fields you have in normal and advanced search -# first define all available fields and then how many fields of that -# are visible. -@main::NormalSearchFieldNames = ( - '700+', - '200+', - '610', - '210', - '10', - -); -$main::NormalSearchDropdowns = 3 ; - -@main::AdvancedSearchFieldNames = ( - '700+', - '200+', - '610', - '210', - '225', - '300+', - '330', - '464', - '675', - '686', - '990', - '991', - '10', - '001', -); -$main::AdvancedSearchDropdowns = 4 ; - +# read configuration fields +require "config.pm"; # List of required configuration settings @main::RequiredSettings = ( @@ -436,7 +393,7 @@ if ( ! $ENV{'GATEWAY_INTERFACE'} ) { return; } - + # Bail if we have already sent the header if ( $main::HeaderSent ) { return; @@ -461,8 +418,11 @@ # Send the banner print("\n"); - print("\n"); - print("
\"Return
\n"); +# print(" \"Return \n"); + + print("

Katalozi knjižnica Filozofskog fakulteta

\n"); + + print("\n"); # Set the flag saying that the header has been sent @@ -561,11 +521,15 @@ if ( %MenuBar && defined($MenuBar{'GetSearch'}) ) { print("\"Search\""); + + } else { + print(""); - + + } if ( defined($main::RemoteUser) ) { @@ -2724,12 +2688,13 @@ # Put up the headline and the score, this one links to the document if ( $HTML ) { print("\n"); - print(" $SelectorText $Score $Headline ( $main::DatabaseDescriptions{$Database} )
"); - } - else { + #print(" $SelectorText $Score $Headline ( $main::DatabaseDescriptions{$Database} )
"); + print(" $SelectorText $Headline
 "); + } else { printf("%3d $Headline ($main::DatabaseDescriptions{$Database})\n", $Score); } +if (0) { ## don't display description # Put up the summary if ( defined($SummaryText) && ($SummaryText ne "") ) { @@ -2746,6 +2711,7 @@ if ( ! defined($Remainder) ) { if ( $HTML ) { print("Formatttt: $MimeTypeName, "); + } else { print(" Format: $MimeTypeName, "); @@ -2754,11 +2720,11 @@ # Put up the date if we got it - if ( defined($Date) && ($Date ne "") ) { + if ( defined($Date) && ($Date ne "") ) { print("Date: $Date"); # Put up the time if we got it - if ( defined($Time) && ($Time ne "") ) { + if ( defined($Time) && ($Time ne "") ) { print(" $Time"); } @@ -2889,6 +2855,7 @@ } print("\n"); +} #if # Finish off the entry if ( $HTML ) { print("\n"); @@ -3004,7 +2971,23 @@ # Make sure that we send the header $Value = ($ENV{'PATH_INFO'} eq "/GetExpandedSearch") ? "Pretraživanje s više kriterija" : "Jednostavno pretraživanje"; - &vSendHTMLHeader($Value, undef); + my $JavaScript = ' + '; + + &vSendHTMLHeader($Value, $JavaScript); undef(%Value); $Value{'GetSearch'} = "GetSearch"; @@ -3055,7 +3038,7 @@ # Send the start of the form and the buttons print("\n"); - print("
\n"); + print(" \n"); print("\n"); print("
\n"); @@ -3084,10 +3067,19 @@ print (" \n"); } @@ -3110,7 +3102,8 @@ # Database selection if ( %main::DatabaseDescriptions ) { - print(" Odaberite bazu koju želite pretraživati: \n"); + print(" Odaberite bazu koju želite pretraživati: + "); # Parse out the database names and put them into a # hash table, they should be separated with a '\0' @@ -3131,7 +3124,13 @@ $Flag = 0; - print("\n"); + + print(' + all + none + '); + + print("
\n"); my @html_database; @@ -3150,12 +3149,15 @@ if ($main::ConfigurationData{'output-colums'}) { # create database names in columns - my $max = $#html_database+1 ; + my $cols = $main::ConfigurationData{'show-nr-colums'}; + my $next = int($#html_database/$cols) ; - my $j=0; - for(my $i=0; $i < $max ; $i=$i+2) { - print("",$html_database[$j],$html_database[$j+int($max/2)],""); - $j++; + for(my $i=0; $i <= $next ; $i++) { + print(""); + for(my $j=0; $j <= $cols; $j++) { + print($html_database[$i+$next*$j+$j] || ''); + } + print(""); } } else {