<!--
<?php
print <<<EOT
--> 
<style type="text/css">
.ListTable td{
	vertical-align:middle;
	color:#888;
}
</style>	
<div class="MainCont">
	<div class="head"><div class="tag">评论管理</div></div>
    <div class="cont">
    	<form name="formcc" method="post" action="?job=del">
    	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="ListTable">
          <tr>
            <th width="52%">评论</th>
            <th width="18%">日期</th>
            <th width="10%">评论者</th>
            <th width="20%">操作</th>
          </tr>
<!--
EOT;
foreach($listdb AS $key=>$rs){
$rs[ctitle] = get_word($rs[ctitle],60);
print <<<EOT
-->
          <tr>
            <td class="tL">
            <input type="checkbox" name="cidDB[]" value="$rs[cid]">
            <a href="../do/comment.php?fid=$rs[fid]&id=$rs[aid]" target="_blank" title="$rs[content]">$rs[ctitle]</a>
            </td>
            <td>$rs[posttime]</td>
            <td>$rs[username]</td>
            <td>
            	<a href="..$webdb[path]/bencandy.php?fid=$rs[fid]&id=$rs[aid]" target="_blank" title="查看所评论的文章"><img src="images/icon_view.gif"/></a>
            	{$rs[state]} 
                <a href="?job=del&cidDB[]=$rs[cid]"><img src="images/del_icon2.gif"/></a>                
            </td>
          </tr>
<!--
EOT;
}
$showpage=$showpage?"<div class=\"Showpage\">$showpage</div>":"";
print <<<EOT
-->
        </table>
        $showpage
        <div style="text-align:center;padding:10px 0 10px 0;">
        	<a href="javascript:" onClick="CheckAll('all')">全选</a>/<a href="javascript:" onClick='CheckAll()'>反选</a> 
            <input type="button" name="Submit" value="批量删除" onclick="postdel()">
        </div>
        </form>
    </div>
</div>
<SCRIPT LANGUAGE="JavaScript">
<!--
function CheckAll(va){
	form=document.formcc
	for (var i=0;i<form.elements.length;i++){
		var e = form.elements[i];
		if(va=='all'){
			e.checked = true;
		}else{
			e.checked == true ? e.checked = false : e.checked = true;
		}
	}
}
function postdel(){
	form=document.formcc
	var ck=false;
	for (var i=0;i<form.elements.length;i++){
		var e = form.elements[i];
		if(e.checked == true){
			ck = true;
		}
	}
	if(ck==false){
		alert('请选择一条记录');
		return false;
	}
	form.submit();
}
//-->
</SCRIPT>
<!--
EOT;
?>
-->
