<!--<?php
include_once PrintEot('left');
if(empty($action)){print <<<EOT
-->
<h3><b>提示信息</b></h3>
<ul class="tr5">
<!--
EOT;
if($admintype=='article'){print <<<EOT
-->
1.刪除符合條件的帖子用于清理論壇冗余數據,此操作不可恢復,請謹慎使用！<br>2.用戶組成員根據用戶組權限設置取得相應批量刪除權限<br>3.版主擁有所管轄的版塊（分類）發布的批量刪除的權限<br><span class="s1">功能說明</span>:<br/>使用<font color=blue>刪除主題</font>功能可刪除某個會員發表的所有主題(包括回復)<br>使用<font color=blue>刪除回復</font>功能可刪除某個會員發表的所有回復
<!--
EOT;
}elseif($admintype=='member'){
print <<<EOT
-->
刪除符合條件的用戶,用于清理論壇冗余數據,此操作不可恢復,請謹慎使用！
<!--
EOT;
}elseif($admintype=='message'){
print <<<EOT
-->
刪除符合條件的短消息,用于清理論壇冗余數據,此操作不可恢復,請謹慎使用！<br><font color=blue>系統信息刪除2.0之前請用"系統信息"用戶名搜索，2.0開始請用"SYSTEM"用戶名搜索</font>
<!--
EOT;
}print <<<EOT
-->
</ul>
<!--
EOT;
}if($admintype=='article'){
if(empty($action)){print <<<EOT
-->
<script language="JavaScript" src="js/date.js"></script>
<form action="$basename&" method=post>
<input type=hidden name=action value='deltpc'>
<h2><b>刪除主題</b></h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3"><td width=30%>所屬版塊</td>
<td>
<select name=fid>
<option value='-1'>所有版塊</option>$forumcache
</select>&nbsp;&nbsp;<input type=checkbox name="ifkeep" value="1" checked>保留精華置頂</td></tr>
<!--
EOT;
if($t_table){ print <<<EOT
-->
<tr class="tr3"><td>分表數據庫</td>
<td><select name="ttable">$t_table</select></td></tr>
<!--
EOT;
}print <<<EOT
-->
<tr class="tr3">
	<td>主題發表于<br>(可只用單個條件，下同)</td>
	<td>
		<input type="text" class="input" name="pstarttime" id="pstarttime" onClick="javascript:ShowCalendar(this.id)" />
		&nbsp;-&nbsp;
		<input type="text" class="input" name="pendtime" id="pendtime" onClick="javascript:ShowCalendar(this.id)" />
	</td>
</tr>
<tr class="tr3">
	<td>主題最後被回復于</td>
	<td>
		<input type="text" class="input" name="lstarttime" id="lstarttime" onClick="javascript:ShowCalendar(this.id)" />
		&nbsp;-&nbsp;
		<input type="text" class="input" name="lendtime" id="lendtime" onClick="javascript:ShowCalendar(this.id)" />
	</td>
</tr>
<tr class="tr3">
	<td>指定 tid 範圍<br>(可只用單個條件)</td>
	<td>
		<input type="text" class="input" name="tstart">
		&nbsp;-&nbsp;
		<input type="text" class="input" name="tend">
	</td>
</tr>
<tr class="tr3"><td>瀏覽人數小于</td>
<td><input type="text" size="20" class="input" maxlength=14 name="hits">&nbsp;的主題</td></tr>
<tr class="tr3"><td>回復人數小于</td>
<td><input type="text" size="20" class="input" maxlength=14 name="replies">&nbsp;的主題</td></tr>
<tr class="tr3"><td>按作者刪除(<font color=blue>主題作者</font>)<br>(多個作者用","分隔)</td>
<td><input type="text" size="20" class="input" name="author"> 可使用通配符 "*"</td></tr>
<tr class="tr3"><td>關鍵字包含(多個關鍵字用","分隔)</td>
<td><input type="text" size="20" class="input" name="keyword"> 可使用通配符 "*"</td></tr>
<tr class="tr3"><td>內容大于</td>
<td><input type="text" size="20" class="input" name="tcounts"> 字節</td></tr>
<tr class="tr3"><td>內容少于</td>
<td><input type="text" size="20" class="input" name="counts"> 字節</td></tr>
<tr class="tr3"><td>根據用戶IP查找</td>
<td><input type="text" size="20" class="input" name="userip"> 可使用通配符 "*"</td></tr>
<tr class="tr3">
	<td><div id="info1">每頁顯示行數</div></td>
	<td>
		<input type="text" class="input" size="5" name="lines" value="30">
		<input type=checkbox name="direct" value=1 onclick="deldirect(this.form,'info1','每頁顯示行數');">
		直接刪除(直接刪除符合條件的項目)
	</td>
</tr>
</table>
<br><center><input type="submit" class="btn" value="提 交"></center>
<br/>
</form>

<form action="$basename&" method=post>
<input type=hidden name=action value='delrpl'>
<h2><b>刪除回復</b></h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3"><td width=30%>所屬版塊</td>
<td><select name=fid><option value='-1'>所有版塊</option>$forumcache</select></td></tr>
<!--
EOT;
if($p_table){ print <<<EOT
-->
<tr class="tr3"><td>分表數據庫</td>
<td><select name="ptable">$p_table</select></td></tr>
<!--
EOT;
}print <<<EOT
-->
<tr class="tr3"><td>所屬主題ID<br>(多個主題ID用","分隔)</td>
<td><input type="text" size="20" class="input" name="tid">
<font color="red">此功能可刪除單個或多個主題的所有回復</font></td></tr>
<tr class="tr3">
	<td>指定 pid 範圍<br>(可只用單個條件)</td>
	<td>
		<input type="text" class="input" name="pstart">
		&nbsp;-&nbsp;
		<input type="text" class="input" name="pend">
	</td>
</tr>
<tr class="tr3"><td>按作者刪除(<font color=blue>回復作者</font>)<br>(多個作者用","分隔)</td>
<td><input type="text" size="20" class="input" name="author"> 可使用通配符 "*"</td></tr>
<tr class="tr3"><td>關鍵字包含(多個關鍵字用","分隔)</td>
<td><input type="text" size="20" class="input" name="keyword"> 可使用通配符 "*"</td></tr>
<tr class="tr3"><td>內容大于</td>
<td><input type="text" size="20" class="input" name="tcounts"> 字節</td></tr>
<tr class="tr3"><td>內容少于</td>
<td><input type="text" size="20" class="input" name="counts"> 字節</td></tr>
<tr class="tr3"><td>根據用戶IP查找</td>
<td><input type="text" size="20" class="input" name="userip"> 可使用通配符 "*"</td></tr>
<tr class="tr3">
	<td><div id="info2">每批處理的個數</div></td>
	<td>
		<input type="text" size="20" class="input" name="nums" value="30">
		<input type="checkbox" name="direct" value=1 onclick="deldirect(this.form,'info2','每批處理的個數');">
		直接刪除(直接刪除符合條件的項目)
	</td>
</tr>
</table>
<br/><center><input type="submit" value="提 交" class="btn"></center>
<br/>
</form>
<!--
EOT;
} elseif($action=='deltpc' && empty($step)){print <<<EOT
-->
<form action="$basename&" method="post">
<input type="hidden" name="action" value="$action">
<input type="hidden" name="ttable" value="$ttable">
<input type="hidden" name="fid" value="$fid">
<input type="hidden" name="ifkeep" value="$ifkeep">
<input type="hidden" name="pstarttime" value="$pstarttime">
<input type="hidden" name="pendtime" value="$pendtime">
<input type="hidden" name="lstarttime" value="$lstarttime">
<input type="hidden" name="lendtime" value="$lendtime">
<input type="hidden" name="tstart" value="$tstart">
<input type="hidden" name="tend" value="$tend">
<input type="hidden" name="hits" value="$hits">
<input type="hidden" name="replies" value="$replies">
<input type="hidden" name="author" value="$author">
<input type="hidden" name="keyword" value="$keyword">
<input type="hidden" name="userip" value="$userip">
<input type="hidden" name="lines" value="$lines">
<input type="hidden" name="tcounts" value="$tcounts">
<input type="hidden" name="counts" value="$counts">
<input type="hidden" name="page" value="$page">
<input type="hidden" name="step" value="2">

<table width="100%" cellspacing="0" cellpadding="0">
<tr><td>

<table width="100%" cellspacing="0" cellpadding="0" style="TABLE-LAYOUT: fixed;WORD-WRAP: break-word">

<tr><td class="tr4" colspan="18"><b>文章列表</b></td></tr>
<tr class="tr3 s3"><td>ID</td>
<td colspan="6" class="tac">標題</td><td colspan=2>作者</td><td colspan=2>發表時間</td>
<td colspan=2>IP</td>
<td colspan=2>論壇</td><td>回復</td><td>人氣</td>
<td>刪除</td>
</tr>
<!--
EOT;
foreach($topicdb as $key=>$topic){
if(!$topic[subject])continue;
$key+=($page-1)*$lines+1;
print <<<EOT
-->
<tr class="tr3">
<td class="tac">$key</td>
<td colspan="6"><a href="read.php?fid=$topic[fid]&tid=$topic[tid]" target=_blank>$topic[subject]</a></td><td  colspan=2><a href="u.php?action=show&uid=$topic[authorid]" target=_blank>$topic[author]</a></td><td  colspan=2>$topic[postdate]</td><td colspan=2>$topic[userip]</td>
<td colspan=2>$topic[forumname]</td><td>$topic[replies]</td>
<td>$topic[hits]</td>
<td><input type=checkbox name=delid[$topic[tid]] value=$topic[fid]></td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</table></td></tr></table><br>$pages
<center><input class="btn" type='button' name='chkall' value='全 選' onclick='CheckAll(this.form)'>
<input type="submit" value='提 交' class="btn"></center>
<br/>
</form>
<!--
EOT;
} elseif($action=='delrpl' && empty($step)){print <<<EOT
-->
<form action="$basename&" method="post">
<input type="hidden" name=action value="$action">
<input type="hidden" name="step" value="2">
<input type="hidden" name="ptable" value="$ptable">
<input type="hidden" name="fid" value="$fid">
<input type="hidden" name="tid" value="$tid">
<input type="hidden" name="pstart" value="$pstart">
<input type="hidden" name="pend" value="$pend">
<input type="hidden" name="author" value="$author">
<input type="hidden" name="keyword" value="$keyword">
<input type="hidden" name="userip" value="$userip">
<input type="hidden" name="nums" value="$nums">
<input type="hidden" name="tcounts" value="$tcounts">
<input type="hidden" name="counts" value="$counts">
<input type="hidden" name="page" value="$page">

<table width="100%" cellspacing="0" cellpadding="0">
<tr><td class="tr4" colspan="8"><b>文章列表</b></td></tr>
<tr class="tr3" align="center">
<td width=5%>ID</td>
<td>作者</td>
<td>IP</td>
<td>發表時間</td>
<td>論壇</td>
<td>內容</td>
<td width="5%">刪除</td>
</tr>
<!--
EOT;
$num=($page-1)*$nums;
foreach($postdb as $key=>$post){
if(!$post[content])continue;
$num++;
print <<<EOT
-->
<tr class="tr3" align="center">
<td>$num</td>
<td><a href="u.php?action=show&uid=$post[authorid]" target=_blank>$post[author]</a></td>
<td>$post[userip]</td>
<td>$post[postdate]</td>
<td>$post[forumname]</td>
<td><a href="$basename&action=view&tid=$post[tid]&pid=$post[pid]" target=_blank>$post[content]</a></td>
<td><input type=checkbox name=delid[$post[pid]] value=$post[delid]></td>
</tr>
<!--
EOT;
}
print <<<EOT
-->
</table><br>$pages
<center>
<input type='button' class="btn" name='chkall' value='全 選' onclick='CheckAll(this.form)'>
<input type="submit" class="btn" value='提 交'>
</center><br/>
</form>
<!--
EOT;
}}elseif($admintype=='member'){
if(empty($action)){print <<<EOT
-->
<form action="$basename&" method="post">
<h3><b>刪除用戶</b></h3>
<table width=100% cellspacing="0" cellpadding="0">
<tr class="tr3"><td width=20%>用戶組</td>
<td><select name=groupid>$groupselect</select></td></tr>
<tr class="tr3"><td>用戶名包含</td>
<td><input type="text" size="20" class="input" maxlength=14 name="schname">可使用通配符 "*"</td></tr>
<tr class="tr3"><td>email</td>
<td><input type="text" size="20" class="input" maxlength=14 name="schemail">可使用通配符 "*"</td></tr>
<tr class="tr3"><td>發帖數小于(帖)</td>
<td><input type="text" size="20" class="input" maxlength=14 name="postnum"> </td></tr>
<tr class="tr3"><td>在線時間小于(小時)</td>
<td><input type="text" size="20" class="input" maxlength=14 name="onlinetime"> </td></tr>
<tr class="tr3"><td>根據用戶IP查找</td>
<td><input type="text" size="20" class="input" name="userip"> 可使用通配符 "*"</td></tr>
<tr class="tr3"><td>注冊時間大于</td>
<td><select name=regdate>
<option value="all">所有會員</option>
<option value="86400">一天</option>
<option value="172800">二天</option>
<option value="604800">一星期</option>
<option value="2592000">一個月</option>
<option value="7776000">三個月</option>
<option value="15552000">六個月</option>
<option value="31536000">一年</option></select></td></tr>
<tr class="tr3"><td>多久未登錄</td>
<td><select name='schlastvisit'>
<option value="all">所有會員</option>
<option value="86400">一天</option>
<option value="172800">二天</option>
<option value="604800">一星期</option>
<option value="2592000">一個月</option>
<option value="7776000">三個月</option>
<option value="15552000">六個月</option>
<option value="31536000">一年</option></select></td></tr>
<tr class="tr3"><td>排序方式</td>
<td><select name='orderway'>
<option value='lastvisit' checked>最後登錄</option>
<option value='regdate'>	注冊時間</option>
<option value='postnum'>	發帖</option></select>
<input type=radio size=5 name="asc" value='' checked>升序
<input type=radio size=5 name="asc" value='DESC'>降序</td></tr>
<tr class="tr3">
	<td><div id="info3">每頁顯示行數</div></td>
	<td>
		<input type="text" class="input" size="5" name="lines" value="30">
		<input type=checkbox name="direct" value=1 onclick="deldirect(this.form,'info3','每頁顯示行數');">
	直接刪除(直接刪除符合條件的項目)
	</td>
</tr>
<tr class="tr3">
	<td>刪除項目</td>
	<td><input type=checkbox name="item[]" value=1> 用戶信息&nbsp;<input type=checkbox name="item[]" value=2> 用戶主題&nbsp;<input type=checkbox name="item[]" value=4> 用戶回復&nbsp;<input type=checkbox name="item[]" value=8> 用戶短消息</td>
</tr>
</table>
<br><center><input type=submit value="提 交" class="btn"></center>
<input type="hidden" class="btn" name=action value="del"><br />
</form>
<!--
EOT;
} if($action=='del' && empty($step)){print <<<EOT
-->
<form action="$basename&" method=post>
<input type="hidden" name="action" value="$action">
<input type="hidden" name="step" value="2">
<input type="hidden" name="groupid" value="$groupid">
<input type="hidden" name="schname" value="$schname">
<input type="hidden" name="schemail" value="$schemail">
<input type="hidden" name="postnum" value="$postnum">
<input type="hidden" name="onlinetime" value="$onlinetime">
<input type="hidden" name="regdate" value="$regdate">
<input type="hidden" name="schlastvisit" value="$schlastvisit">
<input type="hidden" name="orderway" value="$orderway">
<input type="hidden" name="asc" value="$asc">
<input type="hidden" name="lines" value="$lines">
<input type="hidden" name="page" value="$page">

<h2><b>用戶列表</b></h2>
<table width=100% cellspacing="0" cellpadding="0">
<tr class="tr3" align="center"><td>ID</td>
<td>用戶名</td>
<td>Email</td>
<td>系統頭餃</td>
<td>IP</td>
<td>注冊時間</td>
<td>最後登錄</td>
<td>發帖</td>
<td>刪除</td>
</tr>
<!--
EOT;
foreach($schdb as $key=>$sch){
if(!$sch[username])continue;
$key+=($page-1)*$lines+1;
print <<<EOT
-->
<tr class="tr3 tac">
<td>$key</td>
<td>$sch[username]</td>
<td>$sch[email]</td>
<td>$sch[group]</td>
<td>$sch[onlineip]</td>
<td>$sch[regdate]</td>
<td>$sch[thisvisit]</td>
<td>$sch[postnum]</td>
<td><input type="checkbox" name=delid[] value=$sch[uid] checked>
</td></tr>
<!--
EOT;
}
print <<<EOT
-->
<tr><td class="tr4 tac" colspan="9">刪除項目&nbsp;<input type=checkbox name="item[]" value=1 $check_0> 用戶信息&nbsp;<input type=checkbox name="item[]" value=2 $check_1> 用戶主題&nbsp;<input type=checkbox name="item[]" value=4 $check_2> 用戶回復&nbsp;<input type=checkbox name="item[]" value=8 $check_3> 用戶短消息</td></tr>
</table><br>$pages
<center><input type='button' class="btn" name='chkall' value='全 選' onclick='CheckAll(this.form)'>
<input type=submit value='提 交' class="btn"></center><br/></form>
<!--
EOT;
}}elseif($admintype=='message'){
if(empty($action)){print <<<EOT
-->
<form action="$basename&" method="post">
<h2><b>刪除短消息</b></h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3"><td>信箱類型</td>
<td><select name="type">
<option value='all'>全部刪除</option>
<option value='rebox'>收件箱</option>
<option value='sebox'>發件箱</option>
<option value='public'>群發消息</option>
</select>
<input type="checkbox" name="keepnew" value="1" checked /><font color=blue>是否保留新消息</font></td></tr>
<tr class="tr3"><td width="20%">發件人</td>
<td><input type="text" class="input" size="20" name="fromuser" /> 可使用通配符 "*"</td></tr>
<tr class="tr3"><td width="20%">收件人</td>
<td><input type="text" class="input" size="20" name="touser" /> 可使用通配符 "*"</td></tr>
<tr class="tr3"><td>刪除</td>
<td><input type="text" class="input" size="20" name="msgdate" /> 刪除個數
</td></tr>
<tr class="tr3"><td>關鍵字包含(多個關鍵字用","分隔)</td>
<td><input type="text" class="input" size="20" name="keyword" /> 可使用通配符 "*"</td></tr>
<tr class="tr3">
	<td><div id="info3">每頁顯示行數</div></td>
	<td>
		<input type="text" class="input" size="5" name="lines" value="30" />
		<input type="checkbox" name="direct" value="1" onclick="deldirect(this.form,'info3','每批處理的個數');" />
		直接刪除(直接刪除符合條件的項目)
	</td>
</tr>
</table>
<br /><center><input class="btn" type="submit" value="提 交" /></center>
<input type="hidden" name="action" value="del"/><br/>
</form>

<form action="$basename&" method="post">
<input type="hidden" name="action" value="msglog" />
<h3>刪除個人通信記錄</h3>
<table width="100%" cellspacing="0" cellpadding="0">
	<tr class="tr3">
		<td width="20%">刪除</td>
		<td><input type="text" class="input" size="20" name="msgdate" value="30" /> 天前的通信記錄</td>
	</tr>
	<tr class="tr3">
		<td>每次刪除個數</td>
		<td><input type="text" class="input" size="5" name="lines" value="100" /></td>
	</tr>
</table><br /><center><input type="submit" class="btn" value="提 交" /></center><br/>
</form>
<!--
EOT;
}if($action=='del' && empty($step)){print <<<EOT
-->
<form action="$basename&" method=post>
<input type="hidden" name="action" value="$action">
<input type="hidden" name="step" value="2">
<input type="hidden" name="type" value="$type">
<input type="hidden" name="keepnew" value="$keepnew">
<input type="hidden" name="msgdate" value="$msgdate">
<input type="hidden" name="fromuser" value="$fromuser">
<input type="hidden" name="touser" value="$touser">
<input type="hidden" name="lines" value="$lines">
<input type="hidden" name="page" value="$page">

<h2><b>短消息列表</b></h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3 s3" align="center">
<td>ID</td>
<td>標題</td>
<td>發件人</td>
<td>收件人</td>
<td>時間</td>
<td>刪除</td></tr>
<!--
EOT;
foreach($messagedb as $key=>$message){
if(!$message[title])continue;
$key+=($page-1)*$lines+1;
print <<<EOT
-->
<tr class="tr3" align="center">
<td>$key</td>
<td><a href="$admin_file?adminjob=content&type=message&id=$message[mid]">$message[title]</a></td>
<td>$message[fromuser]</td>
<td>$message[touser]</td>
<td>$message[date]</td>
<td><input type=checkbox name=delid[] value=$message[mid]></td></tr>
<!--
EOT;
}print <<<EOT
-->
</table><br>$pages
<center><input type='button' class="btn" name='chkall' value='全 選' onclick='CheckAll(this.form)'>
<input type=submit value='提 交' class="btn"></center></form><br/>
<!--
EOT;
}}include_once PrintEot('adminbottom');
?>-->
<script language="JavaScript">
function deldirect(form,tar,msg){
	if (form.direct.checked == true) {
		document.getElementById(tar).innerHTML = '<b><font color=blue>刪除個數</font></b>';
	} else {
		document.getElementById(tar).innerHTML = msg;
	}
}
</script>