<!--<?php
include_once PrintEot('left');
print <<<EOT
-->
<div class="nav3 mb10 ta">
    <ul class="cc">
      <li><a href="$admin_file?adminjob=tpccheck">主題審核</a></li>
      <li class="current"><a href="$admin_file?adminjob=tpccheck&action=postcheck">回復審核</a></li>
    </ul>
</div>
<div class="admin_info mb10">
    <h3 class="h1"><b>提示信息</b></h3>
    <div class="legend">版塊開啟 "回復審核" 功能時，只有經過管理員審核的回復才會在主題中顯示</div>
</div>
<form action="$basename&" method=post>
  <input type=hidden name=job value='search'>
  <h2 class="h1">搜索回復</h2>
  <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" value="$username">
<!--
EOT;
if($db_plist && count($db_plist)>1){ print <<<EOT
-->
        分表數據庫 :
        <select name="ptable" onchange="window.location=('$basename&ptable='+this.value);"class="select_wa mr20">
          $p_table
        </select>
<!--
EOT;
} print <<<EOT
-->
        <span class="bt2"><span><button type="submit" value="提 交">提 交</button></span></span></td>
    </tr>
  </table>
  </div>
</form>
<form action="$basename&" method="post" name="FORM">
  <input type=hidden name=job value=search>
  <input type=hidden name=step value=2>
  <input type=hidden name=ptable value="$ptable">
  <h2 class="h1">回復列表</h2>
  <div class="admin_table mb10">
  	<script> 	
  	
  	function makeOneChceck(obj){
  		var el = document.forms['FORM'].elements;
			var j = 0;
			for(var i=0; i<el.length; i++){
				if(3 == j){obj.checked = true;break;};
				if('INPUT' == el[i].tagName && "radio" == el[i].type && obj.value == el[i].value){
						el[i].checked = false;
						j++;
				}
			}
		};
		
		function allCheck(ttype){
			var el = document.forms['FORM'].elements;
			var regs = {'pass':/^pass\[\d+\]$/,'dels':/^dels\[\d+\]$/,'here':/^here\[\d+\]$/};
			for(var i=0; i<el.length; i++){	  				
				if('INPUT' == el[i].tagName && "radio" == el[i].type){						
						if(regs[ttype].test(el[i].name)){
								makeOneChceck(el[i]);
						}
				}
			}
		}  	
  			
  </script>
  <table width="100%" cellspacing="0" cellpadding="0">
    <!--<tr class="tr2">
	  <td width="30"><span onclick="CheckAll(document.FORM)" class="cp">全選</span></td>
      <td>標題</td>
      <td>所在主題</td>
      <td>作者</td>
      <td>所屬版塊</td>
      <td>發表時間</td>
    </tr>-->
<!--
EOT;
if (empty($postdb)) {print <<<EOT
-->
<tr><td class="p10" colspan="6"><div class="admin_tips">啊哦，沒有你要的信息！</div></td></tr>
<!--
EOT;
}else{
foreach($postdb as $key=>$post){
print <<<EOT
-->
    <tr class="tr1 vt">
      <td class="td1">
				<ul class="list_A">
					<li><label><input type="radio" onclick="makeOneChceck(this)" name="pass[$post[pid]]" value="$post[pid]"> 通過</label></li>
					<li><label><input type="radio" onclick="makeOneChceck(this)" name="dels[$post[pid]]" value="$post[pid]"> 刪除</label></li>
					<li><label><input type="radio" onclick="makeOneChceck(this)" name="here[$post[pid]]" checked="true" value="$post[pid]"> 暫不處理</label></li>
				</ul>
      	
      	<!--<input type=checkbox name="selid[]" value='$post[pid]'>-->
      	
      	
      	
      	</td>
      	
      	<td class="td2">
      	
      	<a href="thread.php?fid=$post[fid]" target="_blank">$post[name]</a>
      	
      	<span>>></span>
      	
      	<a href="read.php?tid=$post[tid]" target="_blank">$post[tsubject]</a>
      	
      	<span>>></span>
      	
      	<a href="$admin_file?adminjob=content&type=post&tid=$post[tid]&id=$post[pid]">$post[subject]</a>
      	
      	&nbsp;&nbsp;&nbsp;
      	<a href="post.php?action=modify&fid=$post[fid]&tid=$post[tid]&pid=$post[pid]" target="_blank">編輯回帖</a>
      	
      	<br/>
      	
      	作者︰<a href="{$db_userurl}$post[authorid]" target='_blank'>$post[author]</a>&nbsp;
      	
      	發表時間︰$post[postdate]
      	
      	<br/>
      	
      	<div class="p10" style="line-height:1.5;border:1px solid #ccc;background:#fff;max-height:140px;overflow-y:auto;">{$post[content]}</div>
      		</td>
      <!--<td class="td2"><a href="$admin_file?adminjob=content&type=post&tid=$post[tid]&id=$post[pid]">$post[subject]</a></td>
      <td class="td2"><a href="read.php?tid=$post[tid]" target='_blank'>所在主題</a></td>
      <td class="td2"><a href="{$db_userurl}$post[authorid]" target='_blank'>$post[author]</a></td>
      <td class="td2">$post[name]</td>
      <td class="td2">$post[postdate]</td>-->
    </tr>
<!--
EOT;
}}print <<<EOT
-->
  </table>
  </div>
  <div class="cc mb10">$pages</div>
  <div class="mb10 tac" style="float:left">
	  <span class="bt2"><span><button type="button" onclick="allCheck('pass')">全部通過</button></span></span>
		<span class="bt2"><span><button type="button" onclick="allCheck('dels')">全部刪除</button></span></span>
		<span class="bt2"><span><button type="button" onclick="allCheck('here')">全部暫不處理</button></span></span>
  	<!--<p><input type=radio name="type" value=del> 刪除&nbsp;
  	<input type=radio name="type" value=pass checked> 通過
  	</p>-->
  </div>
  <div class="tac mb10"><span class="btn"><span><button type="submit">提 交</button></span></span></div>
</form>
<!--
EOT;
include_once PrintEot('adminbottom');
?>-->
