<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>重复文档检测</title>
<script language="javascript">

//获得选中文件的文件名
function getCheckboxItem()
{
	var allSel="";
	if(document.form2.arcTitle.value) return document.form2.arcTitle.value;
	for(i=0;i<document.form2.arcTitle.length;i++)
	{
		if(document.form2.arcTitle[i].checked)
		{
			if(allSel=="")
				allSel=document.form2.arcTitle[i].value;
			else
				allSel=allSel+"`"+document.form2.arcTitle[i].value;
		}
	}
	return allSel;
}

//删除文档
function delArc(){
	var qstr=getCheckboxItem();
	document.form2.titles.value = qstr;
	document.form2.submit();
}

function selAll()
{
	for(i=0;i<document.form2.arcTitle.length;i++){
		if(!document.form2.arcTitle[i].checked){
			document.form2.arcTitle[i].checked=true;
		}
	}
}
function noSelAll()
{
	for(i=0;i<document.form2.arcTitle.length;i++){
		if(document.form2.arcTitle[i].checked){
			document.form2.arcTitle[i].checked=false;
		}
	}
}
</script>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
body,td,th {
	font-size: 12px;
}
a:link {
	text-decoration: none;
}
a:visited {
	text-decoration: none;
}
a:hover {
	text-decoration: none;
}
a:active {
	text-decoration: none;
}
a {
	font-size: 12px;
}
-->
</style></head>
<body>
<tr>
  <td align='center' valign='top'>
    <table width="100%" border="0" cellpadding="2" cellspacing="1" class="tbtitle">
      <tr bgcolor="#E7E7E7">
        <td height="24" colspan="3" bgcolor="#EDF9D5"> <strong>§重复文档列表：</strong></td>
      </tr>
      <form name="form2" method="post" action="article_test_same.php">
      	<input type='hidden' name='deltype' value='<?php echo $deltype?>'>
      	<input type='hidden' name='dopost' value='delsel'>
      	<input type='hidden' name='pagesize' value='<?php echo $pagesize?>'>
      	<input type='hidden' name='channelid' value='<?php echo $channelid?>'>
      	<input type='hidden' name='maintable' value='<?php echo $maintable?>'>
      	<input type='hidden' name='titles' value=''>
        <tr bgcolor="#F8FBFB" height="22">
          <td width="9%" align="center">选择</td>
          <td width="10%" align="center">重复数量</td>
          <td width="81%">文档标题</td>
        </tr>
<?php
while($row = $dsql->GetArray())
{
	if($row['dd']==1 ) break;
?>
  <tr bgcolor="#FFFFFF"  onMouseMove="javascript:this.bgColor='#EFEFEF';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
    <td align="center">
     <input name="arcTitle" type="checkbox" id="arcTitle" value="<?php echo urlencode($row['title'])?>" class="np">    </td>
    <td align="center"><?php
    		$okdd = $row['dd'];
    		$allarc += $okdd-1;
    	  echo $okdd;
    	?></td>
    <td><?php echo $row['title']?></td>
  </tr>
<?php
}
?>
    <tr bgcolor="#E5F9FF">
        <td height="28" colspan="3" bgcolor="#EDF9D5">
          &nbsp;
          <input type='button' name='bt1' value='全选' onclick='selAll()'>
          &nbsp;
          <input type='button' name='bt2' value='反选' onclick='noSelAll()'>
          &nbsp;
          <input type='button' name='bt3' value='删除' onclick='delArc()'>
          &nbsp;
          (共有 <?php echo $allarc?> 篇重复标题的文档！)        </td>
      </tr>
      </form>
    </table>
  </td>
</tr>
</body>
</html>