#!/usr/local/bin/perl #################################################################### ##################################################################### push (@INC, "/home/west/west-east.net/go/"); require "where_prefs.pl"; $ENV{'HTTP_HOST'} =~ tr/A-Z/a-z/; ($path, $rest) = split (/\./, $ENV{'HTTP_HOST'}, 2); # Open Database open (FILE, "$datafile") || die ("Can't open $datafile!"); foreach $line (&read_file("FILE")) { # split the fields at the | character @tabledata = split(/\|/,$line ,$datafields); &check_record; if ($path eq $field1 && $field9 eq "active"){ print "content-type:text/html\n\n"; print "\n"; print "$field3\n"; print "\n"; print "\n"; exit; } elsif ($path eq $field1 && $field9 eq "with_ad"){ print "content-type:text/html\n\n"; print "\n"; print "$field3\n"; print "\n"; print "\n"; print "\n"; exit; } } open(DEFAULT, "$default") || print "no file found $default!"; $template = ""; while() { $home_page .= $_; } close(DEFAULT); print "content-type:text/html\n\n"; print "$home_page\n"; exit;