save(); } if(isset($_POST['request'])) { if($_POST['request'] == 'update') { if(isset($_POST['cgi_config']['physical_html_path'])) $cgiConfig->setPhysicalHtmlPath($_POST['cgi_config']['physical_html_path']); if(isset($_POST['cgi_config']['url_html_path'])) $cgiConfig->setUrlHtmlPath($_POST['cgi_config']['url_html_path']); if(isset($_POST['cgi_config']['use_authentication'])) $cgiConfig->setUseAuthentication($_POST['cgi_config']['use_authentication']); if(isset($_POST['cgi_config']['default_user_name'])) $cgiConfig->setDefaultUserName($_POST['cgi_config']['default_user_name']); if(isset($_POST['cgi_config']['authorized_for_system_information'])) $cgiConfig->setAuthorizedForSystemInformation($_POST['cgi_config']['authorized_for_system_information']); if(isset($_POST['cgi_config']['authorized_for_system_commands'])) $cgiConfig->setAuthorizedForSystemCommands($_POST['cgi_config']['authorized_for_system_commands']); if(isset($_POST['cgi_config']['authorized_for_configuration_information'])) $cgiConfig->setAuthorizedForConfigurationInformation($_POST['cgi_config']['authorized_for_configuration_information']); if(isset($_POST['cgi_config']['authorized_for_all_hosts'])) $cgiConfig->setAuthorizedForAllHosts($_POST['cgi_config']['authorized_for_all_hosts']); if(isset($_POST['cgi_config']['authorized_for_all_host_commands'])) $cgiConfig->setAuthorizedForAllHostCommands($_POST['cgi_config']['authorized_for_all_host_commands']); if(isset($_POST['cgi_config']['authorized_for_all_services'])) $cgiConfig->setAuthorizedForAllServices($_POST['cgi_config']['authorized_for_all_services']); if(isset($_POST['cgi_config']['authorized_for_all_service_commands'])) $cgiConfig->setAuthorizedForAllServiceCommands($_POST['cgi_config']['authorized_for_all_service_commands']); if(isset($_POST['cgi_config']['statusmap_background_image'])) $cgiConfig->setStatusmapBackgroundImage($_POST['cgi_config']['statusmap_background_image']); if(isset($_POST['cgi_config']['default_statusmap_layout'])) $cgiConfig->setDefaultStatusmapLayout($_POST['cgi_config']['default_statusmap_layout']); if(isset($_POST['cgi_config']['statuswrl_include'])) $cgiConfig->setStatuswrlInclude($_POST['cgi_config']['statuswrl_include']); if(isset($_POST['cgi_config']['default_statuswrl_layout'])) $cgiConfig->setDefaultStatuswrlLayout($_POST['cgi_config']['default_statuswrl_layout']); if(isset($_POST['cgi_config']['refresh_rate'])) $cgiConfig->setRefreshRate($_POST['cgi_config']['refresh_rate']); if(isset($_POST['cgi_config']['host_unreachable_sound'])) $cgiConfig->setHostUnreachableSound($_POST['cgi_config']['host_unreachable_sound']); if(isset($_POST['cgi_config']['host_down_sound'])) $cgiConfig->setHostDownSound($_POST['cgi_config']['host_down_sound']); if(isset($_POST['cgi_config']['service_critical_sound'])) $cgiConfig->setServiceCriticalSound($_POST['cgi_config']['service_critical_sound']); if(isset($_POST['cgi_config']['service_warning_sound'])) $cgiConfig->setServiceWarningSound($_POST['cgi_config']['service_warning_sound']); if(isset($_POST['cgi_config']['service_unknown_sound'])) $cgiConfig->setServiceUnknownSound($_POST['cgi_config']['service_unknown_sound']); if(isset($_POST['cgi_config']['ping_syntax'])) $cgiConfig->setPingSyntax($_POST['cgi_config']['ping_syntax']); if(isset($_POST['cgi_config']['lock_author_names'])) $cgiConfig->setLockAuthorNames($_POST['cgi_config']['lock_author_names']); if(isset($_POST['cgi_config']['escape_html_tags'])) $cgiConfig->setEscapeHtmlTags($_POST['cgi_config']['escape_html_tags']); if(isset($_POST['cgi_config']['notes_url_target'])) $cgiConfig->setNotesUrlTarget($_POST['cgi_config']['notes_url_target']); if(isset($_POST['cgi_config']['action_url_target'])) $cgiConfig->setActionUrlTarget($_POST['cgi_config']['action_url_target']); if(isset($_POST['cgi_config']['enable_splunk_integration'])) $cgiConfig->setEnableSplunkIntegration($_POST['cgi_config']['enable_splunk_integration']); if(isset($_POST['cgi_config']['splunk_url'])) $cgiConfig->setSplunkUrl($_POST['cgi_config']['splunk_url']); $cgiConfig->save(); $success = "Updated CGI Configuration."; } } // Let's make the status map layout select list $statusmap_layout_list[] = array("values" => "0", "text" => "User-Defined Coordinates"); $statusmap_layout_list[] = array("values" => "1", "text" => "Depth Layers"); $statusmap_layout_list[] = array("values" => "2", "text" => "Collapsed Tree"); $statusmap_layout_list[] = array("values" => "3", "text" => "Balanced Tree"); $statusmap_layout_list[] = array("values" => "4", "text" => "Circular"); $statusmap_layout_list[] = array("values" => "5", "text" => "Circular (Marked Up)"); $statusmap_layout_list[] = array("values" => "6", "text" => "Circular (Marked Down)"); // Let's make the status wrl layout select list $statuswrl_layout_list[] = array("values" => "0", "text" => "User-Defined Coordinates"); $statuswrl_layout_list[] = array("values" => "1", "text" => "Depth Layers"); $statuswrl_layout_list[] = array("values" => "2", "text" => "Collapsed Tree"); $statuswrl_layout_list[] = array("values" => "3", "text" => "Balanced Tree"); $statuswrl_layout_list[] = array("values" => "4", "text" => "Circular"); if(!isset($_GET['section'])) $_GET['section'] = 'paths'; // Build subnavigation $subnav = array( 'paths' => 'Paths', 'authentication' => 'Authentication', 'status' => 'Status', 'sounds' => 'Sounds', 'other' => 'Other' ); print_header("CGI Configuration File Editor"); print_window_header("Web Interface Configuration", "100%", "center"); print_subnav($subnav, $_GET['section'], "section"); if($_GET['section'] == 'paths') { ?>