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

📄 superdel.php

📁 FTB安装版 v1.3(虚拟形象)FTB安装版 v1.3(虚拟形象)
💻 PHP
字号:
<?php
require("bbsdata/config.php");
require("admincp.php");
if($deljob==msgdel){
$thisprog="superdel.php?deljob=msgdel";
if (!$action) {
print <<<eof
	$admintopad

	<table width=95% align=center cellspacing=1 cellpadding=0 bgcolor=#0099cc>
 <br><tr><td> 
   <table width=100% cellspacing=0 cellpadding=0> 
  <FORM METHOD=POST ACTION=$thisprog>
	<tr><td bgcolor="#f2f8ff" height=28>&nbsp;&nbsp;删除所有用户的收件箱(1.php)<font color=red>(将清除所有用户的收件箱,后果自负)</font></td><td bgcolor="#f2f8ff" height=28 align=right> <INPUT TYPE="hidden" name="action" value="rec"><INPUT TYPE="submit" value="确定删除"></TD>
</TR>

</form>
	</table></td></tr></table>
	<table width=95% align=center cellspacing=1 cellpadding=0 bgcolor=#0099cc>
 <br><tr><td> 
   <table width=100% cellspacing=0 cellpadding=0> 
  <FORM METHOD=POST ACTION=$thisprog>
	<tr><td bgcolor="#f2f8ff" height=28>&nbsp;&nbsp;删除所有用户的发件箱(2.php)<font color=red>(将清除所有用户的发件箱,后果自负)</font></td><td bgcolor="#f2f8ff" height=28 align=right> <INPUT TYPE="hidden" name="action" value="snd"><INPUT TYPE="submit" value="确定删除"></TD>
</TR>

</form>
	</table></td></tr></table>
		<table width=95% align=center cellspacing=1 cellpadding=0 bgcolor=#0099cc>
 <br><tr><td> 
   <table width=100% cellspacing=0 cellpadding=0> 
  <FORM METHOD=POST ACTION=$thisprog>
	<tr><td bgcolor="#f2f8ff" height=28>&nbsp;&nbsp;删除所有用户的已读的收件箱(1.php)<font color=red>(将清除所有用户已读的收件箱,后果自负)</font></td><td bgcolor="#f2f8ff" height=28 align=right> <INPUT TYPE="hidden" name="action" value="readrec"><INPUT TYPE="submit" value="确定删除"></TD>
</TR>

</form>
	</table></td></tr></table>
	<table width=95% align=center cellspacing=1 cellpadding=0 bgcolor=#0099cc>
 <br><tr><td> 
   <table width=100% cellspacing=0 cellpadding=0> 
  <FORM METHOD=POST ACTION=$thisprog>
	<TR>
	<TD bgcolor="#f2f8ff" colspan=2>按用户名清理(用户名间用半角逗号 "," 分割):<font color=red>(将清除用户的收件箱与发件箱,后果自负)</font></TD>
	</TR><TR><TD bgcolor="#f2f8ff">&nbsp;<INPUT TYPE="text" NAME="ofstar_delname" value="$ofstar_delname"></TD><td bgcolor="#f2f8ff" height=28 align=right> <INPUT TYPE="hidden" name="action" value="delmsg"><INPUT TYPE="submit" value="确定删除"></TD>
</TR>

</form>
	</table></td></tr></table>
eof;
}
elseif ($action=="rec") {	
$dir=userdata."/".$msgpath."/";
$dh=opendir("$dir");
$count=0;
while ($userfile=readdir($dh))
{
if(strpos($userfile,"}1.php"))
	{
			if(@unlink("$dir$userfile"))
		{$count++;
			echo "({$count}) $userfile <font color=green>删除成功</font><BR>";
		}
		else
		{
			echo "$userfile <font color=green>删除失败</font><BR>";
		}
	}
}
print "<br><b>&nbsp;操作完成</b><br><br>&nbsp;&gt;&gt; <a href=$thisprog>返回执行其他动作</a>";
}
elseif ($action=="snd") {	
$dir=userdata."/".$msgpath."/";
$dh=opendir("$dir");
$count=0;
while ($userfile=readdir($dh))
{
if(strpos($userfile,"}2.php"))
	{
			if(@unlink("$dir$userfile"))
		{$count++;
			echo "({$count}) $userfile <font color=green>删除成功</font><BR>";
		}
		else
		{
			echo "$userfile <font color=green>删除失败</font><BR>";
		}
	}
}
print "<br><b>&nbsp;操作完成</b><br><br>&nbsp;&gt;&gt; <a href=$thisprog>返回执行其他动作</a>";
exit;
}
elseif ($action=="readrec") {	
$dir=userdata."/".$msgpath."/";
$dh=opendir("$dir");
$count=0;
while ($userfile=readdir($dh))
{
if(strpos($userfile,"}1.php"))
	{
	if(!msg_read($userfile))
		{
		if(@unlink("$dir$userfile"))
		{
			$count++;
			echo "({$count}) $userfile <font color=green>删除成功</font><BR>";
		}
		else
			echo "$userfile <font color=green>删除失败</font><BR>";
	    }
    }
}
print "<br><b>&nbsp;操作完成</b><br><br>&nbsp;&gt;&gt; <a href=$thisprog>返回执行其他动作</a>";
}
elseif ($action=="delmsg") {	
	$ofstar_name=explode(",",$ofstar_delname);
$couter=count($ofstar_name);
for($i=0;$i<$couter;$i++){
	if(file_exists("userdata/$msgpath/{$ofstar_name[$i]}1.php"))
	{
			if(@unlink("userdata/$msgpath/{$ofstar_name[$i]}1.php"))
		{	
				$count1++;
			echo "({$count1}) $ofstar_name[$i]}1.php <font color=green>删除成功</font><BR>";
		}
		else
			echo "$ofstar_name[$i]}1.php <font color=green>删除失败</font><BR>";
	}
	if(file_exists("userdata/$msgpath/{$ofstar_name[$i]}2.php"))
	{
		if(@unlink("userdata/$msgpath/{$ofstar_name[$i]}2.php"))
		{
				$count2++;
			echo "({$count2}) $ofstar_name[$i]}2.php <font color=green>删除成功</font><BR>";
		}
		else
			echo "$ofstar_name[$i]}2.php <font color=green>删除失败</font><BR>";
	}
	}
print "<br><b>&nbsp;操作完成</b><br><br>&nbsp;&gt;&gt; <a href=$thisprog>返回执行其他动作</a>";
exit;
}
function msg_read($filename) {
global $msgpath;
$txt=file("userdata/$msgpath/$filename");
 $count=count($txt);
 for($i=0;$i<$count;$i++){
$detail=explode("|",$txt[$i]);
if($detail[4]==0 ||!$detail[4]) return 1;
 }
}
 ?>  <table width=200 align=center cellspacing=0 cellpadding=0 bgcolor=#0099cc> 
   <tr><td> 
   <table width=100% cellspacing=1 cellpadding=3> 
   <tr><td bgcolor=EEEEE8> 
 软体编写: <a href="http://www.ofstar.com" target=_blank>快乐的流星</a><br> 
 版权所有: <a href="http://www.ofstar.com/bbs" target=_blank>流星论坛</a><br> 
 注:此删除程序可大大加快论坛速度!
   </td></tr></table> 
   </td></tr><hr> </table><hr>
 <?php
}
 if($deljob==men){
$thisprog="superdel.php?deljob=men";

if ($action!="process") {
print <<<eof
$admintopad
<tr><FORM METHOD=POST ACTION=$thisprog>
	<td>发贴数(设置为5的话,就删除少于5的)</TD>
	<TD><INPUT TYPE="text" NAME="num" value="0"></TD>
</TR>
<TR>
	<TD>注册日期(早于的都删除,格式为2002年00月00日。<font color=red>要补0,否则后果自负</font>)</TD>
	<TD><INPUT TYPE="text" NAME="date" value="20020101"></TD>
</TR>
<TR>
	<TD>最后登陆(早于的都删除,格式为2002年00月00日。<font color=red>要补0,否则后果自负</font>)</TD>
	<TD><INPUT TYPE="text" NAME="lastlogin" value="20020101"></TD>
</TR>
<TR>
	<TD colspan=2><INPUT TYPE="hidden" name="action" value="process"><INPUT TYPE="submit" value="确定删除"></TD>
</form></tr>
$adminbottomad
eof;
}
elseif ($action=="process") {	
if(isset($lastlogin) && isset($num) && isset($date))
{//if1
$dir=$userpath."/";
$dh=opendir("$dir");
$count=0;
while ($userfile=readdir($dh))
{
if($userfile!="." && $userfile!=".." && !strstr($userfile,'snd') && !strstr($userfile,'rec'))
{//if2
$userdata=readfromfile("$dir$userfile");
list($fb,$addusername,$addpassword,$usericon,$addemail,$oicqnumber,$date_reg,$signature,$homepage,$fromwhere,$addcomment,$aa,$bb,$posts,$publicmail,$receivemail,$dd,$lasttime,$nowtime,$icq,$sex,$born,$guoji,$tuijianren,$money,$lasttitle,$lastaddr,$group,$null3,$null4,$sx,$star,$bei1,$bei2,$bei3,$bei4,$bei5,$bei6)=explode("|",$userdata);
$lsl=date("Ymd",$lasttime);
$reg=date("Ymd",$date_reg);
if ($posts<$num && $reg<$date && $lsl<$lastlogin)
	{
		if(@unlink("$dir$userfile"))
		{
			@unlink("userdata/$msgpath/{$addusername}1.php");
			@unlink("userdata/$msgpath/{$addusername}2.php");
			$count++;
			echo "({$count}) $userfile 发贴数 $posts ,注册日期 $reg ,最后登陆日期 $lsl <font color=green>删除成功</font><BR>";
		}
		else
		{
			echo "$userfile 发贴数 $posts ,注册日期 $reg ,最后登陆日期 $lsl <font color=green>删除失败</font><BR>";
		}
	}
}//if2
}//while
}//if1
else
{
print <<<eof
<center>{$lastlogin} {$num} {$date} <BR><BR><font color=red>请小心填写完整!</font><br><a href=javascript:history.go(-1)>返回</a></center>
eof;
}

exit;
}
 }

⌨️ 快捷键说明

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