コード例 #1
0
ファイル: hosts.php プロジェクト: Evolix/lilac
 }
 if ($_GET['request'] == "delete" && $_GET['section'] == 'dependencies') {
     $dependency = NagiosDependencyPeer::retrieveByPK($_GET['dependency_id']);
     if ($dependency) {
         $dependency->delete();
         $success = "Dependency deleted.";
     }
 }
 if ($_GET['request'] == "delete" && $_GET['section'] == 'escalations') {
     // !!!!!!!!!!!!!! This is where we do dependency error checking
     $lilac->delete_escalation($_GET['escalation_id']);
     $success = "Escalation Deleted";
     unset($host);
 }
 if ($_GET['request'] == "delete" && $_GET['section'] == 'checkcommand') {
     $commandParameter = NagiosHostCheckCommandParameterPeer::retrieveByPK($_GET['checkcommandparameter_id']);
     if ($commandParameter) {
         $commandParameter->delete();
     }
     $success = "Check Command Parameter Deleted.";
 }
 if ($_GET['request'] == "delete" && $_GET['section'] == 'parents') {
     $c = new Criteria();
     $c->add(NagiosHostParentPeer::CHILD_HOST, $host->getId());
     $c->add(NagiosHostParentPeer::PARENT_HOST, $_GET['parent_id']);
     $parentRelationship = NagiosHostParentPeer::doSelectOne($c);
     if (!$parentRelationship) {
         $error = "That parent relationship was not found.";
     } else {
         $parentRelationship->delete();
         $success = "Parent relationship removed.";