$val) { if (isset($val)) { LOG_INFO($db_link, "Remove rule id: $val ".dump_record($db_link,'auth_rules','id=?', [$val])); delete_record($db_link, "auth_rules", "id=?", [ $val ]); } } header("Location: " . $_SERVER["REQUEST_URI"]); exit; } if (isset($_POST['s_save'])) { $len = is_array($_POST['s_id']) ? count($_POST['s_id']) : 0; for ($i = 0; $i < $len; $i ++) { $save_id = intval($_POST['s_id'][$i]); $len_all = is_array($_POST['n_id']) ? count($_POST['n_id']) : 0; for ($j = 0; $j < $len_all; $j ++) { if (intval($_POST['n_id'][$j]) != $save_id) { continue; } $new['type'] = $_POST['s_type'][$j]; $new['rule'] = trim($_POST['s_rule'][$j]); $new['description'] = trim($_POST['s_description'][$j]); update_record($db_link, "auth_rules", "id=?", $new, [ $save_id ]); } } header("Location: " . $_SERVER["REQUEST_URI"]); exit; } if (isset($_POST["s_create"])) { $new_rule = $_POST["s_new_rule"]; if (!empty($new_rule)) { $new['type'] = $_POST["s_new_type"]; $new['rule'] = $new_rule; $new['ou_id'] = $id; LOG_INFO($db_link, "Create new rule $new_rule for ou_id: $id"); insert_record($db_link, "auth_rules", $new); } header("Location: " . $_SERVER["REQUEST_URI"]); exit; } require_once ($_SERVER['DOCUMENT_ROOT']."/inc/header.php"); fix_auth_rules($db_link); ?>
> \n"; print "\n"; if ($ou_info['default_users']) { $cl = "up"; } else { $cl="data"; } print "\n"; if ($ou_info['default_hotspot']) { $cl = "up"; } else { $cl="data"; } print "\n"; print "\n"; ?> \n"; print "\n"; print "\n"; print "\n"; print "\n"; ?> \n"; ?> \n"; ?>
Default Hotspot
"; print_qa_select("f_default",$ou_info['default_users']); print ""; print_qa_select("f_default_hotspot",$ou_info['default_hotspot']); print ""; print_qa_select("f_dynamic",$ou_info['dynamic']); print "
Nagios directory Host template Ping Host service
"; print_qa_select("f_nagios_ping",$ou_info['nagios_ping']); print "


: hotspot => subnet => mac => hostname => default user

"; ?> \n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; } ?>
id
{$row['id']}"; print_qa_rule_select("s_type[]","{$row['type']}"); print "
"; ?>