if (!$usersmenus->AsDansGuardianAdministrator) {
    $tpl = new templates();
    $alert = $tpl->_ENGINE_parse_body('{ERROR_NO_PRIVS}');
    echo "<H2>{$alert}</H2>";
    die;
}
if (isset($_GET["items-list"])) {
    items_list();
    exit;
}
if (isset($_POST["acl-rule-link-enable"])) {
    items_enable();
    exit;
}
if (isset($_POST["acl-rule-link-delete"])) {
    items_unlink();
    exit;
}
if (isset($_POST["acl-rule-link-negation"])) {
    items_negation();
    exit;
}
if (isset($_POST["acl-rule-link-order"])) {
    items_link_order();
    exit;
}
items_js();
function items_js()
{
    $ID = $_GET["ID"];
    $page = CurrentPageName();
	include_once('ressources/class.dansguardian.inc');
	include_once('ressources/class.squid.inc');
	

	
$usersmenus=new usersMenus();
if(!$usersmenus->AsDansGuardianAdministrator){
	$tpl=new templates();
	$alert=$tpl->_ENGINE_parse_body('{ERROR_NO_PRIVS}');
	echo "<H2>$alert</H2>";
	die();	
}

if(isset($_GET["items-list"])){items_list();exit;}
if(isset($_POST["acl-rule-link"])){items_link();exit;}
if(isset($_POST["acl-rule-link-delete"])){items_unlink();exit;}
if(isset($_POST["acl-rule-link-negation"])){items_negation();exit;}
if(isset($_POST["acl-rule-link-order"])){items_link_order();exit;}

items_js();

function item_delete(){
	$page=CurrentPageName();
	$tpl=new templates();	
	$ID=$_POST["ID"];
	$q=new mysql_squid_builder();
	$q->QUERY_SQL("DELETE FROM webfilters_sqitems WHERE ID='$ID'");	
	if(!$q->ok){echo $q->mysql_error;return;}
	$sock=new sockets();
	$sock->getFrameWork("squid.php?build-smooth=yes");	
}