($lastsec,$lastmin,$lasthour,$lastmday,$lastmon,$lastyear)=localtime(time); $lastmon = $lastmon+1; $lastyear = $lastyear+1900; sub checknull { if ($_[0] eq "") { &errorinput($_[1]); } else { if ($allow_html ==0) { $return=&filterhtml($_[0]); } else { $return=$_[0]; } } return $return; } sub htmlhead { print "Content-type: text/html\n\n"; } sub errorinput { &htmlhead; open(FILE,"$filepath/html/error.htm"); @file = ; close(FILE); foreach (@file) { $_ =~ s/\$bgcolor/$bgcolor/g; $_ =~ s/\$linkcolor/$linkcolor/g; $_ =~ s/\$textcolor/$textcolor/g; $_ =~ s/\$titledarkcolor/$titledarkcolor/g; $_ =~ s/\$titlelightcolor/$titlelightcolor/g; $_ =~ s/\$error/$_[0]/g; $_ =~ s/\$title/$title/g; print $_; } exit; } sub okinput { &htmlhead; open(FILE,"$filepath/html/ok.html"); @file = ; close(FILE); foreach (@file) { $_ =~ s/\$bgcolor/$bgcolor/g; $_ =~ s/\$linkcolor/$linkcolor/g; $_ =~ s/\$textcolor/$textcolor/g; $_ =~ s/\$titledarkcolor/$titledarkcolor/g; $_ =~ s/\$titlelightcolor/$titlelightcolor/g; $_ =~ s/\$title/$title/g; $_ =~ s/\$oktitle/$_[0]/g; $_ =~ s/\$okcontent/$_[1]/g; print $_; } exit; } sub filterhtml { local($return)=$_[0]; $return =~ s///g; if ($allow_html == 0) { $return =~ s/\\n/<\/br>/g; #$return =~ s/<([^>]|\n)*>/<\/br>/g; $return =~ s/