www.pudn.com > bbs3000afree.zip > edit.cgi
#------------------------------------------------------#
# 本程序为Yuzi工作室提供 #
# Yuzi论坛3000(BBS3000)v4.00 #
######################---------------------------------#
## 以下部分不需修改 ##
######################
if ($FORM{'smilies'} ne "1"){$comment = &smilies("$comment");}
if ($ybbcodeAllow eq "on" && $FORM{'ybbcode'} ne "1"){$comment = &ybbcode("$comment");}
foreach (@badwords) {$titles =~s/$_/****/gi;}
$titles =~s/ / /g;
if((length($titles) > 100)||(length($titles) < 2)){&errorview("文章标题不能小于2个字符!");}
if(length($comment) > $restrictbyte){&errorview("文章内容不能大于$restrictbyte个字节!");}
open(TITLES,"$filepath/list/$id/$deltitle");
$hastitles=;
close(TITLES);
chomp($hastitles);
($rdtitles,$rdthistime,$rdusername,$comment1,$rdhassee,$rdhasreply,$r3,$r4,$r5,$r6,$rhassee1,$jing,$lock,$voteman,$votetol)=split(/\t/,$hastitles);
if($username eq ""){&errorview("您当前的身份是访客!");}
open (FILE, "$filepath/data/rank");
@rank = ;
close(FILE);
foreach $ranks (@rank) {
chomp($ranks);
if ($ranks eq $Cookies{username}){$rankss="ok";}}
if(($rankss ne ok)&&($Cookies{username} ne $rdusername)&&($Cookies{username} ne $admname)&&($Cookies{username} ne $bzmc)&&($Cookies{username} ne $fbzmc)&&($Cookies{username} ne $fbzmc2)){&errorview("您没有足够的权限编辑此帖!");}
open(TITLES,">$filepath/list/$id/$deltitle");
@hastitles=;
print TITLES $titles."\t".$rdthistime."\t".$rdusername."\t".$comment."
[ 此消息由 $username 在 $thistime 编辑过 ]"."\t".$rdhassee."\t".$rdhasreply."\t".$r3."\t".$r4."\t".$r5."\t".$r6."\t".$rhassee1."\t".$jing."\t".$lock."\t".$voteman."\t".$votetol;
close(TITLES);
print "Content-type: text/html\n\n";
print "
";
exit;
######################### END OF SCRIPT #########################