示例#1
0
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();
	}
	
	
}