模板介绍
织梦后台重复文档检测结果显示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()' /> <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,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();
}
完成
本站提供的一切软件、教程和内容信息仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。本站信息来自网络收集整理,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑或手机中彻底删除上述内容。如果您喜欢该程序和内容,请支持正版,购买注册,得到更好的正版服务。我们非常重视版权问题,如有侵权请邮件与我们联系处理。敬请谅解!侵删请致信E-mail:2934755286@qq.com