<?php
if(!defined('MOD'))  die("access die");
$rules = intval($_GET['rules']);
$link = $_POST['link'];
$data = $_GET['data'];
$del = $_GET['del'];
$ductid = $_GET['ductid'];
$classid = $_GET['classid'];

if ( "class" == $del ){
	$sql1 = "DELETE FROM ".TABLEPRE."collect_class WHERE `cid` ='$classid'";
	qdb::Query( $sql1 );
	$turn_text = '删除分类成功！！';
	$turn_url = "system.php?sys=collect&work=class_show&channelid=$channelid";
	qbase::showmsg( "$turn_text", "default", "$turn_url" );
}elseif ( "duct" == $del ){
	$sql1 = "DELETE FROM ".TABLEPRE."collect_export WHERE `id` ='$ductid'";
	qdb::Query( $sql1 );
	$turn_text = '删除导出规则成功！！';
	$turn_url = "system.php?sys=collect&work=duct_show&channelid=$channelid";
	qbase::showmsg( "$turn_text", "default", "$turn_url" );
}elseif ( "all" == $del ){
	$sql1 = "DELETE FROM ".TABLEPRE."collect_rule WHERE `id` ='$rules'";
	qdb::Query( $sql1 );
	$sql2 = "DELETE FROM ".TABLEPRE."collect_links WHERE `rules` ='$rules'";
	qdb::Query( $sql2 );
	$turn_text = '删除成功！！';
	$turn_url = "system.php?sys=collect&work=rules_show&channelid=$channelid";
	qbase::showmsg( "$turn_text", "default", "$turn_url" );	 	
}elseif ( "" != $link or "" != $data ){

	$sql = "DELETE FROM ".TABLEPRE."collect_links WHERE `rules` ='$rules'";
	qdb::Query( $sql );
	$turn_text = '清空成功！！';
	$turn_url = "system.php?sys=collect&work=rules_show&channelid=$channelid";
	qbase::showmsg( "$turn_text", "default", "$turn_url" );
}


qbase::purviewCheckDIe("error request");
?>
