header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $check_id); } exit; } } else { if (isset($_POST['remove_pre'])) { if (is_array($_POST['del_pre_checks_id'])) { foreach ($_POST['del_pre_checks_id'] as $del_check_id) { $checkPrerequisitesDAO->Delete($check_id, $del_check_id); } } } else { if (isset($_POST['remove_next'])) { if (is_array($_POST['del_next_checks_id'])) { foreach ($_POST['del_next_checks_id'] as $del_check_id) { $testPassDAO->Delete($check_id, $del_check_id); } } } } } } // end of handle submit // initialize page $checksDAO = new ChecksDAO(); if (isset($check_id)) { $check_row = $checksDAO->getCheckByID($check_id); if (!$check_row) { // invalid check id $msg->addError('INVALID_CHECK_ID'); require AC_INCLUDE_PATH . 'header.inc.php';