www.pudn.com > bbs3000afree.zip > friend.cgi
#!/usr/bin/perl
#------------------------------------------------------#
# 本程序为Yuzi工作室提供 #
# Yuzi论坛3000(BBS3000)v4.00 #
#------------------------------------------------------#
$cgipa="."; # CGI程序文件的绝对路径
######################
## 以下部分不需修改 ##
######################
require "$cgipa/setup.cgi";
&GetCookies;
if($Cookies{username} eq ""){&okview("您当前的身份是访客,请登陆!");}
##########
if ($ENV{'REQUEST_METHOD'} eq "POST") {
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
}
else {
$buffer = $ENV{'QUERY_STRING'};
}
@pairs = split(/&/, $buffer);
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/\t/ /g;
$value=~s/>/>/g;
$value=~s/</g;
$value=~s/\.\.//g;
$FORM{$name} = $value;
}
##########
$menu=$FORM{'menu'};
$add=$FORM{'add'};
$tu=$FORM{'tu'};
$page=$FORM{'page'};
if($menu eq "add"){&add;exit;}
if($menu eq "addhtml"){&addhtml;exit;}
if($menu eq "del"){&del;exit;}
if($menu eq "delhtml"){&delhtml;exit;}
if($menu eq "fshtml"){&fshtml;exit;}
if($menu eq "look"){&look;exit;}
if($menu eq "chatlog"){&chatlog;exit;}
##########
open(PSD,"$filepath/friend/$Cookies{username}.cgi");
@lines=;
close(PSD);
foreach $line (@lines) {
chomp($line);
open(yhzl,"$filepath/yhzl/$line.cgi");
$yhzl=;
close(yhzl);
($rdpassword,$rdname,$rdmail,$rdhome,$rdlasttime,$rdqm,$rdsex,$rdwork,$rdcity,$rdlove,$rfy,$rhf,$tu)=split(/\t/,$yhzl);
$friend="$friend  | $rdname |
";}
open(yhzl,"$filepath/yhzl/$Cookies{username}.cgi");
$yhzl=;
close(yhzl);
($rdpassword,$rdname,$rdmail,$rdhome,$rdlasttime,$rdqm,$rdsex,$rdwork,$rdcity,$rdlove,$rfy,$rhf,$tu)=split(/\t/,$yhzl);
print "Content-type: text/html\n\n";
print <$Cookies{username}的网络寻呼机