dede增加批量删除采集内容的方法


关键字描述:内容 方法 采集 删除 增加 批量 "   < 清空

dedecms增加批量删除采集内容
原来dede官方给出的没有批量删除采集内容
如果要删除的30个一次的话
少不怎么样,多的就很麻烦,
总不能没次都进数据库去删吧
特别有写友友是带有数据库恐惧症的
因此在这里修改一下官方的DEDE

增加
Quote:
清空所有采集内容
清空未下载内容
清空已导出内容

这三个

修改方法

1,dede/co_do.php
找到
Quote:
//复制节点


改成
Quote:
else if($dopost=="clearall")
{
$dsql = new DedeSql(false);
$dsql->ExecuteNoneQuery("Delete From xkzzz_courl");
$dsql->Close();
ShowMsg("成功清空所有采集内容!","co_main.php");
exit();
}else if($dopost=="clearundown")
{
$dsql = new DedeSql(false);
$dsql->ExecuteNoneQuery("Delete From xkzzz_courl where isdown=0");
$dsql->Close();
ShowMsg("成功删除所有未下载内容!","co_main.php");
exit();
}else if($dopost=="clearisex")
{
$dsql = new DedeSql(false);
$dsql->ExecuteNoneQuery("Delete From xkzzz_courl where isex=1");
$dsql->Close();
ShowMsg("成功删除所有已经导出内容!","co_main.php");
exit();
}
//复制节点


2,dede/templets/co_url.htm
找到
Quote:
</script>
<style type="text/css">


改成
Quote:
function DelAll()
{
location.href = "co_do.php?dopost=clearall";
}
function DelunDown()
{
location.href = "co_do.php?dopost=clearundown";
}

function Delisex()
{
location.href = "co_do.php?dopost=clearisex";
}

</script>
<style type="text/css">


找到
Quote:
<input type="button" name="b5" value="删除所选网址" class="inputbut" onClick="DelSel();">

在下面加入

Quote:
<input type="button" name="b5" value="清空所有采集内容" class="inputbut" onClick="DelAll();">
<input type="button" name="b5" value="清空未下载内容" class="inputbut" onClick="DelunDown();">


« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3