Пример #1
0
                    }
                } else {
                    if ($_POST['request'] == 'contact_address_add') {
                        // All is well for error checking, modify the contact.
                        $lilac->add_contact_address($_GET['contact_id'], $tempData);
                        // Remove session data
                        unset($tempData);
                        $success = "Contact Address added.";
                    }
                }
            }
        }
    }
}
if (isset($_GET['contact_id'])) {
    $tempContactInfo = NagiosContactPeer::retrieveByPK($_GET['contact_id']);
    if (!$tempContactInfo) {
        header("Location: welcome.php");
    }
}
$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');