#!/usr/local/bin/perl #/usr/local/bin/perl # # ice-form.pl -- cgi compliant ICE search interface // Oct 12 1995 # # (C) Christian Neuss 1995 (neuss@isa.informatik.th-darmstadt.de) #--- start of configuration --- put your changes here --- # Title or name of your server: # Example: local($title)="ICE Indexing Gateway"; local($title)="Priory Lodge Education Search Engine"; # search directories to present in the search dialogue # Example: # local(@directories)=( # "Image Communication Information Board (/icib)", # "WISE (/some/where/wise)" # ); # Original code commented out KHT #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)" #); local(@directories)=(""); # Location of the indexfile: # Example: $indexfile="/usr/local/etc/httpd/index/index.idx"; $indexfile="../cgi-out/index.idx"; # Location of the thesaurus data file: # Example: $thesfile="/igd/a3/home1/neuss/Perl/thes.dat"; $thesfile="../cgi-out/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 = ('/journals', '/users/ad88',); %urltopath = ( '/', '/' ); #--- end of configuration --- don't 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 Priory 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 "\n", $title,"\n\n"; print "\n"; print "

$title

\n"; print "
\n"; } # display the Forms interface #
  • Don't Show documents older than # days, # leave this empty to get all documents available. sub send_index { local($scriptname) = $ENV{"SCRIPT_NAME"}; print "
    \n"; print <<'END';