<!--<?php
include_once PrintEot('left');
if(!$action){print <<<EOT
-->
<div class="nav3 mb10 ta">
    <ul class="cc">
      <li class="current"><a href="$basename">草稿箱列表</a></li>
      <li><a href="$basename&action=del">批量删除草稿</a></li>
    </ul>
</div>
<form action="$basename" 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">用户名:<input type="text" class="input input_wa" name="username" /></td>
      <td class="td2">关键字:<input type="text" class="inpu input_wat" name="keyword" /></td>
      <td class="td2"><span class="bt2"><span><button type="submit" value="提 交">提 交</button></span></span></td>
    </tr>
  </table>
  </div>
</form>
<form action="$basename&" method="post" name="form1">
  <input type="hidden" name="action" value="draft" />
  <h2 class="h1">草稿箱管理</h2>
  <div class="admin_table mb10">
  <table width="100%" cellspacing="0" cellpadding="0">
    <tr class="tr2">
      <td>ID</td>
      <td>用户名</td>
      <td>草稿内容</td>
      <td>删除</td>
    </tr>
<!--
EOT;
$i=($page-1)*$db_perpage;
foreach($draft as $key=>$value){
$i++;
print <<<EOT
-->
    <tr class="tr1 vt">
      <td class="td2">$i</td>
      <td class="td2">$value[username]</td>
      <td class="td2"><textarea class="textarea">{$value[content]}</textarea></td>
      <td class="td2"><input type="checkbox" name="selid[]" value="$value[did]" onclick="pwJsCheck(this)" /></td>
    </tr>
<!--
EOT;
}print <<<EOT
-->
  </table>
  </div>
  <div class="fr">
    <span class="bt2"><span><button type="button" value="清空草稿箱" onclick="Draft.Confirm();">清空草稿箱</button></span></span>
</div>
  <script type="text/javascript">
var Draft = {
	Confirm : function(){
		if(confirm("清空后草稿箱内所有数据将不能被恢复，确认要清空草稿箱么？")){
			var form = document.form1;
			form.action.value = "empty";
			form.submit();
		}
		return false;
	}
}
</script>
  <div class="cc mb10">$pages</div>
  <div class="tac mb10">
      <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>
<!--
EOT;
}elseif($action=='del'){print <<<EOT
-->
<div class="nav3 mb10 ta">
    <ul class="cc">
      <li><a href="$basename">草稿箱列表</a></li>
      <li class="current"><a href="$basename&action=$action">批量删除草稿</a></li>
    </ul>
</div>
<form action="$basename" method="post">
  <input type="hidden" name="action" value="del" />
  <input type="hidden" name="step" value="2" />
  <h2 class="h1">批量删除</h2>
  <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" name="username" /></td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">关键字</td>
      <td class="td2"><input type="text" class="input input_wa" name="keyword" /></td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">删除个数限制</td>
      <td class="td2"><input type="text" class="input input_wa mr10" name="num" value="200" />
        <input type="checkbox" name="clear" value="1" />
        清空草稿箱(删除草稿箱所有信息)
        </td>
    </tr>
  </table>
  </div>
  <div class="tac mb10">
    <span class="btn"><span><button type="submit">提 交</button></span></span>
 </div>
</form>
<!--
EOT;
}include_once PrintEot('adminbottom');
?>-->
