VIP福利
主页 > 建站问题 > 织梦技巧 > 织梦后台重复文档检测结果显示id导出文档url链接

织梦后台重复文档检测结果显示id导出文档url链接

织梦后台 重复文档检测结果显示id和url,方便记录查看和删除后提交到百度删除死链 实现教程 1、打开 /dede/templets/article_result_same.htm 找到,大概在114行 ?php echo $row[ title ]; ? 在它下面加入 ( ?php echo $row[ id ]; ? ) ( ?php $arcrow=GetOneArchive($row[ id ]); echo $arcrow[ arcurl ]; ? ) input name = arcIds t […]



织梦后台重复文档检测结果显示id和url,方便记录查看和删除后提交到百度删除死链

实现教程

1、打开 /dede/templets/article_result_same.htm 找到,大概在114行

<?php echo $row['title']; ?>

在它下面加入

( <?php echo $row['id']; ?> ) ( <?php $arcrow=GetOneArchive($row['id']);echo $arcrow['arcurl']; ?> ) <input name="arcIds" type="checkbox" id="arcId" value="<?php echo $row['id'];?>" style="display:none;" checked />

继续找到129行左右的

(共有 <?php echo $allarc; ?> 篇重复标题的文档!)

在它上面加入

<input type='button' name='bt4' value='导出全部链接' onclick='expArc()' />&nbsp;
<script>
function expArc(){
	var qstr="";
	if(document.form2.arcId.value) return document.form2.arcId.value;
	for(i=0;i<document.form2.arcId.length;i++)
	{
		if(document.form2.arcId[i].checked)
		{
			if(qstr=="")
				qstr=document.form2.arcId[i].value;
			else
				qstr=qstr+"`"+document.form2.arcId[i].value;
		}
	}
	document.form2.titles.value = qstr;
	document.form2.dopost.value = 'export';
	document.form2.submit();
}
</script>

如图

2、打开 /dede/article_test_same.php 找到

COUNT(title) AS dd,title

改成

COUNT(title) AS dd,title,id

如图

继续找到大概在30行

//删除选中的内容(只保留一条)

在它上面加入

else if($dopost=='export')
{
	if(empty($titles))
    {
        header("Content-Type: text/html; charset={$cfg_ver_lang}");
		echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset={$cfg_ver_lang}\">\r\n";
        echo "没有指定导出的文档!";
        exit();
    }
	if(isset($cfg_basehost) && $cfg_basehost != '/')
	{
		$domain = $cfg_basehost;
	}
	else
	{
		if(isset($_SERVER['HTTPS']) && ('1' == $_SERVER['HTTPS'] || 'on' == strtolower($_SERVER['HTTPS']))){
			$SERVER_PORT = 'https://';
		}elseif(isset($_SERVER['SERVER_PORT']) && ('443' == $_SERVER['SERVER_PORT'] )) {
			$SERVER_PORT = 'https://';
		}else{
			$SERVER_PORT = 'http://';
		}
		$domain = $SERVER_PORT . $_SERVER['HTTP_HOST'];
	}
	$content = "";
	$ids = split('`',$titles);
	foreach($ids as $id)
    {
        $arcrow = GetOneArchive($id);
		$content .= $domain . str_replace($domain, '', $arcrow['arcurl']) . "\r\n";
    }
	Header("Content-type:application/octet-stream");
	Header("Accept-Ranges:bytes");
	header("Content-Disposition:attachment;filename=badlink.txt");
	header("Expires:0");
	header("Cache-Control:must-revalidate,post-check=0,pre-check=0 ");
	header("Pragma:public");
	echo $content;
	exit();
}

完成


说点什么吧
  • 全部评论(0
    还没有评论,快来抢沙发吧!