<!--<?php
include_once PrintEot('left');
if(empty($action)){
if($admintype == 'article'){
print <<<EOT
-->
<h2 class="h1 mb10"><a href="$admin_file?adminjob=app&admintype=appslist">返回基础应用列表</a></h2>
<!--
EOT;
}print<<<EOT
-->
<div class="admin_info mb10">
  <h3 class="h1"><b>提示信息</b></h3>
  <div class="legend">
    <ul>
<!--
EOT;
if($admintype=='article'){print <<<EOT
-->
      <ol><li>删除符合条件的帖子用于清理站点冗余数据,此操作不可恢复,请谨慎使用！</li><li>用户组成员根据用户组权限设置取得相应批量删除权限</li><li>版主拥有所管辖的版块（分类）发布的批量删除的权限<br /><span class="s1">功能说明</span>:<br/>使用<font color=blue>删除主题</font>功能可删除某个会员发表的所有主题(包括回复)<br />使用<font color=blue>删除回复</font>功能可删除某个会员发表的所有回复</li></ol>
<!--
EOT;
}elseif($admintype=='delmember'){
print <<<EOT
-->
      删除符合条件的用户,用于清理站点冗余数据,此操作不可恢复,请谨慎使用！
<!--
EOT;
}elseif($admintype=='message'){
print <<<EOT
-->
      删除符合条件的短消息,用于清理站点冗余数据,此操作不可恢复,请谨慎使用！
<!--
EOT;
}print <<<EOT
-->
    </ul>
  </div>
</div>
<!--
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 class="h1"><b>删除主题</b></h2>
  <div class="admin_table mb10">
	<table cellpadding="0" cellspacing="0" width="100%">
<!--
EOT;
if($db_sphinx['isopen'] == 1){
print <<<EOT
-->
    <script type="text/javascript">
var sphinxControl = {
	num : 8,
	$ : function(id){
		return document.getElementById(id);
	},
	check : function(){
		var checkbox = this.$("sphinxopen");
		if(checkbox.checked == 1){
			this.hidden('none');
		}else{
			this.hidden('');
		}
	},

	hidden : function(show){
		for(var i=0;i<=this.num;i++){
			var obj = this.$("condition_"+i);
			obj ? obj.style.display = show : 0;
		}
	}
}
window.onload = function(){
	if(parent.adminNavClass){
		parent.adminNavClass.initTips();
	}
	sphinxControl.check();
}
</script>
    <tr class="tr1 vt">
      <td class="td1">全文索引搜索(关键字如果为空将使用默认搜索方式)</td>
      <td class="td2"><input type="checkbox" name="sphinx" id="sphinxopen" value="1" checked onclick="sphinxControl.check();" />开启
      </td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">全文索引搜索帖子搜索范围</td>
      <td class="td2">
        <div class="list_A">
            <ul class="cc">
                <li><input type="radio" name="sphinxRange" value="1" checked />主题标题</li>
                <li><input type="radio" name="sphinxRange" value="2"  />主题标题与主题内容</li>
            </ul>
        </div>
      </td>
    </tr>
<!--
EOT;
}print <<<EOT
-->
    <tr class="tr1 vt">
      <td class="td1">所属版块</td>
      <td class="td2"><select name="fid"  class="select_wa mr20 fl">
          <option value='-1'>所有版块</option>
          $forumcache
        </select>
        <input type="checkbox" name="ifkeep" value="1" checked>
        保留精华置顶
        </td>
    </tr>
<!--
EOT;
if($t_table){ print <<<EOT
-->
    <tr class="tr1 vt">
      <td class="td1">分表数据库</td>
      <td class="td2"><select name="ttable"  class="select_wa">
          $t_table
        </select></td>
    </tr>
<!--
EOT;
}print <<<EOT
-->
    <tr class="tr1 vt">
      <td class="td1">主题发表时间</td>
      <td class="td2">
      <div class="input_img fl"><i class="input_time" title="选择时间">选择时间</i><input type="text" name="pstarttime" id="pstarttime" onClick="javascript:ShowCalendar(this.id)" /></div><span class="p_lr_10 fl">至</span><div class="input_img fl mr20"><i class="input_time" title="选择时间">选择时间</i><input type="text" name="pendtime" id="pendtime" onClick="javascript:ShowCalendar(this.id)" /></div>可只用单个条件
      </td>
    </tr>
    <tr class="tr1 vt" id="condition_0">
      <td class="td1">主题最后被回复时间</td>
      <td class="td2">
      <div class="input_img fl"><i class="input_time" title="选择时间">选择时间</i><input type="text" name="lstarttime" id="lstarttime" onClick="javascript:ShowCalendar(this.id)" /></div><span class="p_lr_10 fl">至</span><div class="input_img fl mr20"><i class="input_time " title="选择时间">选择时间</i><input type="text" name="lendtime" id="lendtime" onClick="javascript:ShowCalendar(this.id)" /></div>只可用单个条件
      </td>
    </tr>
    <tr class="tr1 vt" id="condition_1">
      <td class="td1">指定 tid 范围</td>
      <td class="td2">
      <input type="text" class="input input_wa" name="tstart"><span class="p_lr_10">-</span><input type="text" class="input input_wa mr20" name="tend"> 只可用单个条件
      </td>
    </tr>
    <tr class="tr1 vt" id="condition_2">
      <td class="td1">浏览人数小于</td>
      <td class="td2"><input type="text" class="input input_wa mr20" maxlength=14 name="hits"><!-- 的主题 --></td>
    </tr>
    <tr class="tr1 vt" id="condition_4">
      <td class="td1">回复人数小于</td>
      <td class="td2"><input type="text" class="input input_wa mr20" maxlength=14 name="replies"><!-- 的主题 --></td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">按主题作者删除</td>
      <td class="td2"><input type="text" class="input input_wa mr20" name="author">可使用通配符 "*"，多个作者用英文半角逗号","分隔</td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">关键字</td>
      <td class="td2"><input type="text" class="input input_wa mr20" name="keyword">可使用通配符 "*"，多个关键字用英文半角逗号","分隔</td>
    </tr>
    <tr class="tr1 vt" id="condition_5">
      <td class="td1">内容大于[字节]</td>
      <td class="td2"><input type="text" class="input input_wa mr20" name="tcounts"></td>
    </tr>
    <tr class="tr1 vt" id="condition_6">
      <td class="td1">内容少于[字节]</td>
      <td class="td2"><input type="text" class="input input_wa mr20" name="counts"></td>
    </tr>
    <tr class="tr1 vt" id="condition_7">
      <td class="td1">根据用户IP查找</td>
      <td class="td2"><input type="text" class="input input_wa mr20" name="userip">可使用通配符 "*"</td>
    </tr>
    <tr class="tr3" id="condition_8">
      <td class="td1"><div id="info1">每页显示行数</div></td>
      <td class="td2"><input type="text" class="input input_wa mr20" name="lines" value="30"><input type="checkbox" name="direct" value=1 onclick="deldirect(this.form,'info1','每页显示行数');">
    直接删除(直接删除符合条件的项目)
        </td>
    </tr>
  </table>
  </div>
  <div class="mb10 tac">
    <span class="btn"><span><button type="submit">提 交</button></span></span>
    </div>
</form>
<form action="$basename&" method=post>
  <input type=hidden name=action value='delrpl'>
  <h2 class="h1"><b>删除回复</b></h2>
  <div class="admin_table mb10">
	<table cellpadding="0" cellspacing="0" width="100%">
<!--
EOT;
if($db_sphinx['isopen'] == 1){
print <<<EOT
-->
    <script type="text/javascript">
var sphinxPostControl = {
	num : 6,
	$ : function(id){
		return document.getElementById(id);
	},
	check : function(){
		var checkbox = this.$("sphinxpostopen");
		if(checkbox.checked == 1){
			this.hidden('none');
		}else{
			this.hidden('');
		}
	},

	hidden : function(show){
		for(var i=0;i<=this.num;i++){
			var obj = this.$("conditionpost_"+i);
			obj ? obj.style.display = show : 0;
		}
	}
}
</script>
    <tr class="tr1 vt">
      <td class="td1">全文索引搜索(关键字如果为空将使用默认搜索方式)</td>
      <td class="td2"><input type="checkbox" name="sphinx" value="1" onclick="sphinxPostControl.check();" id="sphinxpostopen"/>开启</td>
    </tr>
<!--
EOT;
}print <<<EOT
-->
    <tr class="tr1 vt">
      <td class="td1">所属版块</td>
      <td class="td2"><select name="fid" class="select_wa">
          <option value='-1'>所有版块</option>
          $forumcache
        </select></td>
    </tr>
<!--
EOT;
if($p_table){ print <<<EOT
-->
    <tr class="tr1 vt">
      <td class="td1">分表数据库</td>
      <td class="td2"><select name="ptable" class="select_wa">
          $p_table
        </select></td>
    </tr>
<!--
EOT;
}print <<<EOT
-->
    <tr class="tr1 vt" id="conditionpost_0">
      <td class="td1">所属主题ID</td>
      <td class="td2"><input type="text" class="input input_wa mr20" name="tid">
        <span class="s1">用于删除指定主题的所有回复。多个主题ID用英文半角逗号","分隔</span></td>
    </tr>
    <tr class="tr1 vt" id="conditionpost_1">
      <td class="td1">指定 pid 范围</td>
      <td class="td2"><input type="text" class="input input_wa" name="pstart">
        -
        <input type="text" class="input input_wa mr20" name="pend">只可用于单个条件
      </td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">按作者删除(<font color=blue>回复作者</font>)</td>
      <td class="td2"><input type="text" class="input input_wa mr20" name="author">可使用通配符 "*"，多个作者用英文半角逗号","分隔</td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">关键字</td>
      <td class="td2"><input type="text" class="input input_wa mr20" name="keyword">可使用通配符 "*"</td>
    </tr>
    <tr class="tr1 vt" id="conditionpost_2">
      <td class="td1">内容大于[字节]</td>
      <td class="td2"><input type="text" class="input input_wa mr20" name="tcounts"></td>
    </tr>
    <tr class="tr1 vt" id="conditionpost_3">
      <td class="td1">内容少于[字节]</td>
      <td class="td2"><input type="text" class="input input_wa mr20" name="counts"></td>
    </tr>
    <tr class="tr1 vt" id="conditionpost_4">
      <td class="td1">根据用户IP查找</td>
      <td class="td2"><input type="text" class="input input_wa mr20" name="userip">可使用通配符 "*"</td>
    </tr>
    <tr class="tr1 vt" id="conditionpost_5">
      <td class="td1">每批处理的个数</td>
      <td class="td2"><input type="text" class="input input_wa mr20" name="nums" value="30"><input type="checkbox" name="direct" value=1 onclick="deldirect(this.form,'info2','每批处理的个数');">
        直接删除(直接删除符合条件的项目)</td>
    </tr>
  </table>
  </div>
  	<div class="mb10 tac">
    <span class="btn"><span><button type="submit">提 交</button></span></span>
    </div>
</form>
<!--
EOT;
} elseif($action=='deltpc' && empty($step)){print <<<EOT
-->
<form action="$basename&" method="post" name="del_tpc_form"  id="del_tpc_form">
  <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="sphinx" value="$sphinx">
  <input type="hidden" name="sphinxRange" value="$sphinxRange">
  <input type="hidden" name="step" value="2">
    <h2 class="h1 mb10"><a href="$admin_file?adminjob=app&admintype=appslist">返回基础应用列表</a></h2>
    <h3 class="h1"><b>文章列表</b></h3>
    <div class="admin_table mb10">
		<table cellpadding="0" cellspacing="0" width="100%">
          <tr class="tr2 vt td_bgB">
            <td width="15">ID</td>
            <td>标题</td>
            <td width="70">作者</td>
            <td width="100">按发表时间排序</td>
            <td width="95">IP</td>
            <td width="80">版块</td>
            <td width="24">回复</td>
            <td width="24">人气</td>
            <td width="24">删除</td>
          </tr>
<!--
EOT;
foreach($topicdb as $key=>$topic){
if(!$topic[subject])continue;
$key+=($page-1)*$lines+1;
print <<<EOT
-->
          <tr class="tr1 vt">
            <td class="td2">$key</td>
            <td class="td2"><p class="lh_18"><a href="read.php?fid=$topic[fid]&tid=$topic[tid]" target="_blank" title="$topic[subject]">$topic[subject]</a></p></td>
            <td class="td2"><a href="u.php?action=show&uid=$topic[authorid]" target=_blank>$topic[author]</a></td>
            <td class="td2">$topic[postdate]</td>
            <td class="td2">$topic[userip]</td>
            <td class="td2"><p class="lh_18">$topic[forumname]</p></td>
            <td class="td2">$topic[replies]</td>
            <td class="td2">$topic[hits]</td>
            <td class="td2"><input type="checkbox" name="delid[$topic[tid]]" value="$topic[fid]"></td>
          </tr>
<!--
EOT;
}print <<<EOT
-->
        </table>
    </div>
  <div class="cc mb10">$pages</div>
  <div class="mb10 tac">
    <span class="bt"><span><button type="button" name="chkall" value="全 选" onclick="CheckAll(this.form)">全 选</button></span></span>
    <span class="btn"><span><button type="submit">提 交</button></span></span>
   </div>
</form>
<script language="JavaScript">
var superdel = {
	submit : function (page){
		document.del_tpc_form.step.value = "";
		document.del_tpc_form.page.value = page;
		document.del_tpc_form.submit();
	}
}
</script>
<!--
EOT;
} elseif($action=='delrpl' && empty($step)){print <<<EOT
-->
<form action="$basename&" name="del_rpl_form" method="post" id="del_rpl_form">
  <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">
  <input type="hidden" name="sphinx" value="$sphinx">
  <input type="hidden" name="sphinxRange" value="$sphinxRange">
  <h2 class="h1 mb10"><a href="$admin_file?adminjob=app&admintype=appslist">返回基础应用列表</a></h2>
  <h3 class="h1"><b>文章列表</b></h3>
  <div class="admin_table mb10">
    <table cellpadding="0" cellspacing="0" width="100%">
    <tr class="tr2 vt td_bgB">
      <td>ID</td>
      <td>作者</td>
      <td>IP</td>
      <td>按发表时间排序</td>
      <td>站点</td>
      <td>内容</td>
      <td>删除</td>
    </tr>
<!--
EOT;
$num=($page-1)*$nums;
foreach($postdb as $key=>$post){
if(!$post[content])continue;
$num++;
print <<<EOT
-->
    <tr class="tr1 vt">
      <td class="td2">$num</td>
      <td class="td2"><a href="u.php?action=show&uid=$post[authorid]" target=_blank>$post[author]</a></td>
      <td class="td2">$post[userip]</td>
      <td class="td2">$post[postdate]</td>
      <td class="td2">$post[forumname]</td>
      <td class="td2"><a href="$basename&action=view&tid=$post[tid]&pid=$post[pid]" target=_blank>$post[content]</a></td>
      <td class="td2"><input type="checkbox" name="delid[$post[pid]]" value="$post[delid]"></td>
    </tr>
<!--
EOT;
}
print <<<EOT
-->
  </table>
  </div>
  <div class="cc mb10">$pages</div>
  <div class="mb10 tac">
    <span class="bt"><span><button type="button" name="chkall" value="全 选" onclick="CheckAll(this.form)">全 选</button></span></span>
    <span class="btn"><span><button type="submit">提 交</button></span></span>
  </div>
</form>
<script language="JavaScript">
var superdel = {
	submit : function (page){
		var form = getObj("del_rpl_form");
		form.step.value = "";
		form.page.value = page;
		setTimeout(function(){
			form.submit();
		},0);
	}
}
</script>
<!--
EOT;
}}elseif($admintype=='delmember'){
if(empty($action)){print <<<EOT
-->
<form action="$basename&" method="post">
  <h3 class="h1"><b>删除用户</b></h3>
  <div class="admin_table mb10">
  <table width=100% cellspacing="0" cellpadding="0">
    <tr class="tr1 vt">
      <td class="td1">用户组</td>
      <td class="td2"><select name="groupid" class="select_wa">
          $groupselect
        </select></td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">用户名包含</td>
      <td class="td2"><input type="text" class="input input_wa mr20" maxlength=16 name="schname">  可使用通配符 "*"</td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">email</td>
      <td class="td2"><input type="text" class="input input_wa mr20" maxlength=64 name="schemail">
        可使用通配符 "*"</td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">发帖数小于[帖]</td>
      <td class="td2"><input type="text" class="input input_wa mr20" maxlength=10 name="postnum">
      </td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">在线时间小于[时]</td>
      <td class="td2"><input type="text" class="input input_wa mr20" maxlength=10 name="onlinetime">
      </td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">根据用户IP查找</td>
      <td class="td2"><input type="text" class="input input_wa mr20" maxlength=15 name="userip">
        可使用通配符 "*"</td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">注册时间大于</td>
      <td class="td2"><select name="regdate" class="select_wa">
          <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="tr1 vt">
      <td class="td1">多久未登录</td>
      <td class="td2"><select name="schlastvisit" class="select_wa">
          <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="tr1 vt">
      <td class="td1">排序方式</td>
      <td class="td2"><select name="orderway" class="select_wa mr20 fl">
          <option value='lastvisit' checked>最后登录</option>
          <option value='regdate'> 注册时间</option>
          <option value='postnum'> 发帖</option>
        </select>
       			<ul class="cc list_80 fl list_A">
                	<li><input type="radio" size="5" name="asc" value="checked">正序</li>
                    <li><input type="radio" size="5" name="asc" value="DESC">倒序</li>
                </ul>
        </td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">每页显示行数</td>
      <td class="td2"><input type="text" class="input input_wa mr20" name="lines" value="30"><input type="checkbox" name="direct" value="1" onclick="deldirect(this.form,'info3','每页显示行数');">
        直接删除(直接删除符合条件的项目)</td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">删除项目</td>
      <td class="td2">
      	<ul class="cc list_A">
        	<li><input type="checkbox" name="item[]" value="1">用户信息</li>
            <li><input type="checkbox" name="item[]" value="2">用户主题</li>
            <li><input type="checkbox" name="item[]" value="4">用户回复</li>
            <li><input type="checkbox" name="item[]" value="8">用户短消息</li>
        </ul>
		</td>
    </tr>
  </table>
  </div>
  	<div class="mb10 tac">
    <span class="btn"><span><button type="submit">提 交</button></span></span>
    </div>
  <input type="hidden" class="btn" name="action" value="del">
</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">
  <input type="hidden" name="sphinx" value="$sphinx">
  <input type="hidden" name="sphinxRange" value="$sphinxRange">
  <h2 class="h1"><b>用户列表</b></h2>
  <div class="admin_table mb10">
	<table cellpadding="0" cellspacing="0" width="100%">
    <tr class="tr2 vt td_bgB">
      <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="tr1 vt">
      <td class="td2">$key</td>
      <td class="td2">$sch[username]</td>
      <td class="td2">$sch[email]</td>
      <td class="td2">$sch[group]</td>
      <td class="td2">$sch[onlineip]</td>
      <td class="td2">$sch[regdate]</td>
      <td class="td2">$sch[thisvisit]</td>
      <td class="td2">$sch[postnum]</td>
      <td class="td2"><input type="checkbox" name="delid[]" value="$sch[uid]" checked>
      </td>
    </tr>
<!--
EOT;
}
print <<<EOT
-->
    <tr class="tr1 vt">
      <td class="td1">删除项目</td>
       <td class="td2" colspan="8">
       	<ul class="cc list_A fl">
        	<li><input type="checkbox" name="item[]" value="1" $check_0>用户信息</li>
            <li><input type="checkbox" name="item[]" value="2" $check_1>用户主题</li>
            <li><input type="checkbox" name="item[]" value="4" $check_2>用户回复</li>
            <li><input type="checkbox" name="item[]" value="8" $check_3>用户短消息</li>
        </ul>
        </td>
    </tr>
  </table>
  <div class="cc mb10">$pages</div>
  <div class="mt5 mb10 tac">
        <span class="bt"><span><button type="button" name="chkall" onclick="CheckAll(this.form)">全 选</button></span></span>
        <span class="btn"><span><button type="submit">提 交</button></span></span>
  </div>
</form>
<!--
EOT;
}}elseif($admintype=='message'){
if(empty($action)){print <<<EOT
-->
<form action="$basename&" method="post">
  <h2 class="h1"><b>删除短消息</b></h2>
  <div class="admin_table mb10">
      <table width="100%" cellspacing="0" cellpadding="0">
        <tr class="tr1 vt">
          <td class="td1">信箱类型</td>
          <td class="td2"><select name="type" class="select_wa">
              <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 />
            保留新消息</td>
        </tr>
        <tr class="tr1 vt">
          <td class="td1">发件人</td>
          <td class="td2"><input type="text" class="input input_wa mr20" name="fromuser" />可使用通配符 "*"</td>
        </tr>
        <tr class="tr1 vt">
          <td class="td1">收件人</td>
          <td class="td2"><input type="text" class="input input_wa mr20" name="touser" />可使用通配符 "*"</td>
        </tr>
        <tr class="tr1 vt">
          <td class="td1">删除</td>
          <td class="td2"><input type="text" class="input input_wa mr20" name="msgdate" />删除个数 </td>
        </tr>
        <tr class="tr1 vt">
          <td class="td1">关键字</td>
          <td class="td2"><input type="text" class="input input_wa mr20" name="keyword" />可使用通配符 "*"</td>
        </tr>
        <tr class="tr1 vt">
          <td class="td1">每页显示行数</td>
          <td class="td2">
          <input type="text" class="input input_wa mr20 fl" name="lines" value="30" />
            	<ul class="cc fl list_A">
                	<li><input type="checkbox" name="direct" value="1" onclick="deldirect(this.form,'info3','每批处理的个数');" />直接删除(直接删除符合条件的项目)</li>
              </ul>
             </td>
        </tr>
      </table>
  </div>
  <div class="mb10 tac">
    <span class="btn"><span><button type="submit">提 交</button></span></span>
   </div>
  <input type="hidden" name="action" value="del"/>
</form>
<form action="$basename&" method="post">
  <input type="hidden" name="action" value="msglog" />
  <h3 class="h1">删除个人通信记录</h3>
  <div class="admin_table mb10">
  <table width="100%" cellspacing="0" cellpadding="0">
    <tr class="tr1 vt">
      <td class="td1">删除</td>
      <td class="td2"><input type="text" class="input input_wa mr20" name="msgdate" value="30" />天前的通信记录</td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">每次删除个数</td>
      <td class="td2"><input type="text" class="input input_wa mr20" name="lines" value="100" /></td>
    </tr>
  </table>
  </div>
  <div class="mb10 tac">
    <span class="btn"><span><button type="submit">提 交</button></span></span>
   </div>
</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 class="h1"><b>短消息列表</b></h2>
  <div class="admin_table mb10">
  <table width="100%" cellspacing="0" cellpadding="0">
    <tr class="tr2 vt td_bgB">
      <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="tr1 vt">
      <td class="td2">$key</td>
      <td class="td2"><a href="$admin_file?adminjob=content&type=message&id=$message[mid]">$message[title]</a></td>
      <td class="td2">$message[fromuser]</td>
      <td class="td2">$message[touser]</td>
      <td class="td2">$message[date]</td>
      <td class="td2"><input type="checkbox" name="delid[]" value="$message[mid]"></td>
    </tr>
<!--
EOT;
}print <<<EOT
-->
  </table>
  </div>
  <div class="cc mb10">$pages</div>
  <div class="mb10 tac">
    <span class="bt"><span><button type="button" name="chkall" onclick="CheckAll(this.form)">全 选</button></span></span>
    <span class="btn"><span><button type="submit"value="提 交">提 交</button></span></span>
  </div>
</form>
<!--
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>
