$val) { if ($val) { run_sql($db_link, 'DELETE FROM connections WHERE auth_id='.$val); run_sql($db_link, 'DELETE FROM User_auth_alias WHERE auth_id='.$val); $auth["deleted"] = 1; $changes = get_diff_rec($db_link,"User_auth","id='$val'", '', 0); if (!empty($changes)) { LOG_WARNING($db_link,"Удалён адрес доступа: \r\n $changes"); } update_record($db_link, "User_auth", "id=" . $val, $auth); } } header("Location: " . $_SERVER["REQUEST_URI"]); exit; } if (isset($_POST["ApplyForAll"])) { $auth_id = $_POST["fid"]; $a_enabled = $_POST["a_enabled"] * 1; $a_dhcp = $_POST["a_dhcp"] * 1; $a_dhcp_acl = $_POST["a_dhcp_acl"]; $a_queue = $_POST["a_queue_id"] * 1; $a_group = $_POST["a_group_id"] * 1; $a_traf = $_POST["a_traf"] * 1; $msg="Массовое изменение пользователей!"; foreach ($auth_id as $key => $val) { if ($val) { unset($auth); $auth['enabled'] = $a_enabled; $auth['filter_group_id'] = $a_group; $auth['queue_id'] = $a_queue; $auth['dhcp'] = $a_dhcp; $auth['dhcp_acl'] = $a_dhcp_acl; $auth['save_traf'] = $a_traf; update_record($db_link, "User_auth", "id='" . $val . "'", $auth); } } LOG_WARNING($db_link,$msg); header("Location: " . $_SERVER["REQUEST_URI"]); exit; } if ($rou == 0) { $ou_filter = ''; } else { $ou_filter = " and User_list.ou_id=$rou "; } if ($rsubnet == 0) { $subnet_filter = ''; } else { $subnet_range = get_subnet_range($db_link,$rsubnet); if (!empty($subnet_range)) { $subnet_filter = " and User_auth.ip_int>=".$subnet_range['start']." and User_auth.ip_int<=".$subnet_range['stop']; } } $enabled_filter=''; if ($enabled>0) { if ($enabled===2) { $enabled_filter = ' and User_auth.enabled=1'; } if ($enabled===1) { $enabled_filter = ' and User_auth.enabled=0'; } } if (isset($_POST['ip'])) { $f_ip = $_POST['ip']; } if (!isset($f_ip) and isset($_SESSION[$page_url]['ip'])) { $f_ip=$_SESSION[$page_url]['ip']; } if (!isset($f_ip)) { $f_ip=''; } $_SESSION[$page_url]['ip']=$f_ip; $ip_where = ''; if (!empty($f_ip)) { if (checkValidIp($f_ip)) { $ip_where = " and ip_int=inet_aton('" . $f_ip . "') "; } if (checkValidMac($f_ip)) { $ip_where = " and mac='" . mac_dotted($f_ip) . "' "; } $ip_list_filter = $ip_where; } else { $ip_list_filter = $ou_filter.$subnet_filter.$enabled_filter; } print_ip_submenu($page_url); ?>