$type = "servicetemplate"; $title = "Service Template"; } else { if (isset($_GET['service_id'])) { $tempSource = NagiosServicePeer::retrieveByPK($_GET['service_id']); $fieldName = "service_id"; $link = "service.php"; if (!$tempSource) { header("Location: welcome.php"); } $type = "service"; $title = ""; // This can be ignored later on. } else { if (isset($_GET['hostgroup_id'])) { $tempSource = NagiosHostgroupPeer::retrieveByPK($_GET['hostgroup_id']); $fieldName = "hostgroup_id"; $link = "hostgroups.php"; if (!$tempSource) { header("Location: welcome.php"); } $type = "hostgroup"; $title = "Hostgroup"; } } } } } if (isset($_POST['request'])) { if ($_POST['request'] == "add_dependency") { // Error checking
$cancelLink = "host_template.php?id=" . $hostTemplate->getId() . "§ion=services"; } } else { if (isset($_GET['host_id'])) { $host = NagiosHostPeer::retrieveByPK($_GET['host_id']); if (!$host) { header("Location: welcome.php"); die; } else { $title = " for Host " . $host->getName(); $sublink = "?host_id=" . $host->getId(); $cancelLink = "hosts.php?id=" . $host->getId() . "§ion=services"; } } else { if (isset($_GET['hostgroup_id'])) { $hostgroup = NagiosHostgroupPeer::retrieveByPK($_GET['hostgroup_id']); if (!$hostgroup) { header("Location: welcome.php"); die; } else { $title = " for Hostgroup " . $hostgroup->getName(); $sublink = "?hostgroup_id=" . $hostgroup->getId(); $cancelLink = "hostgroups.php?id=" . $hostgroup->getId() . "§ion=services"; } } else { header("Location: welcome.php"); die; } } } if (isset($_POST['request'])) {