コード例 #1
0
ファイル: servicegroups.php プロジェクト: Evolix/lilac
/*
Lilac Service Groups Management Page
*/
include_once 'includes/config.inc';
require_once 'NagiosServiceGroupMember.php';
// SF BUG# 1449764
// servicegroup session data not being unset
// Resolution:
// if(!isset($_GET['id']))
// unset($serviceGroup);
if (!isset($_GET['section']) && isset($_GET['id'])) {
    $_GET['section'] = 'general';
}
// If we're going to modify servicegroup data
if (isset($_GET['id'])) {
    $serviceGroup = NagiosServiceGroupPeer::retrieveByPK($_GET['id']);
    if (!$serviceGroup) {
        header("Location: welcome.php");
        die;
    }
}
// Action Handlers
if (isset($_GET['request'])) {
    if ($_GET['request'] == "delete" && $_GET['section'] == 'members') {
        // !!!!!!!!!!!!!! This is where we do dependency error checking
        $membership = NagiosServiceGroupMemberPeer::retrieveByPK($_GET['member_id']);
        if ($membership) {
            $membership->delete();
            $success = "Member Deleted";
        }
    }