/dev/null 2>/dev/null &"); LOG_INFO($db_link, "Run command: $run_cmd"); header("Location: " . $_SERVER["REQUEST_URI"]); exit; } if (isset($_POST["refresh_dhcp"]) and is_option($db_link, 38)) { $run_cmd = get_option($db_link, 38); shell_exec("sudo $run_cmd >/dev/null 2>/dev/null &"); LOG_INFO($db_link, "Run command: $run_cmd"); header("Location: " . $_SERVER["REQUEST_URI"]); exit; } if (isset($_POST["refresh_nagios"]) and is_option($db_link, 40)) { $run_cmd = get_option($db_link, 40); shell_exec("sudo $run_cmd >/dev/null 2>/dev/null &"); LOG_INFO($db_link, "Run command: $run_cmd"); header("Location: " . $_SERVER["REQUEST_URI"]); exit; } if (isset($_POST["up_nagios"])) { run_sql($db_link,"UPDATE User_auth SET nagios_status='UP'"); run_sql($db_link,"UPDATE devices SET nagios_status='UP'"); header("Location: " . $_SERVER["REQUEST_URI"]); exit; } if (isset($_POST["refresh_dns"]) and is_option($db_link, 39)) { $run_cmd = get_option($db_link, 39); shell_exec("sudo $run_cmd >/dev/null 2>/dev/null &"); LOG_INFO($db_link, "Run command: $run_cmd"); header("Location: " . $_SERVER["REQUEST_URI"]); exit; } if (isset($_POST["discovery"]) and is_option($db_link, 41)) { $run_cmd = get_option($db_link, 41); shell_exec("sudo $run_cmd >/dev/null 2>/dev/null &"); LOG_DEBUG($db_link, "Run command: $run_cmd"); header("Location: " . $_SERVER["REQUEST_URI"]); exit; } if (isset($_POST["discovery2"]) and is_option($db_link, 41)) { $run_cmd = get_option($db_link, 41); shell_exec("sudo $run_cmd 1 >/dev/null 2>/dev/null &"); LOG_INFO($db_link, "Run command: $run_cmd 1"); header("Location: " . $_SERVER["REQUEST_URI"]); exit; } if (isset($_POST["save_traf_all"]) and get_option($db_link, 23)) { run_sql($db_link, 'Update User_auth set save_traf=1 where deleted=0'); LOG_INFO($db_link, "Enable save traffic for all!"); header("Location: " . $_SERVER["REQUEST_URI"]); exit; } if (isset($_POST["not_save_traf_all"]) and get_option($db_link, 23)) { run_sql($db_link, 'Update User_auth set save_traf=0 where deleted=0'); LOG_INFO($db_link, "Disable save traffic for all!"); header("Location: " . $_SERVER["REQUEST_URI"]); exit; } if (isset($_POST["s_remove"])) { $s_id = $_POST["s_id"]; foreach ($s_id as $key => $val) { if (isset($val)) { LOG_INFO($db_link, "Remove subnet id: $val"); delete_record($db_link, "subnets", "id=" . $val); } } header("Location: " . $_SERVER["REQUEST_URI"]); exit; } if (isset($_POST["clean_cache"])) { LOG_INFO($db_link, "Clean dns cache"); run_sql($db_link,"DELETE FROM dns_cache"); header("Location: " . $_SERVER["REQUEST_URI"]); exit; } unset($_POST); require_once ($_SERVER['DOCUMENT_ROOT']."/inc/header.php"); print_control_submenu($page_url); ?>