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') { ?>
Physical HTML Path:

element_desc("physical_html_path", "nagios_cgi_desc"); ?>
URL HTML Path:

element_desc("url_html_path", "nagios_cgi_desc"); ?>
Use Authentication: getUseAuthentication());?>
element_desc("use_authentication", "nagios_cgi_desc"); ?>
Default Username:
element_desc("default_user_name", "nagios_cgi_desc"); ?>
Authorized for System Information:
element_desc("authorized_for_system_information", "nagios_cgi_desc"); ?>
Authorized for System Commands:
element_desc("authorized_for_system_commands", "nagios_cgi_desc"); ?>
Authorized for Configuration Information:
element_desc("authorized_for_configuration_information", "nagios_cgi_desc"); ?>
Authorized for All Hosts:
element_desc("authorized_for_all_hosts", "nagios_cgi_desc"); ?>
Authorized for All Host Commands:
element_desc("authorized_for_all_host_commands", "nagios_cgi_desc"); ?>
Authorized for All Services:
element_desc("authorized_for_all_services", "nagios_cgi_desc"); ?>
Authorized for All Service Commands:
element_desc("authorized_for_all_service_commands", "nagios_cgi_desc"); ?>
Statusmap Background Image:
element_desc("statusmap_background_image", "nagios_cgi_desc"); ?>
Default Statusmap Layout getDefaultStatusmapLayout());?>
element_desc("default_statusmap_layout", "nagios_cgi_desc"); ?>
Statuswrl Include:
element_desc("statuswrl_include", "nagios_cgi_desc"); ?>
Default Statuswrl Layout getDefaultStatuswrlLayout());?>
element_desc("default_statuswrl_layout", "nagios_cgi_desc"); ?>
Refresh Rate:
element_desc("refresh_rate", "nagios_cgi_desc"); ?>
Host Unreachable Sound:
element_desc("host_unreachable_sound", "nagios_cgi_desc"); ?>
Host Down Sound:
element_desc("host_down_sound", "nagios_cgi_desc"); ?>
Service Critical Sound:
element_desc("service_critical_sound", "nagios_cgi_desc"); ?>
Service Warning Sound:
element_desc("service_warning_sound", "nagios_cgi_desc"); ?>
Service Unknown Sound:
element_desc("service_unknown_sound", "nagios_cgi_desc"); ?>
Lock Author Names: getLockAuthorNames());?>
element_desc("lock_author_names", "nagios_cgi_desc"); ?>
Escape HTML Tags: getEscapeHtmlTags());?>
element_desc("escape_html_tags", "nagios_cgi_desc"); ?>
Notes URL Target:

element_desc("notes_url_target", "nagios_cgi_desc"); ?>
Action URL Target:

element_desc("action_url_target", "nagios_cgi_desc"); ?>
Ping Syntax:

element_desc("ping_syntax", "nagios_cgi_desc"); ?>
Enable Splunk Integration: getEnableSplunkIntegration());?>
element_desc("enable_splunk_integration", "nagios_cgi_desc"); ?>
Splunk URL:

element_desc("splunk_url", "nagios_cgi_desc"); ?>