本文整理汇总了PHP中CTask::GetByID方法的典型用法代码示例。如果您正苦于以下问题:PHP CTask::GetByID方法的具体用法?PHP CTask::GetByID怎么用?PHP CTask::GetByID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CTask
的用法示例。
在下文中一共展示了CTask::GetByID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: LocalRedirect
$arOperationIds = $_POST['OPERATION_ID'];
}
$old_arOperationIds = CTask::GetOperations($ID);
if (count(array_diff($old_arOperationIds, $arOperationIds)) > 0 || count(array_diff($arOperationIds, $old_arOperationIds)) > 0) {
CTask::SetOperations($ID, $arOperationIds);
}
if ($_POST["save"] != '') {
LocalRedirect("task_admin.php?lang=" . LANGUAGE_ID);
} elseif ($_POST["apply"] != '') {
LocalRedirect($APPLICATION->GetCurPage() . "?lang=" . LANGUAGE_ID . "&ID=" . $ID . "&" . $tabControl->ActiveTabParam());
}
} else {
$message = new CAdminMessage(GetMessage('TASK_SAVE_ERROR'), new CAdminException($aMsg));
}
}
$z = CTask::GetByID($ID);
if (!$z->ExtractFields("str_") || $ID == 0) {
$ID = 0;
$str_SYS = 'N';
$str_BINDING = 'module';
$str_MODULE_ID = 'main';
} else {
if ($COPY_ID > 0) {
$str_SYS = 'N';
}
}
$sDocTitle = $ID > 0 && $COPY_ID <= 0 ? GetMessage("EDIT_TASK_TITLE", array("#ID#" => $ID)) : GetMessage("NEW_TASK_TITLE");
$APPLICATION->SetTitle($sDocTitle);
/***************************************************************************
HTML form
****************************************************************************/
示例2: elseif
}
break;
case "GROUP_POLICY_CHANGED":
case "MODULE_RIGHTS_CHANGED":
if (!array_key_exists($a_ITEM_ID, $arGroupsCache)) {
$rsGroup = CGroup::GetByID($a_ITEM_ID);
if ($arGroup = $rsGroup->GetNext()) {
$arGroupsCache[$a_ITEM_ID] = $arGroup["NAME"];
} else {
$arGroupsCache[$a_ITEM_ID] = "";
}
}
$row->AddViewField("ITEM_ID", '[<a href="group_edit.php?lang=' . LANG . '&ID=' . $a_ITEM_ID . '">' . $a_ITEM_ID . '</a>] ' . $arGroupsCache[$a_ITEM_ID]);
break;
case "TASK_CHANGED":
$rsTask = CTask::GetByID($a_ITEM_ID);
if ($arTask = $rsTask->GetNext()) {
$row->AddViewField("ITEM_ID", '[<a href="task_edit.php?lang=' . LANG . '&ID=' . $a_ITEM_ID . '">' . $a_ITEM_ID . '</a>] ' . $arTask["NAME"]);
}
break;
case "FORUM_MESSAGE_APPROVE":
case "FORUM_MESSAGE_UNAPPROVE":
case "FORUM_MESSAGE_MOVE":
case "FORUM_MESSAGE_EDIT":
if (intval($a_ITEM_ID) <= 0) {
continue;
} elseif (!array_key_exists($a_ITEM_ID, $arForumCache["MESSAGE"])) {
CModule::IncludeModule("forum");
$res = CForumMessage::GetByID($a_ITEM_ID);
$res["MESSAGE_ID"] = $res["ID"];
$arForumCache["MESSAGE"][$a_ITEM_ID] = $res;