#!/usr/local/bin/perl # # ice-form.pl -- cgi compliant ICE search interface // Jun 24 1996 # # ICE Version 1.31 # (C) Christian Neuss (http://www.informatik.th-darmstadt.de/~neuss) #--- start of configuration --- put your changes here --- # Title or name of your server: # Example: local($title)="ICE Indexing Gateway"; local($title)="ICE Indexing Gateway"; # search directories to present in the search dialog # Example: # local(@directories)=( # "Image Communication Information Board (/icib)", # "WISE (/some/where/wise)" # ); # local(@directories)=( # "Image Communication Information Board (/icib)", # "WISE (/www/projects/wise)", # "Multimedia Survey (/www/projects/mms)", # "Department A2 (/www/igd-a2)", # "Department A8 (/www/igd-a8)", # "Department A9 (/www/igd-a9)", # "DZSIM (/www/projects/dzsim)", # "CSCW Laboratory (/www/projects/cscw-lab)", # "Software Catalog (/www/projects/sw-catalog)", # "WWW-Schulung (/www/igd-a3/schulung)", # "DZSIM (/www/projects/dzsim)", # "ZGDV User Interface GROUP (/www/zgdv-uig)" # ); # Location of the indexfile: # Note: under Windows or Windows NT, add the drive letter # Example: $indexfile='/usr/local/etc/httpd/index/index.idx'; $indexfile='/www/htdocs/domains/domain3/00095/www.wildboar.net/webdocs/cgi/ice/ice1-31/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 = ( '/www/htdocs/domains/domain3/00095/www.wildboar.net/webdocs', ); #--- 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';