exit; } if (isset($_GET["delete-js"])) { rule_delete_js(); exit; } if (isset($_GET["list"])) { rules_list(); exit; } if (isset($_GET["rule-popup"])) { rule_popup(); exit; } if (isset($_POST["rule"])) { rule_save(); exit; } if (isset($_POST["delete"])) { rule_delete(); exit; } if (isset($_POST["clean-cache"])) { clean_cache(); exit; } table(); function rule_delete_js() { header("content-type: application/x-javascript"); $md5 = $_GET["delete-js"];
$users=new usersMenus(); if(!$users->AsSystemAdministrator){ $tpl=new templates(); $error=$tpl->javascript_parse_text("{ERROR_NO_PRIVS}"); echo "alert('$error')"; die(); } if(isset($_GET["iptables"])){iptables_tabs();exit;} if(isset($_GET["iptables-table"])){iptables_table();exit;} if(isset($_GET["rules"])){rules();exit;} if(isset($_GET["ruleid"])){rule_js();exit;} if(isset($_GET["rule-tabs"])){rule_tab();exit;} if(isset($_GET["rule-popup"])){rule_popup();exit;} if(isset($_POST["isFW"])){isFW_save();exit;} if(isset($_POST["rule-save"])){rule_save();exit;} if(isset($_GET["groupname"])){groupname();exit;} if(isset($_POST["rule-order"])){rule_order();exit;} if(isset($_POST["rule-delete"])){rule_delete();exit;} if(isset($_POST["rule-enable"])){rule_enable();exit;} if(isset($_GET["rule-time"])){rule_time();exit;} if(isset($_POST["time-save"])){time_save();exit;} if(isset($_GET["generic"])){generic_tabs();exit;} if(isset($_POST["EnableArticaAsGateway"])){EnableArticaAsGateway_save();exit;} tabs(); function tabs(){ if(GET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__)){return;} $page=CurrentPageName(); $net=new networking(); $interfaces=$net->Local_interfaces();
$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}"; $array["items"]="{items}"; $array["schedule"]="{schedule}"; while (list ($num, $ligne) = each ($array) ){ if($num=="schedule"){ $html[]= $tpl->_ENGINE_parse_body("<li><a href=\"squid.databases.schedules.php?TaskType=55\" style='font-size:16px'><span>$ligne</span></a></li>\n");
$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["popup"])){popup();exit;} if(isset($_GET["list"])){items();exit;} if(isset($_GET["ruleid-js"])){rule_js();exit;} if(isset($_GET["ruleid"])){rule();exit;} if(isset($_POST["ID"])){rule_save();exit;} if(isset($_GET["switch-js"])){switch_js();exit;} if(isset($_POST["switch"])){switch_save();exit;} if(isset($_GET["delete-js"])){delete_js();exit;} if(isset($_POST["delete"])){delete();exit;} popup(); function rule_js(){ header("content-type: application/x-javascript"); $page=CurrentPageName(); $tpl=new templates(); $ID=$_GET["ruleid-js"]; if($ID==0){$title="{new_rule}";}else{$title="{rule}:: $ID";} $title=$tpl->_ENGINE_parse_body($title); $pattern=urlencode($_GET["pattern"]); echo "YahooWin('700','$page?ruleid=$ID&t={$_GET["t"]}&pattern=$pattern','$title')";
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 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();