#!/usr/bin/perl
#
# search.pl
# TheLitterBox.  Copyright 2000.
#
# what does the user want to find?
($dump,$search) = split(/=/,$ENV{'QUERY_STRING'});
# let's not make the search case-sensitive, ok?
$ucsearch = uc($search);
$THE_FILE = "/ddrive/thelitterbox.net/foti/nodelist.now";
# $THE_FILE = "../nodelist.mas";
# open THE_FILE or die "can't find file: $!\n";

print "Content-type: text/html\n\n";
print "<HTML>";
print "<BODY bgcolor=#eee8aa>";
print "<TITLE>FOTI Current Nodelist Search Results</TITLE>";
print "<CENTER>";
print "<img border=0 src=http://www.fidonet-on-the-internet.org/images/foti.gif><br>";
print "<FONT SIZE=+2>FOTI's Current Nodelist Search</FONT><br>";
print "<hr width=95%><br>";
print "Searching for '$search' <br>";
print "<hr width=95%><br>";
print "</CENTER>";

if ($search ne "")
{
  if (open(THE_FILE, "/var/www/html/foti/nodelist.now"))
# 30
  {
# begin the table
    while (<THE_FILE>)
    {
       $record = $_;
       $_ = uc($_);
       if (/$ucsearch/)
       {
         print "$record<br>";
       }
    }
    close(THE_FILE);
  }
}
else
{
	print "<FONT SIZE=+4>No query string given</FONT>";
}
print "<br>";
print "<CENTER>";
print "<hr width=95%><br>";
print "<a href=http://www.fidonet-on-the-internet.org/><img border=0 src=http://www.fidonet-on-the-internet.org/images/lbullet.gif></a><br>";
print "</BODY></HTML>";
