本文整理汇总了PHP中Term::updateStartingDate方法的典型用法代码示例。如果您正苦于以下问题:PHP Term::updateStartingDate方法的具体用法?PHP Term::updateStartingDate怎么用?PHP Term::updateStartingDate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Term
的用法示例。
在下文中一共展示了Term::updateStartingDate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
// redirect if user elevation is not that of secretary or admin
if ($user->isTutor()) {
header('Location: ' . BASE_URL . "error-403");
exit;
}
try {
$terms = TermFetcher::retrieveAll();
if (isBtnUpdatePrsd()) {
$updateDone = false;
$termId = $_POST['updateTermIdModal'];
$termName = $_POST['nameUpdate'];
if (($course = getTerm($termId, $terms)) === false) {
throw new Exception("Data tempering detected. Aborting.");
}
$updateDone = $updateDone || Term::updateName($termId, $_POST['nameUpdate'], $course[TermFetcher::DB_COLUMN_NAME]);
$updateDone = $updateDone || Term::updateStartingDate($termId, $_POST['dateStartUpdate'], $course[TermFetcher::DB_COLUMN_START_DATE]);
$updateDone = $updateDone || Term::updateEndingDate($termId, $_POST['dateEndUpdate'], $course[TermFetcher::DB_COLUMN_END_DATE]);
if (!$updateDone) {
throw new Exception("No new data inputted. Process aborted.");
}
header('Location: ' . BASE_URL . 'academia/terms/success');
exit;
} else {
if (isBtnCreatePrsd()) {
Term::create($_POST['termName'], $_POST['dateTimePickerStart'], $_POST['dateTimePickerEnd']);
header('Location: ' . BASE_URL . 'academia/terms/success');
exit;
} else {
if (isBtnDeletePrsd()) {
Term::delete($_POST['delTermIdModal']);
header('Location: ' . BASE_URL . 'academia/terms/success');