www.pudn.com > bbs3000afree.zip > recycle.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=;close(PSD);($password)=split(/\t/,$liness);if($password ne $Cookies{password}){&errorview("对不起,您的密码错误!");}} 
########## 
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; 
$FORM{$name} = $value; 
} 
########## 
opendir (MEMBERDIR2, "$filepath/recycle"); 
@members2 = readdir(MEMBERDIR2); 
closedir (MEMBERDIR2); 
if($FORM{menu} eq "clean"){ 
if($Cookies{username} ne "$admname"){&errorview("对不起,只有区长才有执行该操作的权限!");} 
foreach $m (@members2){ 
unlink("$filepath/recycle/$m"); 
} 
} 
if($FORM{menu} eq "revert"){ 
##################### 
&monitor; 
rename("$filepath/recycle/$FORM{deltitle}","$filepath/list/$FORM{id}/$FORM{deltitle}")||&errorview("该帖子不存在回收站!"); 
rename("$filepath/recycle/$FORM{deltitle}"."b","$filepath/list/$FORM{id}/$FORM{deltitle}"."b"); 
open(TITLES,"$filepath/list/$FORM{id}/bbs"); 
@hastitles=; 
close(TITLES); 
open(TITLES,">$filepath/list/$FORM{id}/bbs"); 
print TITLES $FORM{deltitle}."\n"; 
print TITLES @hastitles; 
close(TITLES); 
open(PSD,"$filepath/list/$FORM{id}/$FORM{deltitle}"); 
$line=; 
close(PSD); 
($rtitles,$rthistime,$rusername)=split(/\t/,$line); 
open(NUMBER,"$filepath/guest/2$rusername.cgi"); 
$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); 
 
open(TITLES,"$filepath/recycle/bbs"); 
@hastitles=; 
close(TITLES); 
open(TITLES,">$filepath/recycle/bbs"); 
foreach $m (@hastitles){ 
chomp($m); 
($rthistime)=split(/\t/,$m); 
if($rthistime ne $FORM{deltitle}){ 
print TITLES $m."\n"; 
}} 
close(TITLES); 
} 
if($FORM{menu} eq "log_frame"){ 
open (PEO,"$filepath/recycle/bbs"); 
@lines=; 
close (PEO); 
foreach $line (@lines) { 
chomp($line); 
($slttitle,$id,$bbsname,$delname,$deltime)=split(/\t/,$line); 
open(TITLES,"$filepath/recycle/$slttitle"); 
$m=; 
close(TITLES); 
($rtitles,$rthistime,$rusername,$nr,$rfrom,$rhasreply,$emote,$lastname,$rlasttime,$re,$rhassee,$jing,$lock)=split(/\t/,$m); 
if (length($rtitles) > 34) {$rtitles = substr($rtitles,0,34);$rtitles.="...";} 
if($lastname ne "--"){$lastname="$lastname";} 
if($Cookies{username} ne "$admname"){$delname="--";} 
$new="$new 
$rtitles $rusername $rhasreply $delname $deltime $bbsname
"; } &css; $howfile=@members2-2; print "
回收站 清空回收站(共有 $howfile 个文件)

文章标题 作者 回复数 删除者 删除日期 所属论坛
"; print "$new
BACK

本论坛言论纯属发表者个人意见,与 $zyname 立场无关
免费论坛服务由 $zyname 提供 技术支持:Yuzi工作室
Yuzi Bulletin BoardTM Version $ver "; exit; } print "Content-type: text/html\n\n"; print <回收站 EOF exit; ######################### END OF SCRIPT #########################