function main_network_ldapenable(){ $users=new usersMenus(); if($_GET["hostname"]==null){$hostname=$users->hostname;}else{$hostname=$_GET["hostname"];} $squid=new squid($hostname); if($_GET["auth_allow"]=="yes"){ $squid->AddAclType('group_password','external','ldap_group'); $squid->AddAccessRule("http_access","allow","group_password"); $squid->SimpleModeReorgRules(); $squid->SaveToLdap(); }else{ $squid->DeleteAclRule('password'); $squid->SimpleModeReorgRules(); $squid->SaveToLdap(); } }
function main_acls_add_rule_save() { $aclname = $_GET["acl_name"]; $acl_value = $_GET["acl_value"]; $hostname = $_GET["hostname"]; $acl_type = $_GET["acl_type"]; $squid = new squid($hostname); $squid->AddAclType($aclname, $acl_type, $acl_value); }