当前位置: 首页>>代码示例>>PHP>>正文


PHP CGroup::SetTasks方法代码示例

本文整理汇总了PHP中CGroup::SetTasks方法的典型用法代码示例。如果您正苦于以下问题:PHP CGroup::SetTasks方法的具体用法?PHP CGroup::SetTasks怎么用?PHP CGroup::SetTasks使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CGroup的用法示例。


在下文中一共展示了CGroup::SetTasks方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

 }
 if ($groupID <= 0) {
     continue;
 }
 $SiteGroup["STRING_ID"] = $arGroup["STRING_ID"];
 $SiteGroups[$arGroup["STRING_ID"]] = $groupID;
 //Set tasks binding to module
 $arTasksID = array();
 foreach ($arGroup["TASKS_MODULE"] as $taskName) {
     $dbResult = CTask::GetList(array(), array("NAME" => $taskName));
     if ($arTask = $dbResult->Fetch()) {
         $arTasksID[] = $arTask["ID"];
     }
 }
 if (!empty($arTasksID)) {
     CGroup::SetTasks($groupID, $arTasksID, true);
 }
 //Set tasks binding to file
 foreach ($arGroup["TASKS_FILE"] as $arFile) {
     $taskName = $arFile[0];
     $filePath = $arFile[1];
     $dbResult = CTask::GetList(array(), array("NAME" => $taskName));
     if ($arTask = $dbResult->Fetch()) {
         WizardServices::SetFilePermission(array(WIZARD_SITE_ID, $filePath), array($groupID => "T_" . $arTask["ID"]));
     }
 }
 if ($arGroup["STRING_ID"] == "EMPLOYEES_" . WIZARD_SITE_ID) {
     WizardServices::SetFilePermission(array(WIZARD_SITE_ID, WIZARD_SITE_DIR), array("*" => 'D'));
     WizardServices::SetFilePermission(array(WIZARD_SITE_ID, WIZARD_SITE_DIR), array($groupID => 'R'));
 }
 if (WIZARD_IS_RERUN === false) {
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:groups.php

示例2: array

    COption::SetOptionString("main", "new_user_registration_def_group", $groupID);
    if ($editProfileTask) {
        CGroup::SetTasks($groupID, array($editProfileTask), true);
    }
}
//Control panel users
$dbResult = CGroup::GetList($by, $order, array("STRING_ID" => "CONTROL_PANEL_USERS"));
$arGroup = $dbResult->Fetch();
if (!$arGroup) {
    $group = new CGroup();
    $arFields = array("ACTIVE" => "Y", "C_SORT" => 4, "NAME" => GetMessage("CONTROL_PANEL_GROUP_NAME"), "STRING_ID" => "CONTROL_PANEL_USERS");
    $groupID = $group->Add($arFields);
    if ($groupID > 0) {
        DemoSiteUtil::SetFilePermission(array("s1", "/bitrix/admin"), array($groupID => "R"));
        if ($editProfileTask) {
            CGroup::SetTasks($groupID, array($editProfileTask), true);
        }
    }
} else {
    $groupID = $arGroup["ID"];
}
if ($groupID > 0 && !strlen(COption::GetOptionString("main", "show_panel_for_users", ""))) {
    COption::SetOptionString("main", "show_panel_for_users", serialize(array("G" . $groupID)));
}
//Options
$server_name = $_SERVER["HTTP_HOST"] != '' ? $_SERVER["HTTP_HOST"] : $_SERVER["SERVER_NAME"];
if ($_SERVER["SERVER_PORT"] != 80 && $_SERVER["SERVER_PORT"] != 443 && $_SERVER["SERVER_PORT"] > 0 && strpos($_SERVER["HTTP_HOST"], ":") === false) {
    $server_name .= ":" . $_SERVER["SERVER_PORT"];
}
COption::SetOptionString("main", "server_name", $server_name);
COption::SetOptionString("main", "upload_dir", "upload");
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:settings.php

示例3: isset

                    $arOpInTask = CTask::GetOperations($arTaskIds[$i]['ID']);
                    if (in_array($nID, $arOpInTask) || in_array($nID2, $arOpInTask)) {
                        $handle_subord = true;
                    }
                    break;
                }
            }
            if ($handle_subord) {
                $arSubordinateGroups = isset($_POST['subordinate_groups']) ? $_POST['subordinate_groups'] : array();
                CGroup::SetSubordinateGroups($ID, $arSubordinateGroups);
            } else {
                CGroup::SetSubordinateGroups($ID);
            }
            $old_arTasks = CGroup::GetTasks($ID, true);
            if (count(array_diff($old_arTasks, $arTasks)) > 0 || count(array_diff($arTasks, $old_arTasks)) > 0) {
                CGroup::SetTasks($ID, $arTasks);
            }
        }
        if ($USER->CanDoOperation('edit_groups') && $_REQUEST["save"] != '') {
            LocalRedirect("group_admin.php?lang=" . LANGUAGE_ID);
        } elseif ($USER->CanDoOperation('edit_groups') && $_REQUEST["apply"] != '') {
            LocalRedirect($APPLICATION->GetCurPage() . "?lang=" . LANGUAGE_ID . "&ID=" . $ID . "&" . $tabControl->ActiveTabParam());
        } elseif ($new == "Y") {
            LocalRedirect($APPLICATION->GetCurPage() . "?lang=" . LANGUAGE_ID . "&ID=" . $ID . "&" . $tabControl->ActiveTabParam());
        }
    }
}
$str_USER_ID = array();
$z = CGroup::GetByID($ID, "N");
if ($z->ExtractFields("str_")) {
    if ($USER_COUNT <= $USER_COUNT_MAX && $ID != 2) {
开发者ID:spas-viktor,项目名称:books,代码行数:31,代码来源:group_edit.php


注:本文中的CGroup::SetTasks方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。