<!--<?php
include_once PrintEot('left');
print <<<EOT
-->
<div class="nav3 mb10 ta">
    <ul class="cc">
<!--
EOT;
if ($type == 'topic'){print <<<EOT
-->
      <li class="current"><a href="$basename&type=topic">主题回收站</a></li>
      <li><a href="$basename&type=reply">回复回收站</a></li>
<!--
EOT;
}else{print <<<EOT
-->
      <li><a href="$basename&type=topic">主题回收站</a></li>
      <li class="current"><a href="$basename&type=reply">回复回收站</a></li>
<!--
EOT;
}print <<<EOT
-->
    </ul>
</div>
<div class="admin_info mb10">
    <h3 class="h1"><b>提示信息</b></h3>
    <div class="legend">
      <ol>
      <li>还原:可将被删除的帖子主题或回复还原到原来的版块帖子中。</li><li>删除:将帖子主题或回复从回收站中彻底删除,不可恢复</li><li>清空:删除所有回收站帖子</li><li>删除记录:删除回收站的记录,但并没有彻底删除帖子内容,不可恢复</li>
      </ol>
    </div>
 </div>
<!--
EOT;
if ($type == 'topic'){print <<<EOT
-->
<form action="$basename&type=topic&" method=post>
  <h3 class="h1">回收站</h3>
  <div class="admin_table mb10">
      <table width="100%" cellspacing="0" cellpadding="0">
        <tr class="tr1 vt">
          <td class="td2">所属分类 :
            <select name="fid" class="select_wa mr20">
              <option>选择分类</option>
              $forumcache
            </select>
            作者:
            <input type="text" class="input input_wa mr20" name="username">
            管理员:
            <input type="text" class="input input_wa mr20" name="admin">
            <span class="bt2"><span><button type="submit" value="提 交">提 交</button></span></span></td>
        </tr>
      </table>
  </div>
</form>
<form action="$basename&type=topic&" method="post" name="form1">
  <h3 class="h1">回收站</h3>
  <div class="admin_table mb10">
  <table width="100%" cellspacing="0" cellpadding="0">
    <tr class="tr2">
      <td>ID</td>
      <td>标题</td>
      <td>站点</td>
      <td>作者</td>
      <td>管理员</td>
      <td>时间</td>
      <td>&nbsp;</td>
    </tr>
<!--
EOT;
$id=($page-1)*$db_perpage;
foreach($recycledb as $key => $value){
$id++;
print <<<EOT
-->
    <tr class="tr1 vt">
      <td class="td2">$id</td>
      <td class="td2" onclick="content('$value[tid]');">$value[subject]</td>
      <td class="td2"><a href="thread.php?fid=$value[fid]" target="_blank">$value[fname]</a></td>
      <td class="td2"><a href="u.php?action=show&uid=$value[authorid]" target="_blank">$value[author]</a></td>
      <td class="td2">$value[admin]</td>
      <td class="td2">$value[deltime]</td>
      <td class="td2"><input type='checkbox' name='selid[$value[tid]]' value="$value[fid]"></td>
    </tr>
    <tr id="content_$value[tid]" style="display:none;" class="tr1 vt">
      <td class="td2" colspan="7">$value[content]</td>
    </tr>
<!--
EOT;
}print <<<EOT
-->
  </table>
  </div>
  <div class="fr"><span class="bt2"><span><button type="button" value="清空草稿箱" onclick="Recycle.Confirm('topic');">清空回收站</button></span></span></div>
  <div class="cc mb10">$pages</div>
  <div class="mb10 tac">
  	<p><input type="radio" name="action" value="revert" checked> 还原帖子&nbsp;
        <input type="radio" name="action" value="del" > 删除帖子&nbsp;
        <input type="radio" name="action" value="clear"> 删除记录</p>
  </div>
    <div class="tac mb10">
      <span class="bt"><span><button type="button" name="chkall" onclick="CheckAll(this.form)">全 选</button></span></span>
    <span class="btn"><span><button type="submit" name="hello" onclick="return confirm('您确认要进行此操作吗?');">提 交</button></span></span>
 </div>
</form>
<!--
EOT;
}else{print <<<EOT
-->
<form action="$basename&type=reply&" method=post>
  <h3 class="h1">回收站</h3>
  <div class="admin_table mb10">
  <table width="100%" cellspacing="0" cellpadding="0">
    <tr class="tr1 vt">
      <td class="td2">所属分类 :
        <select name="fid" class="select_wa mr20">
          <option>选择分类</option>
          $forumcache
        </select>
        作者 :<input type="text" class="input input_wa mr20" name="username">
        管理员 :<input type="text" class="input input_wa mr20" name="admin">
        <span class="bt2"><span><button type="submit" value="提 交">提 交</button></span></span></td>
    </tr>
  </table>
  </div>
</form>
<form action="$basename&type=reply&" method="post" name="form1">
<h3 class="h1"><span class="mr10">回收站</span>
<!--
EOT;
if($db_plist && count($db_plist)>1){print <<<EOT
-->
        <select onchange="window.location=('$basename&type=reply&ptable='+this.value);" name="ptable">
          $p_table
        </select>
<!--
EOT;
}print <<<EOT
-->
        </h3>
  <div class="admin_table mb10">
  <table width="100%" cellspacing="0" cellpadding="0"> 
    <tr class="tr2">
      <td>ID</td>
      <td>标题</td>
      <td>站点</td>
      <td>作者</td>
      <td>管理员</td>
      <td>时间</td>
      <td>&nbsp;</td>
    </tr>
<!--
EOT;
$id=($page-1)*$db_perpage;
foreach($recycledb as $key => $value){
$id++;
print <<<EOT
-->
    <tr class="tr1 vt">
      <td class="td2">$id</td>
      <td class="td2" onclick="content('$value[pid]');">$value[subject](<a href="read.php?tid=$value[tid]" target="_blank">查看主题帖</a>)</td>
      <td class="td2"><a href="thread.php?fid=$value[fid]" target="_blank">$value[fname]</a></td>
      <td class="td2"><a href="u.php?action=show&uid=$value[authorid]" target="_blank">$value[author]</a></td>
      <td class="td2">$value[admin]</td>
      <td class="td2">$value[deltime]</td>
      <td class="td2"><input type='checkbox' name='selid[$value[pid]]' value="$value[fid]"></td>
    </tr>
    <tr id="content_$value[pid]" class="tr1 vt" style="display:none;">
      <td class="td2" colspan="7">$value[content]</td>
    </tr>
<!--
EOT;
}print <<<EOT
-->
  </table>
  </div>
  <div class="fr"><span class="bt2"><span><button type="button" value="清空回收站" onclick="Recycle.Confirm('reply');">清空回收站</button></span></span></div>
  <div class="cc mb10">$pages</div>
  <div class="mb10 tac">
  	<p><input type="radio" name="action" value="revert"> 还原回复&nbsp;
        <input type="radio" name="action" value="del" checked> 删除回复&nbsp;
        <input type="radio" name="action" value="clear"> 删除记录</p>
  </div>
  <div class="tac mb10">
    <span class="bt"><span><button type="button" name="chkall" onclick="CheckAll(this.form)">全 选</button></span></span>
    <span class="btn"><span><button type="submit" name="hello" onclick="return confirm('您确认要进行此操作吗?');">提 交</button></span></span>
 </div>
</form>
<!--
EOT;
}print <<<EOT
-->
<script language="JavaScript">
function content(id){
	var o = getObj('content_'+id);
	o.style.display = o.style.display == 'none' ? '' : 'none';
}

var Recycle = {
	Confirm : function (type){
		if(confirm("清空后回收站内所有数据将不能被恢复！确认要清空回收站么？")){
			var form = document.form1;
			for(var i=0;i<form.elements.length;i++){
				if(form.elements[i].type == "radio" && form.elements[i].checked){
					form.elements[i].value = "empty";
				}
			}
			form.submit();
		}
		return false;
	}
}

</script>
<!--
EOT;
include_once PrintEot('adminbottom');
?>-->