$error = "Fields shown are required and cannot be left blank."; } else { // All is well for error checking, modify the group. $serviceGroup->setName($_POST['servicegroup_name']); $serviceGroup->setAlias($_POST['alias']); $serviceGroup->save(); $success = "Service group modified."; unset($_GET['edit']); } } $_GET['section'] = "general"; } else { if ($_POST['request'] == 'modify_servicegroup_extended') { $serviceGroup->setNotes($_POST['notes']); $serviceGroup->setNotesUrl($_POST['notes_url']); $serviceGroup->setActionUrl($_POST['action_url']); $serviceGroup->save(); $success = "Service group modified."; unset($_GET['edit']); } else { if ($_POST['request'] == 'add_contactgroup_command') { if ($lilac->hostgroup_has_contactgroup($_GET['id'], $serviceGroup['contactgroup_add']['contactgroup_id'])) { $error = "That contact group already exists in that list!"; unset($serviceGroup); } else { $lilac->add_hostgroup_contactgroup($_GET['id'], $serviceGroup['contactgroup_add']['contactgroup_id']); $success = "New Host Group Contact Group Link added."; unset($serviceGroup); } } }