exit;
}
if (isset($_POST["delete"])) {
    delete();
    exit;
}
if (isset($_GET["rule-js"])) {
    rule_js();
    exit;
}
if (isset($_GET["rule-tab"])) {
    rule_tabs();
    exit;
}
if (isset($_GET["rule-parameters"])) {
    rule_parameters();
    exit;
}
if (isset($_GET["rule-filestypes"])) {
    rule_files_types();
    exit;
}
if (isset($_POST["MIME-ID"])) {
    rule_files_types_save();
    exit;
}
table();
function rule_js()
{
    header("content-type: application/x-javascript");
    $page = CurrentPageName();
include_once(dirname(__FILE__) . '/ressources/class.squid.inc');


$user=new usersMenus();
if($user->AsSquidAdministrator==false){
	$tpl=new templates();
	echo FATAL_ERROR_SHOW_128("{ERROR_NO_PRIVS}");
	die();
}

if(isset($_GET["liste-rules"])){list_rules();exit;}
if(isset($_POST["new-rule"])){new_rule();exit;}
if(isset($_POST["MaxSizeBytes"])){rule_save();exit;}
if(isset($_GET["rule-js"])){rule_js();exit;}
if(isset($_GET["rule-tab"])){rule_tabs();exit;}
if(isset($_GET["rule-parameters"])){rule_parameters();exit;}
if(isset($_GET["rule-filestypes"])){rule_files_types();exit;}
if(isset($_POST["MIME-ID"])){rule_files_types_save();exit;}
if(isset($_GET["rule-delete-js"])){rule_delete_js();exit;}
if(isset($_POST["delete-rule"])){delete_rule();exit;}
if(isset($_POST["default-rules"])){create_default_rules();exit;}
table();

function rule_js(){
	header("content-type: application/x-javascript");
	$page=CurrentPageName();
	$ID=$_GET["ID"];
	$tpl=new templates();
	$q=new mysql_squid_builder();
	$ligne=mysql_fetch_array($q->QUERY_SQL("SELECT rulename FROM artica_caches WHERE ID='$ID'","artica_backup"));
	$html="YahooWin3('890','$page?rule-tab=yes&ID=$ID','{$ligne["rulename"]}')";