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_delete_rule() { $hostname = $_GET["hostname"]; $squid = new squid($hostname); $squid->DeleteAclRule($_GET["rule_acl_delete"]); }