#!/usr/local/bin/perl
# search_form.cgi -- cgi compliant ICE search interface
#
# ICE Version 1.5 beta 3 rev1
# September 1998
# (C) Christian Neuss (ice@isa.informatik.th-darmstadt.de)
# Modified by Chris Samaritoni
# Jan 1999
#--- start of configuration --- put your changes here ---
# NOTE: $ENV{'DOCUMENT_ROOT'} contains the full path to your web documents.
# Title or name of your server:
# Example: local($title)="Search this server";
local($title)="Search this server";
# Header for the HTML output. "###TITLE###" will be replaced with dynamic text
# (ie. "Query results" or "Error in script").
$header = <<__EOT__;
###TITLE###
###TITLE###
__EOT__
# Footer for the HTML output
$footer = <<__EOT__;
This searchable archive was implemented with the
ICE search engine (boolean patch pj9711)
__EOT__
# Location of the indexfile:
# Note: under Windows or Windows NT, add the drive letter. Make sure
# this the same as in search_index.cg
# Example: $indexfile="$ENV{'DOCUMENT_ROOT'}/cgi-bin/index.idx";
$indexfile="$ENV{'DOCUMENT_ROOT'}/cgi-bin/index.idx";
# The Document Root is the directory where the "top level"
# documents reside.
# Example
# $docroot = "$ENV{'DOCUMENT_ROOT'}"
$docroot = $ENV{'DOCUMENT_ROOT'};
# Maximum number of hits to return
# Example:
# $MAXHITS=100;
$MAXHITS=50;
# Minimum length of word to be indexed (same as in search_index.cgi)
# Example:
# $MINLEN=3;
$MINLEN=3;
#--- end of configuration --- you don't have to change anything below ---
local(@errStack);
# do the real work, but trap any errors
eval '&main';
# if an error has occured, log it to stdout
if($@){
&send_header("Error in Script"); # just in case
print "$@\n