$lilac->return_period_list($tempList); foreach ($tempList as $period) { $period_list[] = array("timeperiod_id" => $period->getId(), "timeperiod_name" => $period->getName()); } $initialState_list = array(); $initialState_list[] = array('value' => 'o', 'label' => 'Up'); $initialState_list[] = array('value' => 'd', 'label' => 'Down'); $initialState_list[] = array('value' => 'u', 'label' => 'Unreachable'); // End creating select lists // Build subnav $subnav = array('general' => 'General', 'parents' => 'Parents', 'inheritance' => 'Inheritance', 'checks' => 'Checks', 'flapping' => 'Flapping', 'logging' => 'Logging', 'notifications' => 'Notifications', 'services' => 'Services', 'groups' => 'Group Memberships', 'contacts' => 'Contacts', 'extended' => 'Extended Information', 'dependencies' => 'Dependencies', 'escalations' => 'Escalations'); if (isset($hostValues['check_command'])) { $subnav['checkcommand'] = 'Check Command Parameters'; } print_window_header("Host Info for " . $host->getName(), "100%"); print_subnav($subnav, $_GET['section'], "section", $_SERVER['PHP_SELF'] . "?id=" . $_GET['id']); $host_icon_image = $path_config['image_root'] . "server.gif"; if ($_GET['section'] == 'general') { ?> <table width="100%" border="0"> <tr> <td width="100" align="center" valign="top"> <img src="<?php echo $host_icon_image; ?> " /> </td> <td valign="top"> <?php if (isset($_GET['edit'])) { // We're editing general information
} } $lilac->get_contact_list($contact_list); $numOfContacts = count($contact_list); $lilac->return_period_list($tempList); $period_list = array(); foreach ($tempList as $tempPeriod) { $period_list[] = array("timeperiod_id" => $tempPeriod->getId(), "timeperiod_name" => $tempPeriod->getName()); } print_header("Contact Editor"); if (isset($_GET['contact_id'])) { // Build subnav $subnav = array('general' => 'General', 'notification' => 'Notification Commands', 'groups' => 'Group Membership', 'addresses' => 'Addresses'); // PLACEHOLDER TO PUT CONTACT INFO print_window_header("Contact Info for " . $tempContactInfo->getName(), "100%"); print_subnav($subnav, $_GET['section'], "section", $_SERVER['PHP_SELF'] . "?contact_id=" . $tempContactInfo->getId()); if ($_GET['section'] == 'general') { ?> <table width="100%" border="0"> <tr> <td width="100" align="center" valign="top"> <img src="<?php echo $path_config['image_root']; ?> contact.gif" /> </td> <td valign="top"> <?php if (isset($_GET['edit'])) { // We're editing checks information ?>
$date_format_list[] = array("values" => "iso8601", "text" => "iso8601 - YYYY-MM-DD HH:MM:SS"); $date_format_list[] = array("values" => "strict-iso8601", "text" => "strict-iso8601 - YYYY-MM-DDTHH:MM:SS"); // Let's make the log rotation select list $log_rotate_list[] = array("values" => "n", "text" => "None"); $log_rotate_list[] = array("values" => "h", "text" => "Hourly"); $log_rotate_list[] = array("values" => "d", "text" => "Daily"); $log_rotate_list[] = array("values" => "w", "text" => "Weekly"); $log_rotate_list[] = array("values" => "m", "text" => "Monthly"); if (!isset($_GET['section'])) { $_GET['section'] = 'paths'; } // Build subnavigation $subnav = array('paths' => 'Paths', 'status' => 'Status', 'security' => 'Security', 'restart' => 'Restart Actions', 'logging' => 'Logging', 'external' => 'External Commands', 'retention' => 'Retention', 'global' => 'Global', 'intervals' => 'Intervals', 'flap' => 'Flap', 'timeouts' => 'Timeouts', 'obsess' => 'Obsess', 'freshness' => 'Freshness', 'broker' => 'Broker', 'debug' => 'Debug', 'other' => 'Other'); print_header("Main Configuration File Editor", "main"); print_window_header("Nagios Daemon Configuration", "100%", "center"); print_subnav($subnav, $_GET['section'], "section"); if ($_GET['section'] == 'paths') { ?> <form name="main_config" method="post" action="main.php?section=paths"> <input type="hidden" name="request" value="main_modify_paths" /> <?php double_pane_form_window_start(); ?> <div class="formbox"> <b>Configuration Directory</b><br /> <input type="text" size="80" maxlength="255" name="main_config[config_dir]" value="<?php echo $mainConfig->getConfigDir(); ?> "><br /> <?php echo $lilac->element_desc("config_dir", "nagios_main_desc");
$tempExclusion = new NagiosTimeperiodExclude(); $tempExclusion->setNagiosTimeperiodRelatedByExcludedTimeperiod($targetTimeperiod); $tempExclusion->setNagiosTimeperiodRelatedByTimeperiodId($timeperiod); $tempExclusion->save(); $success = "Exclusion added."; } } } } } } // Create subnav $subnav = array('general' => 'General', 'entries' => 'Time Entries', 'exclusions' => 'Exclusions'); print_header("Time Period Editor"); print_window_header("Modify A Time Period - " . $timeperiod->getName(), "100%"); print_subnav($subnav, $_GET['section'], "section", $_SERVER['PHP_SELF'] . "?timeperiod_id=" . $timeperiod->getId()); if ($_GET['section'] == 'general') { ?> <form name="timeperiod_form" method="post" action="timeperiod.php?timeperiod_id=<?php echo $timeperiod->getId(); ?> "> <input type="hidden" name="request" value="modify_period" /> <input type="hidden" name="timeperiod_manage[timeperiod_id]" value="<?php echo $timeperiod->getId(); ?> "> <b>Time Period Name:</b><br /> <input type="text" name="timeperiod_manage[timeperiod_name]" value="<?php echo isset($timeperiod) ? $timeperiod->getName() : ''; ?>