?? reply.cgi
字號:
#------------------------------------------------------#
# 本程序為Yuzi工作室提供 #
# Yuzi論壇3000(BBS3000)v4.00 #
######################---------------------------------#
## 以下部分不需修改 ##
######################
&origin;
if(length($username) > 20){&errorview("您的名字不能大于20個字符!");}
open (FILE, "$filepath/data/prison");
@ips = <FILE>;
close(FILE);
foreach $prison(@ips) {
($prison)=split(/\t/,$prison);
if ($prison eq $username) {&errorview("您被抓進監獄,無法發表文章!");}}
if($id eq ""){&errorview("不能回復公告!");}
unless (( -e "$filepath/list/$id/$replytime")&&($replytime ne "")){&errorview("主題已經被刪除!");}
foreach (@badwords) {$comment =~s/$_/****/gi;}
if ($FORM{'smilies'} ne "1"){$comment = &smilies("$comment");}
if ($ybbcodeAllow eq "on" && $FORM{'ybbcode'} ne "1"){$comment = &ybbcode("$comment");}
foreach (@badwords) {$retitles =~s/$_/****/gi;}
if(($username eq "")||($userpsd eq "")||($retitles eq "")){&errorview("您的名字、密碼、回復標題不能為空!");}
if($comment eq ""){&errorview("文章內容不能為空!");}
if(length($comment) > $restrictbyte){&errorview("文章內容不能大于$restrictbyte個字節!");}
($ip1,$ip2,$ip3,$ip4)=split(/\./,$from);$badi="$ip1.$ip2.$ip3";
foreach $badip (@badip) {&errorview("對不起!此段IP被禁止發表文章!") if($badip eq $badi);exit if($badip eq $badi);}
open(TITLES,"$filepath/list/$id/$replytime");
$m=<TITLES>;
close(TITLES);
($rtitles,$rthistime,$rusername,$rcomment,$rfrom,$rhasreply,$remote,$rlastname,$rlasttime,$re,$djj,$jing,$lock,$voteman,$votetol)=split(/\t/,$m);
if ($lock eq "1"){&errorview("主題已經關閉,不再接受新的回復!");}
if($Cookies{lasttxt} > $ftime-30){&errorview("為防止有人用程序灌水,本BBS限制一個人兩次發帖間隔必須大于30秒!");}
print "Set-Cookie:lasttxt=$ftime\n";
&repeat;
open(NU,"$filepath/guest/2$username.cgi");
$NU=<NU>;
close(NU);
($lysy,$oldlysy,$moneyy,$charmy)=split(/\t/,$NU);
if($charmy < 0){&errorview("您的魅力太低,不能回復文章!請聯系社區區長。");}
$moneyy=$moneyy+3;$charmy=$charmy+0.1;
open(NU,">$filepath/guest/2$username.cgi");
print NU "$lysy"."\t"."$oldlysy"."\t"."$moneyy"."\t"."$charmy";
close(NU);
if($emote eq ""){$emote="2"};
$rhasreply++;
unless($rtitles && $emote){&errorview("此帖子已經被刪除了!");exit;}
open(TITLES,">$filepath/list/$id/$replytime");
print TITLES $rtitles."\t".$rthistime."\t".$rusername."\t".$rcomment."\t".$rfrom."\t".$rhasreply."\t".$remote."\t".$username."\t".$thistime."\t".$re."\t".$djj."\t".$jing."\t".$lock."\t".$voteman."\t".$votetol;
close(TITLES);
$addreply=$replytime."\t".$thistime."\t".$username."\t".$comment."\t".$from."\t".$emote."\t".$retitles."\t".0;
$peo="$filepath/list/$id/$re";
open(REPLY,">>$peo");
print REPLY $addreply."\n";
close(REPLY);
open(PSD,"$filepath/yhzl/$username.cgi");
$line=<PSD>;
close(PSD);
($rdpassword,$rusername,$rdmail,$rdhome,$rlast,$rdqm,$rdsex,$rdwork,$rdcity,$rdlove,$rfy,$rhf,$tu,$jiao,$iewin,$QQ,$photo,$rating,$levelname,$level,$lastlytime,$lastlytopic,$realname,$birthday,$shengxiao,$blood,$constellation,$character,$belief,$marital,$education,$college,$oldrat)=split(/\t/,$line);
if($oldrat){$rating=$oldrat;}
unless($rdpassword){&errorview("密碼不能為空!");}
if($tu eq ""){$tu=$sec};$rhf++;
do "$cgipa/sub/level.cgi";
($kkk)=split(/\)/,$ENV{'HTTP_USER_AGENT'});
($bzd,$ie,$win,$me)=split(/;/,$kkk);
if($me eq " Win 9x 4.90"){$win=" Windows Me"}
elsif($win eq " Windows NT 5.0"){$win=" Windows 2000"}
elsif($win eq " Windows NT 5.1"){$win=" Windows XP"};
open(PSD,">$filepath/yhzl/$username.cgi");
print PSD $rdpassword."\t".$username."\t".$rdmail."\t".$rdhome."\t".$rlast."\t".$rdqm."\t".$rdsex."\t".$rdwork."\t".$rdcity."\t".$rdlove."\t".$rfy."\t".$rhf."\t".$tu."\t".$jiao."\t$ie$win\t".$QQ."\t".$photo."\t".$rating."\t".$levelname."\t".$level."\t".$thistime."\t"."<a href=$cgiurl?menu=show&id=$id&slttitle=$replytime>$retitles</a>\t".$realname."\t".$birthday."\t".$shengxiao."\t".$blood."\t".$constellation."\t".$character."\t".$belief."\t".$marital."\t".$education."\t".$college;
close(PSD);
if(($yjhf ne "")&&($FORM{'emailhf'} eq "1")){
$comment=~s/<([^>]|\n)*>/\n/g;
($ename)=split(/\@/,$yjhf);
$sendto="$yjhf";
$subject="$bbsname提醒郵件";
$message="\n親愛的$ename,您好!\n\n 首先, 非常感謝您使用$zyname提供的服務!\n這是一封論壇系統自動生成的郵件,請不要回信。\n\n在$rthistime, 您在$bbsname\n發表過文章 <<$rtitles>>\n\n 后來, 在$thistime, 有位叫做$username\n的朋友回應了您的文章, 他來自$rdcity ($from) ,\n他的E-mail地址是 $rdmail , 主頁是 $rdhome\n文章主題是 <<$retitles>>\n\nURL: $ym/bbs.cgi?menu=show&slttitle=$replytime&id=$id\n\n文章的詳細內容如下:\n$comment\n\n 歡迎再次光臨 $bbsname !\n$ym/bbs.cgi?id=$id\n\n免費論壇服務由 $zyname($zyurl) 提供 程序制作:Yuzi工作室(http://www.yuzi.net)\n\n\n";
if(-e $mailprg){&sendmail;}else{do "$cgipa/sub/smtp.cgi";}
};
print "Set-Cookie:del=$thistime\n";
if (-e "$filepath/list/$id/top"){
open (FILE, "$filepath/list/$id/top");
@top= <FILE>;
close(FILE);
foreach $top(@top) {
chomp($top);
if ($top eq $replytime) {
&win;
}}}
open (GUEST,"$filepath/list/$id/bbs") ;
@lines=<GUEST>;
close(GUEST);
open (GUEST,">$filepath/list/$id/bbs") ;
print GUEST "$replytime\n";
foreach $usersays (@lines) {
chomp($usersays);
if($replytime ne $usersays){
print GUEST "$usersays\n";
}}
close(GUEST);
open(NUMBER,"$filepath/data/count");
$NUMBER=<NUMBER>;
close(NUMBER);
($riqi,$fa,$hui)=split(/\t/,$NUMBER);
if ($riqi eq "$year$mon$mday"){$hui++;}else{$riqi="$year$mon$mday";$fa="0";$hui="1";}
open(NUMBER,">$filepath/data/count");
print NUMBER "$riqi"."\t"."$fa"."\t"."$hui";
close(NUMBER);
print "Content-type: text/html\n\n";
print "
<html>
<head>
<meta http-equiv=Content-Type content=text/html;charset=gb2312>
<meta http-equiv=refresh content=2;url=$imagurl/loading.htm>
</head>
<table cellpadding=0 cellspacing=0 border=0 width=95% align=center height=85%>
<tr align=center valign=middle>
<td>
<table cellpadding=10 cellspacing=0 border=0 width=80% align=center>
<tr>
<td valign=middle align=center bgcolor=$bgcolor2>謝謝$username,您的信息已成功發出!<br><br>請等待系統將自動返回...
<br><br>
(<a href=$imagurl/loading.htm>如果您不愿意等待,請點擊這里返回</a>)
</td></tr></table></td></tr>
</table>
</html>
";
if($userpsd ne ""){&cookie;}
exit;
######################### END OF SCRIPT #########################
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -