#!/usr/bin/perl $|=1; use Env; use DBI; #use CGI::Fast; use CGI; use Time::Local; my $q = new CGI; # # For fastest performance possible, we are going to try a few things # cache/read login info, usernames, passwords and login times at init # cache/read all html files to eliminate disk io $owneremail = 'koreyo@gmail.com'; $hollyemail = 'holly@peakelements.com'; $hostname = `hostname`; if($hostname !~ /onlinehome/) { $hostname = "local"; $dbhost = 'localhost'; $db = "khmarionmontana"; $dblogin = "kodell"; $dbpassword = "0Hunter"; #$dbh = DBI->connect('DBI:mysql:'.$db.':'.$dbhost, # $dblogin, $dbpassword); #&loadusers(); } open(LH, ">>/tmp/logfile"); #while($q = new CGI::Fast) { my $login; my $t; my $page; my $subpage; #my $cmds = $ARGV[0]; my $cmds = $ENV{'QUERY_STRING'}; if($cmds) { ($login, $t, $page, $subpage) = split(/\,/, $cmds); } $page = "index.html" if ! $page; if(1)#! $html{$page}) { open(FH, $page); @page = ; close FH; $html{$page} = [@page]; } print $q->header; &login() if($q->param('submit')); &createaccount() if($q->param('createaccount')); if($login && ! &checklogin($login,$t)) { print ''; exit(0); } print "[Edit]" if($login); foreach my $line(@{$html{$page}}) { if($page eq "index.html") { if($line =~ /\