Debug::Text('bException Policy Control ID: ' . $epc_id, __FILE__, __LINE__, __METHOD__, 10); if (count($data['exceptions']) > 0) { foreach ($data['exceptions'] as $code => $exception_data) { Debug::Text('Looping Code: ' . $code . ' ID: ' . $exception_data['id'], __FILE__, __LINE__, __METHOD__, 10); if ($exception_data['id'] != '' and $exception_data['id'] > 0) { $epf->setId($exception_data['id']); } $epf->setExceptionPolicyControl($epc_id); if (isset($exception_data['active'])) { $epf->setActive(TRUE); } else { $epf->setActive(FALSE); } $epf->setType($code); $epf->setSeverity($exception_data['severity_id']); $epf->setEmailNotification($exception_data['email_notification_id']); if (isset($exception_data['demerit']) and $exception_data['demerit'] != '') { $epf->setDemerit($exception_data['demerit']); } if (isset($exception_data['grace']) and $exception_data['grace'] != '') { $epf->setGrace($exception_data['grace']); } if (isset($exception_data['watch_window']) and $exception_data['watch_window'] != '') { $epf->setWatchWindow($exception_data['watch_window']); } if ($epf->isValid()) { $epf->Save(); } } } Redirect::Page(URLBuilder::getURL(NULL, 'ExceptionPolicyControlList.php'));