#!/usr/local/bin/perl # # ice-form.pl -- cgi compliant ICE search interface // Jun 24 1996 # # ICE Version 1.31 # (C) Christian Neuss (http://www.objectweaver.de/ice) #--- start of configuration --- put your changes here --- # Title or name of your server: # Example: local($title)="Coup de Foudre, LLC Search Form Using ICE Indexing Gateway"; local($title)="Coup Search Engine"; # search directories to present in the search dialogue # Example: # local(@directories)=( # "Image Communication Information Board (/icib)", # "WISE (/some/where/wise)" # ); local(@directories)=( ); # Location of the indexfile: # Note: under Windows or Windows NT, add the drive letter # Example: $indexfile='/usr/local/etc/httpd/index/index.idx'; $indexfile='/usr/home/norman/public_html/index.idx'; # Location of the thesaurus data file: # Example: $thesfile='/igd/a3/home1/neuss/Perl/thes.dat'; #$thesfile='/igd/a3/home1/neuss/Perl/thes.dat'; # URL Mappings (a.k.a Aliases) that your server does # map "/" to some path to reflect a "document root" # Example # %urltopath = ( # '/projects', '/usr/stud/proj', # '/people', '/usr3/webstuff/staff', # '/', '/usr3/webstuff/documents', # ); # %urltopath = ( '/', 'usr/home/norman/public_html/', ); #--- end of configuration --- you don't have to change anything below --- # if this script is called up "by hand", run a test unless($ENV{"SCRIPT_NAME"}){ local($word) = ($#ARGV==-1) ? "the" : $ARGV[0] ; print "You have called the ice forms interface manually.\n"; print "Optionally, provide search word as an argument.\n"; print "Test mode: search for \"$word\"\n"; print "--------\n"; $orig="$word @ /"; $foo=&getquery($orig); print $foo; exit; } # 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"; } # print the CGI script header sub send_header { local($title)=@_; print "Content-type: text/html\n\n"; print ""; print $title; print "\n"; } # display the Forms interface sub send_index { local($scriptname) = $ENV{"SCRIPT_NAME"}; print ''; print "

$title

"; print "
\n"; print <<'END';