本文整理汇总了PHP中CTask::GetById方法的典型用法代码示例。如果您正苦于以下问题:PHP CTask::GetById方法的具体用法?PHP CTask::GetById怎么用?PHP CTask::GetById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CTask
的用法示例。
在下文中一共展示了CTask::GetById方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetLetter
function GetLetter($ID)
{
$z = CTask::GetById($ID);
if ($r = $z->Fetch()) {
if ($r['LETTER']) {
return $r['LETTER'];
}
}
return false;
}
示例2: intval
$anonym = $g_NAME;
if($path=="/")
$perm = $CUR_PERM["/"][$g_ID];
else
$perm = $CUR_PERM[$arParsedPath["LAST"]][$g_ID];
if (substr($perm,0,2) == 'T_')
$taskId = intval(substr($perm,2));
elseif(strlen($perm) == 1)
$taskId = CTask::GetIdByLetter($perm,'main','file');
else
$taskId = 'NOT_REF';
if ($taskId != 'NOT_REF')
{
$z = CTask::GetById($taskId);
if (!($r = $z->Fetch()))
$taskId = 'NOT_REF';
}
//if(isset($arSubordGroups) && !in_array($g_ID,$arSubordGroups))
//{
// $hidden_groups .= '<input type="hidden" name="g_'.$g_ID.'" value="'.$taskId.'">';
// continue;
//}
?>
<tr>
<td>
[<a href="/freetrix/admin/group_edit.php?ID=<?php
echo $g_ID;
?>
&lang=<?php
示例3: IntVal
}
} else {
$showField = " ";
}
}
$row->AddField("PERMS", $showField);
}
$showField = "";
if (in_array("PERMS_B", $arVisibleColumns)) {
$showField = " ";
if (($USER->CanDoOperation('fileman_view_permissions') || $USER->CanDoOperation('fileman_edit_all_settings')) && $USER->CanDoFileOperation('fm_view_permission', $arPath)) {
$arP = $APPLICATION->GetFileAccessPermission(array($site, $fpath), IntVal($show_perms_for) > 0 ? array($show_perms_for) : false, true);
end($arP);
$cur_dir_taskId = current($arP);
if ($cur_dir_taskId) {
$z = CTask::GetById($cur_dir_taskId);
if ($r = $z->Fetch()) {
if ($r['NAME']) {
$showField = GetMessage(strtoupper($r['NAME']));
if (strlen($showField) <= 0) {
$showField = $r['NAME'];
}
}
}
}
}
}
$row->AddField("PERMS_B", $showField);
$arActions = array();
if ($Elem["TYPE"] == "F") {
if ($USER->CanDoFileOperation('fm_view_listing', $arPath)) {
示例4: trim
$groupID = trim($groupID);
if($groupID == '')
continue;
}
elseif (!$isAdmin)
continue;
// if not set task - delete permission
$taskID = intval($taskID);
if ($taskID <= 0)
{
unset($arSavePermission[$groupID]);
continue;
}
$obTask = CTask::GetById($taskID);
if ( ($arTask = $obTask->Fetch()) && $arTask["LETTER"] && $arTask["SYS"] == "Y")
$permLetter = $arTask["LETTER"];
else
$permLetter = "T_".$taskID;
$arSavePermission[$groupID] = $permLetter;
}
}
$APPLICATION->SetFileAccessPermission(array($site, $path), $arSavePermission);
if ($e = $APPLICATION->GetException())
$strWarning = $e->msg;
}
示例5: GetMessage
if ($cur_dir_taskId) {
$z = CTask::GetById($cur_dir_taskId);
if ($r = $z->Fetch()) {
if ($r['NAME']) {
$showField = GetMessage(strtoupper($r['NAME']));
if (strlen($showField) <= 0) {
$showField = $r['NAME'];
}
}
}
}
$add_tasks = $arP[1];
$len = count($add_tasks);
if ($len > 0) {
for ($i = 0; $i < $len; $i++) {
$z = CTask::GetById($add_tasks[$i]);
if ($r = $z->Fetch()) {
if ($r['NAME']) {
$showField .= ', ' . $r['NAME'];
}
}
}
}
}
}
$row->AddField("PERMS_B", $showField);
$arActions = array();
if ($Elem["TYPE"] == "F") {
if ($USER->CanDoFileOperation('fm_view_listing', $arPath)) {
if ($USER->CanDoOperation('fileman_edit_menu_elements') && preg_match('/^\\.(.*)?\\.menu\\.(php|html|php3|php4|php5|phtml)$/', $f_NAME, $regs) && $USER->CanDoFileOperation('fm_edit_existent_file', $arPath)) {
$arActions[] = array("ICON" => "edit", "TEXT" => GetMessage("FILEMAN_ADMIN_EDIT_AS_MENU"), "DEFAULT" => true, "ACTION" => $lAdmin->ActionRedirect("fileman_menu_edit.php?path=" . urlencode($path) . "&site=" . $site . "&name=" . urlencode($regs[1]) . "&" . $addUrl . "&" . GetFilterParams("filter_") . ""));