/dev/null 2>/dev/null &"); LOG_VERBOSE($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); $result = shell_exec("/usr/bin/sudo ".escapeshellcmd($run_cmd)." >/dev/null 2>/dev/null &"); LOG_VERBOSE($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); $result = shell_exec("/usr/bin/sudo ".escapeshellcmd($run_cmd)." >/dev/null 2>/dev/null &"); LOG_VERBOSE($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); $result = shell_exec("/usr/bin/sudo ".escapeshellcmd($run_cmd)." >/dev/null 2>/dev/null &"); LOG_VERBOSE($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); $result = shell_exec("/usr/bin/sudo ".escapeshellcmd($run_cmd)." >/dev/null 2>/dev/null &"); LOG_VERBOSE($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); $result = shell_exec("/usr/bin/sudo ".escapeshellcmd($run_cmd)." force >/dev/null 2>/dev/null &"); LOG_VERBOSE($db_link, "Run command: $run_cmd force"); header("Location: " . $_SERVER["REQUEST_URI"]); exit; } if (!empty($_POST["save_traf_all"]) and $_POST["save_traf_all"]) { run_sql($db_link, 'Update user_auth SET save_traf=1'); LOG_INFO($db_link, "Enable save traffic for all!"); header("Location: " . $_SERVER["REQUEST_URI"]); exit; } if (!empty($_POST["not_save_traf_all"]) and $_POST["not_save_traf_all"]) { run_sql($db_link, 'Update user_auth SET save_traf=0'); LOG_INFO($db_link, "Disable save traffic for all!"); header("Location: " . $_SERVER["REQUEST_URI"]); exit; } if (isset($_POST["clean_cache"])) { LOG_VERBOSE($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); ?>