#!/usr/bin/perl if ($ENV{'QUERY_STRING'}) {$namevalues = $ENV{'QUERY_STRING'};} else {read(STDIN, $namevalues, $ENV{'CONTENT_LENGTH'});} @pairs = split(/&/, $namevalues); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s///g; $value =~ s/<([^>]|\n)*>//g; $form{$name} = $value;} print "Content-Type: text/html; charset=gb2312 \n\n"; #--------~~~~~VARIABLES~~~~~~~-------# #header of every page $header = "header.htm"; #footer of every page $footer = "footer.htm"; # Url to admin script $scripturl = "2badmin.pl"; # path to base where info stored $base = "base.txt"; # pic for table creation $pixel = "pixel.gif"; # this picture split visitor post and admin reply $line = "dots.gif"; # Your admin password, change it!! $pass = "admin"; #now run script www.example.com/cgi-bin/guest/2badmin.pl?action=login #end of editing ! &header; $action = $form{'action'}; if ($action eq 'main') {&main;} if ($action eq 'login') {&login;} if ($action eq 'last_mess') {&last_mess;} if ($action eq 'by_date') {&by_date;} if ($action eq 'delete') {&delete;} if ($action eq 'reply') {&reply;} if ($action eq 'reply1') {&reply1;} if ($action eq 'viewmail') {&viewmail;} $cp = $form{'cpassword'}; $action = $form{'action'}; #$pass = "east0113"; #ADMIN LOGIN sub login { print qq~
$desc | ||
姓名 : $name mail : $mail 网址 : $url 地区 : $country 发布日期 : $date IP : $ip |
$temo[$in] 回复 : |
单位 :$temo[$in+2] |
$temo[$in+3] |
$desc | ||
姓名 : $name mail : $mail 网址 : $url 地区 : $country 发布日期 : $date IP : $ip |
$temo[$in] 回复 : |
单位 :$temo[$in+2] |
$temo[$in+3] |
$desc | |
name : $name mail : $mail url : $url country : $country post date : $date IP : $ip | |
请回复该留言 :
/g;
$reply2 =~ s/\n/ E-mail 列表 :
/g;
open(FILE, "$base");
@indata =
";
print "<< 返回到管理页面" ;
}
sub header {
open(FILE,"$header");
while(
";
close (FILE);
#print "$new_row";
open (FILE, ">$base");
print FILE "$new_row";
close (FILE);
print "
";
print "<< 返回到管理页面" ;
}
sub viewmail {
&check_pass;
$cp = $form{'cpassword'};
print "