#!/sw/local/bin/perl -- use base; use CGI; require "hostname.pl"; # $ENV{PATH} = "/bin:/usr/bin:/usr/local/bin:/usr/gnu/bin"; # ---------------------------------------------------------------------- # Configuration variables. $hostname = hostname; if ($hostname eq "twilight") { $datdir = "F:/adv/adventure"; } else { $datdir = "/home/sites/www.if-legends.org/users/adventure/web"; } $debug = 0; # End of configuration variables. #---------------------------------------------------------------------- #$game_file = "$datdir/search.dat"; $game_file = "search.dat"; open(GAMES, "$game_file") || die("Can't open $game_file!"); $req = new CGI; $r_mode = $req->param('mode'); $r_string = $req->param('string'); $r_game = $req->param('game'); $r_year = $req->param('year'); $r_company = $req->param('company'); $r_type = $req->param('type'); $r_author = $req->param('author'); print $req->header; print "
Search was: $r_mode = $r_string\n" if ($r_mode);
while ($line = $company: $game" . ($year ? " ($year)" : "") . "\n";
$hits++;
}
print " $hits game" . ($hits == 1 ? "" : "s") . " match your query.\n";
print " Adventureland was created by Hans Persson and is now maintained by Stefan Meier (adventureland\@if-legends.org).\n";
print " If you find any errors or have information that is missing, please let me know.\n";
print "\n";
print $req->end_html;
\n" if ($debug);
print "
game = $r_game\n" if ($debug);
print "
year = $r_year\n" if ($debug);
print "
company = $r_company\n" if ($debug);
print "
type = $r_type\n" if ($debug);
print "
Looking in $datdir with host '$hostname'.\n" if ($debug);
print "
\n";
print "