include_once('ressources/class.ini.inc'); include_once('ressources/class.squid.inc'); include_once('ressources/class.tcpip.inc'); include_once('ressources/class.mysql.squid.builder.php'); $user=new usersMenus(); if($user->AsSquidAdministrator==false){ $tpl=new templates(); echo "<p class=text-error>". $tpl->javascript_parse_text("{ERROR_NO_PRIVS}")."</p>"; die();exit(); } if(isset($_GET["details-tablerows"])){details_tablerows();exit;} if(isset($_POST["nameserver"])){dns_add();exit;} if(isset($_POST["DnsDelete"])){dns_del();exit;} if(isset($_POST["SquidDNSUpDown"])){SquidDNSUpDown();exit;} table(); function dns_add(){ $_POST["nameserver"]=trim($_POST["nameserver"]); $IPClass=new IP(); if(!$IPClass->isValid($_POST["nameserver"])){ echo "{$_POST["nameserver"]} invalid\n"; return; } $nameserver[$_POST["nameserver"]]=true; $q=new mysql_squid_builder(); $q->QUERY_SQL("INSERT INTO dns_servers (dnsserver,zOrder) VALUES ('{$_POST["nameserver"]}','1')");
exit; } if (isset($_GET["ntlm_auth"])) { ldap_ntlm_auth_save(); exit; } if (isset($_GET["EnableSquidExternalLDAP"])) { ldap_external_auth_save(); exit; } if (isset($_GET["nameserver"])) { dns_add(); exit; } if (isset($_GET["DnsDelete"])) { dns_del(); exit; } if (isset($_GET["enable_plugins"])) { plugins_save(); exit; } if (isset($_GET["website_block"])) { url_regex_save(); exit; } if (isset($_GET["website_block_delete"])) { url_regex_del(); exit; } if (isset($_GET["force-upgrade-squid"])) {
if(isset($_GET["add-ip-single"])){network_add_single();exit;} if(isset($_GET["SquidnetMaskCheckIP"])){network_calculate_cdir();exit;} if(isset($_GET["NetDelete"])){network_delete();exit;} if(isset($_GET["listenport"])){listen_port_save();exit;} if(isset($_GET["visible_hostname_save"])){visible_hostname_save();exit;} if(isset($_GET["ldap_auth"])){ldap_auth_save();exit;} if(isset($_GET["ntlm_auth"])){ldap_ntlm_auth_save();exit;} if(isset($_POST["EnableSquidExternalLDAP"])){ldap_external_auth_save();exit;} if(isset($_GET["nameserver"])){dns_add();exit();} if(isset($_GET["DnsDelete"])){dns_del();exit();} if(isset($_GET["standard_dns"])){dns_popup_index();exit;} if(isset($_GET["dns_cache"])){dns_popup_cache();exit;} if(isset($_GET["enable_plugins"])){plugins_save();exit;} if(isset($_GET["website_block"])){url_regex_save();exit;} if(isset($_GET["website_block_delete"])){url_regex_del();exit;} if(isset($_GET["force-upgrade-squid"])){force_upgrade_squid();exit;} if(isset($_POST["DenyWebSiteImportPerform"])){url_regex_popup_import_receive();exit;}