<!--<?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 mr10" name="username" />關鍵字:<input type="text" class="input input_wa mr10" name="keyword" /><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 width="30"><span onclick="CheckAll(document.form1)" class="cp">全選</span></td>
      <td>用戶名</td>
      <td>草稿內容</td>
    </tr>
<!--
EOT;
if (empty($draft)) {print <<<EOT
-->
<tr><td class="p10" colspan="3"><div class="admin_tips">啊哦，沒有你要的信息！</div></td></tr>
<!--
EOT;
}else{
foreach($draft as $key=>$value){
print <<<EOT
-->
    <tr class="tr1 vt">
      <td class="td2"><input type="checkbox" name="selid[]" value="$value[did]" onclick="pwJsCheck(this)" /></td>
      <td class="td2"><a href="{$db_userurl}$value[uid]" target="_blank">$value[username]</a></td>
      <td class="td2"><textarea class="textarea">{$value[content]}</textarea></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" onclick="CheckAll(document.form1)">全 選</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');
?>-->
