include_once dirname(__FILE__) . "/ressources/class.pdns.inc";
include_once dirname(__FILE__) . '/ressources/class.system.network.inc';
include_once dirname(__FILE__) . '/ressources/class.squid.inc';
$user = new usersMenus();
if ($user->AsSquidAdministrator == false) {
    $tpl = new templates();
    echo "alert('" . $tpl->javascript_parse_text("{ERROR_NO_PRIVS}") . "');";
    die;
    exit;
}
if (isset($_GET["parameters"])) {
    parameters();
    exit;
}
if (isset($_GET["items"])) {
    items_table();
    exit;
}
if (isset($_GET["items-search"])) {
    items_search();
    exit;
}
if (isset($_POST["ENABLE"])) {
    SaveParams();
    exit;
}
if (isset($_POST["main-rule-enable"])) {
    rule_enable();
    exit;
}
if (isset($_POST["main-rule-delete"])) {
	include_once(dirname(__FILE__) . '/ressources/class.main_cf.inc');
	include_once(dirname(__FILE__) . '/ressources/class.ldap.inc');
	include_once(dirname(__FILE__) . "/ressources/class.sockets.inc");
	include_once(dirname(__FILE__) . "/ressources/class.pdns.inc");
	include_once(dirname(__FILE__) . '/ressources/class.system.network.inc');
	include_once(dirname(__FILE__) . '/ressources/class.squid.inc');
	
	
	$user=new usersMenus();
	if($user->AsSquidAdministrator==false){
		$tpl=new templates();
		echo "alert('". $tpl->javascript_parse_text("{ERROR_NO_PRIVS}")."');";
		die();exit();
	}
	if(isset($_GET["parameters"])){parameters();exit;}
	if(isset($_GET["items"])){items_table();exit;}
	if(isset($_GET["items-search"])){items_search();exit;}
	if(isset($_POST["ENABLE"])){SaveParams();exit;}
	if(isset($_POST["main-rule-enable"])){rule_enable();exit;}
	if(isset($_POST["main-rule-delete"])){rule_delete();exit;}
	if(isset($_GET["main-rule-js"])){rule_js();exit;}
	if(isset($_GET["main-rule"])){rule_popup();exit;}
	if(isset($_POST["edit-www"])){rule_save();exit;}
	if(isset($_POST["apply-now"])){apply();exit;}
tabs();

function tabs(){
	$tpl=new templates();
	$page=CurrentPageName();
	
		$array["parameters"]="{parameters}";