<?php
if(!defined('MOD'))  die("access die");
$rules  = intval( $_GET['rules']);
$sql    = "select id from ".TABLEPRE."collect_links where rules='$rules' order by id desc";
$result = qdb::Query( $sql);
while( $ls = qdb::fetchArray( $result)){
	$list[] = $ls['id'];	
}
if( is_array( $list)){
	$data = array( 'status'=>200, 'data'=>$list);
}else{
	$data = array( 'status'=>404);
}
ob_clean();
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
echo qbase::xmlPrint(qbase::jsonencode( $data));
?>