⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 quote.cgi

📁 --黑客防线-精华奉献本(攻册)
💻 CGI
字号:
#!/usr/bin/perl
#------------------------------------------------------#
#         本程序为Yuzi工作室提供        #
#        Yuzi论坛3000(BBS3000)v4.00      #
#------------------------------------------------------#
$cgipa=".";  # CGI程序文件的绝对路径
######################
## 以下部分不需修改 ##
######################
require "$cgipa/setup.cgi";
&GetCookies;
if($Cookies{username}){open(PSD,"$filepath/yhzl/$Cookies{username}.cgi")||&errorview("对不起,此用户名还没有注册!");$liness=<PSD>;close(PSD);($password)=split(/\t/,$liness);if($password ne $Cookies{password}){&errorview("对不起,您的密码错误!");}}
$username=$Cookies{username};
$userpsd=$Cookies{password};
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/<!--(.|\n)*-->//g;
$value=~s/\t/&nbsp;&nbsp;&nbsp; /g;
$value=~s/>/&gt;/g;
$value=~s/</&lt;/g;
$value=~s/\.\.//g;
$FORM{$name} = $value;
}
$yjhf=$FORM{'yjhf'};
$id=$FORM{'id'};
$replytime=$FORM{'replytime'};
$menu=$FORM{'menu'};
$mail=$FORM{'mail'};
$retitles=$FORM{'retitles'};
$fff=$FORM{'fff'};
$id=~s/\.\.//g;
$replytime=~s/\.//g;
if($id ne ""){
open (CHAT,"$filepath/list/$id.cgi");
$line=<CHAT>;
close(CHAT);
($bzmc,$secret,$bzrmail,$outurl,$bbsname,$fbzmc2,$rtime,$htmlt,$htmlw,$jj,$fbzmc)=split(/\t/,$line);
}
if($fff eq ""){
open(PSD,"$filepath/list/$id/$replytime");
$line=<PSD>;
close(PSD);
chomp($line);
($titles,$rthistime,$rusername,$nr,$rfrom,$rhasreply,$remote,$rlastname,$rlasttime,$re,$rhassee)=split(/\t/,$line);
}else{
open(PSD,"$filepath/list/$id/$replytime"."b");
@lines=<PSD>;
close(PSD);
foreach $line (@lines) {
chomp($line);
($rtime,$rthistime,$rusernamess,$nrss,$rfroms,$remote,$titless)=split(/\t/,$line);
if($fff eq $rthistime){$nr=$nrss;$rusername=$rusernamess;$titles=$titless;$rfrom=$rfroms;}}
}
$nr=~s/(\<BLOCKQUOTE\>)(.+?)(\<\/BLOCKQUOTE\>)//isg;
$nr =~s/function(.+?)HTML代码如下://isg;
$nr=&unybbcode($nr);
$nr=~s/<([^<])*>//g;
if($menu eq "mail"){&mail;exit;}
if($id ne ""){
open (CHAT,"$filepath/list/$id.cgi");
$line=<CHAT>;
close(CHAT);
($bzmc,$rpass,$bzrmail,$outurl,$bbsname,$fbzmc2,$rtime,$htmlt,$htmlw,$jj,$fbzmc)=split(/\t/,$line);
}
if($menu eq ""){&okview("对不起,您没有输入任何数据!");}
if($menu eq "ip"){&ip;exit;}
if($menu eq "lock"){&lock;exit;}
if($menu eq "good"){&good;exit;}
if($menu eq "ungood"){&ungood;exit;}
sub mail{
if($username ne ""){
open(PSD,"$filepath/yhzl/$username.cgi");
$line=<PSD>;
close(PSD);
($rdpassword,$rdnamee,$rdmail)=split(/\t/,$line);
}
if ($mail eq "") {
&css;
print <<EOF;
<BODY bgColor=$bgcolor2><DIV align=center><BR><BR><TABLE bgColor=$bgcolor0 border=0 cellPadding=3 cellSpacing=3 width=300>
<TBODY><TR align=middle><TD><font color=$bgcolor4>请 输 入 E-mail </TD></TR></TBODY></TABLE>
<FORM action=quote.cgi method=post><INPUT TYPE="HIDDEN" NAME="id" VALUE="$id"><INPUT TYPE="HIDDEN" NAME="menu" VALUE="mail">
<INPUT TYPE="HIDDEN" NAME="replytime" VALUE="$replytime"><INPUT TYPE="HIDDEN" NAME="fff" VALUE="$fff">
如果要输入多个,请用“,”格开。<BR><BR><INPUT name=mail size=30 VALUE=$rdmail> <BR><BR><INPUT border=0 src="$imagurl/color/$color/sbutton-send2.gif" type=image>
<A href="javascript:window.history.back()"><IMG border=0 src="$imagurl/color/$color/sbutton-cal2.gif" ></A> <BR><BR></FORM></DIV></BODY></HTML>
EOF
}else{
if(!($mail=~ /.*\@.*\..*/)){&errorview("您的Email输入错误!");exit(0);}
$sendto="$mail";
$subject="$titles";
$message="\n发信人:$rusername 讨论区:$bbsname\n标  题:$titles\n\n$nr\n\n免费论坛服务由 $zyname($zyurl) 提供 程序制作:Yuzi工作室(http://www.yuzi.net)\n\n\n";
if(-e $mailprg){&sendmail;}else{do "$cgipa/sub/smtp.cgi";}
&okview("您的邮件已经送出!");exit;
}
exit;
}
sub lock{
&monitor;
open(PSD,"$filepath/list/$id/$replytime");
$line=<PSD>;
close(PSD);
($rtitles,$rthistime,$rusername,$nr,$rfrom88,$rhasreply,$remote,$rlastname,$rlasttime,$re,$rhassee,$jing,$lock)=split(/\t/,$line);
if ($lock eq "1"){
open(PSD,">$filepath/list/$id/$replytime");
print PSD $rtitles."\t".$rthistime."\t".$rusername."\t".$nr."\t".$rfrom88."\t".$rhasreply."\t".$remote."\t".$rlastname."\t".$rlasttime."\t".$re."\t".$rhassee."\t".$jing."\t".0;
close(PSD);
&okview("主题已经开放,可以自由回复了!");exit;
}else{
open(PSD,">$filepath/list/$id/$replytime");
print PSD $rtitles."\t".$rthistime."\t".$rusername."\t".$nr."\t".$rfrom88."\t".$rhasreply."\t".$remote."\t".$rlastname."\t".$rlasttime."\t".$re."\t".$rhassee."\t".$jing."\t".1;
close(PSD);
&okview("主题已经关闭,不再接受新的回复!");exit;
}}
sub good{
&monitor;
open(TITLES,"$filepath/list/$id/good");
@filename=<TITLES>;
close(TITLES);
foreach $filename(@filename) {
chomp($filename);
if($replytime eq $filename){&errorview("此主题已经添加到精华区了!");}}
open(TITLES,"$filepath/list/$id/good");
@hastitles=<TITLES>;
close(TITLES);
open(TITLES,">$filepath/list/$id/good");
print TITLES "$replytime\n";
print TITLES @hastitles;
close(TITLES);
chmod(0666,"$filepath/list/$id/good");
open(PSD,"$filepath/list/$id/$replytime");
$line=<PSD>;
close(PSD);
($rtitles,$rthistime,$rusername,$nr,$rfrom88,$rhasreply,$remote,$rlastname,$rlasttime,$re,$rhassee,$jing,$lock,$voteman,$votetol)=split(/\t/,$line);
open(PSD,">$filepath/list/$id/$replytime");
print PSD $rtitles."\t".$rthistime."\t".$rusername."\t".$nr."\t".$rfrom88."\t".$rhasreply."\t".$remote."\t".$rlastname."\t".$rlasttime."\t".$re."\t".$rhassee."\t1\t".$lock."\t".$voteman."\t".$votetol;
close(PSD);
open(NUMBER,"$filepath/guest/2$rusername.cgi");
$NUMBER=<NUMBER>;
close(NUMBER);
($lys,$oldlys,$money,$charm)=split(/\t/,$NUMBER);
$money=$money+15;$charm=$charm+1;
open(NUMBER,">$filepath/guest/2$rusername.cgi");
print NUMBER "$lys"."\t"."$oldlys"."\t"."$money"."\t"."$charm";
close(NUMBER);
&okview("主题已经添加到精华区了!");exit;
}
sub ungood{
&monitor;
open(TITLES,"$filepath/list/$id/good");
@hastitles=<TITLES>;
close(TITLES);
open(TITLES,">$filepath/list/$id/good");
foreach $m (@hastitles) {
chomp($m);
if($m ne "$replytime"){$check=1;}else{
print TITLES "$m\n";
}}
close(TITLES);
if ($check eq "1"){
open(PSD,"$filepath/list/$id/$replytime");
$line=<PSD>;
close(PSD);
($rtitles,$rthistime,$rusername,$nr,$rfrom88,$rhasreply,$remote,$rlastname,$rlasttime,$re,$rhassee,$jing,$lock,$voteman,$votetol)=split(/\t/,$line);
open(PSD,">$filepath/list/$id/$replytime");
print PSD $rtitles."\t".$rthistime."\t".$rusername."\t".$nr."\t".$rfrom88."\t".$rhasreply."\t".$remote."\t".$rlastname."\t".$rlasttime."\t".$re."\t".$rhassee."\t0\t".$lock."\t".$voteman."\t".$votetol;
close(PSD);
open(NUMBER,"$filepath/guest/2$rusername.cgi");
$NUMBER=<NUMBER>;
close(NUMBER);
($lys,$oldlys,$money,$charm)=split(/\t/,$NUMBER);
$money=$money-20;$charm=$charm-1;
open(NUMBER,">$filepath/guest/2$rusername.cgi");
print NUMBER "$lys"."\t"."$oldlys"."\t"."$money"."\t"."$charm";
close(NUMBER);
}
&okview("主题已经成功移出精华区了!");
exit;
}
sub ip{
&monitor;
&okview("$rusername的IP地址:$rfrom");exit;
}
######################### END OF SCRIPT #########################

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -