<script  src="js/ajax.js"></script>
<script>
function no_p(id)
{
	var url='inc/pending_app.php';
	var poststr='type=no&id='+id;
	var r=confirm("确定要删除此黑页？");
	if (r==true)
	{
		seed(url,poststr);
		document.getElementById(id).innerHTML="";
	}
	return false;
}
</script>
<div class="list">
    <table cellspacing="0" >
      <tr class="table_bar">
        <td>提交时间</td>
        <td>提交者</td>
        <td>被黑页面</td>
        <td>查看快照</td>
        <td>删除</td>
      </tr>
<?
$a_page_num=17;
$start_page=$_GET['page']?($_GET['page']-1)*$a_page_num:0;
$start_page=substr($start_page,0,4);
$total_num=@mysql_num_rows(@mysql_query("select tj_name from `hacked_pages` where pending=1"));
$total_pages=ceil($total_num/$a_page_num);

$sql="select * from hacked_pages where pending=1 order by id desc limit $start_page,$a_page_num ";
@$query=mysql_query($sql);
while(@$row=mysql_fetch_array($query))
{
	$page=$row['id'].md5($row['id']);
	$tj_date=date("Y-m-d",$row['tj_date']);
	$tj_name=htmlspecialchars($row['tj_name']);
	$tj_hacked_url=htmlspecialchars($row['tj_hacked_url']);
?>
          
    <tr id="<?=$row['id']?>">
      <td width="12%"><?=$tj_date?></td>
      <td width="16%"><a href="../search.php?var=<?=$row['tj_name']?>"><?=$tj_name?></a></td>
      <td width="56%" style="word-break:break-all"><a href="<?=$tj_hacked_url?>" target="_blank"><?=$row['tj_hacked_url']?></a></td>
      <td width="9%"><a href="../snapshot.php?p=<?=$page?>" target="_blank">查看快照</a></td>
      <td width="7%"><a href="" onClick="return no_p('<?=$row['id']?>')">[删除]</a></td>
    </tr>

<? }
if($total_num<1){echo "<p style='text-align:center; color:red;'>提示：没有任何通过审核的被黑网站</p>";}
?>
<tr>
  <td colspan=6 align=right><? @include('../inc/get_page.php');?></td>
</tr>
</tr>
</table>
</div>