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


PHP CGroup::SetTasksForModule方法代码示例

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


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

示例1: array

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
if (WIZARD_IS_RERUN) {
    return;
}
if (!CModule::IncludeModule("fileman")) {
    return;
}
$arAccessRights = array(WIZARD_PORTAL_ADMINISTRATION_GROUP => 'F', WIZARD_PERSONNEL_DEPARTMENT_GROUP => 'F');
$arTaskIDs = array();
$dbRes = CTask::GetList(array(), array('MODULE_ID' => 'fileman', 'SYS' => 'Y', 'LETTER' => implode('|', $arAccessRights), 'BINDING' => 'module'));
while ($arRes = $dbRes->Fetch()) {
    $arTaskIDs[$arRes['LETTER']] = $arRes['ID'];
}
$arTasksForModule = array();
foreach ($arAccessRights as $group => $letter) {
    $APPLICATION->SetGroupRight('fileman', $group, $letter);
    $arTasksForModule[$group] = array('ID' => $arTaskIDs[$letter]);
}
CGroup::SetTasksForModule('fileman', $arTasksForModule);
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:23,代码来源:index.php

示例2: Array

		$arTasksInModule[$value["ID"]] = Array('ID' => $tid);

		$subOrdGr = false;
		if (strlen($tid) > 0 && in_array($nID,CTask::GetOperations($tid)) && isset($_POST['subordinate_groups_'.$value["ID"]]))
			$subOrdGr = $_POST['subordinate_groups_'.$value["ID"]];

		CGroup::SetSubordinateGroups($value["ID"], $subOrdGr);

		$rt = ($tid) ? CTask::GetLetter($tid) : '';
		if (strlen($rt) > 0 && $rt != "NOT_REF")
			$APPLICATION->SetGroupRight($module_id, $value["ID"], $rt);
		else
			$APPLICATION->DelGroupRight($module_id, array($value["ID"]));
	}

	CGroup::SetTasksForModule($module_id, $arTasksInModule);

	if($_REQUEST["back_url_settings"] <> "" && $_REQUEST["Apply"] == "")
		LocalRedirect($_REQUEST["back_url_settings"]);
	else
		LocalRedirect("/freetrix/admin/settings.php?lang=".LANGUAGE_ID."&mid=".urlencode($mid)."&tabControl_active_tab=".urlencode($_REQUEST["tabControl_active_tab"])."&back_url_settings=".urlencode($_REQUEST["back_url_settings"]));
}

if($SET_LICENSE_KEY == "")
	$SET_LICENSE_KEY = LICENSE_KEY;

if ($_SERVER["REQUEST_METHOD"]=="POST" && $_POST["stop_site"]=="Y" && $USER->CanDoOperation('edit_other_settings') && check_freetrix_sessid())
{
	COption::SetOptionString("main", "site_stopped", "Y");
	CAdminMessage::ShowNote(GetMessage("MAIN_OPTION_PUBL_CLOSES"));
}
开发者ID:ASDAFF,项目名称:open_bx,代码行数:31,代码来源:options.php

示例3: IncludeModuleLangFile

    return;
}
IncludeModuleLangFile(__FILE__);
$module_id = 'timeman';
CModule::IncludeModule($module_id);
$arAllModuleOptions = array('edit_wd' => array('workday_start' => array(1 => 'time', 32400, 'clock'), 'workday_finish' => array(1 => 'time', 64800, 'clock'), 'workday_close_undo' => array(1 => 'checkbox', 'Y', 'checkbox'), 'workday_max_start' => array(1 => 'time', 33300, 'clock'), 'workday_min_finish' => array(1 => 'time', 63900, 'clock'), 'workday_min_duration' => array(1 => 'time', 28800, 'text'), 'workday_report_required' => array(1 => 'string', 'A', 'select', array('A' => GetMessage('TM_FIELD_UF_TM_REPORT_REQ_A'), 'Y' => GetMessage('TM_FIELD_UF_TM_REPORT_REQ_Y'), 'N' => GetMessage('TM_FIELD_UF_TM_REPORT_REQ_N'))), 'workday_allowed_delta' => array(1 => 'string', 900, 'text')), 'edit_wr' => array("report_forum_id" => array(1 => 'int', 0, 'selectbox'), "WORK_REPORT_PATH" => array(1 => 'string', "/company/work_report.php", "string"), "TIMEMAN_REPORT_PATH" => array(1 => 'string', "/company/timeman.php", "string")));
$aTabs = array(array("DIV" => "edit_wd", "TAB" => GetMessage("TM_WD_SETTINGS"), "ICON" => "timeman_settings", "TITLE" => GetMessage("TM_WD_SETTINGS_TITLE")), array("DIV" => "edit_access", "TAB" => GetMessage("TM_ACCESS"), "ICON" => "timeman_settings", "TITLE" => GetMessage("TM_ACCESS_TITLE")), array("DIV" => "edit_wr", "TAB" => GetMessage("WR_WORK_REPORTS"), "ICON" => "timeman_settings", "TITLE" => GetMessage("WR_WORK_REPORTS_SETTINGS")));
$tabControl = new CAdminTabControl("tabControl", $aTabs);
if ($REQUEST_METHOD == "POST" && strlen($Update . $Apply . $RestoreDefaults) > 0 && check_bitrix_sessid()) {
    if (strlen($RestoreDefaults) > 0) {
        COption::RemoveOption($module_id);
        $z = CGroup::GetList($v1 = "id", $v2 = "asc", array("ACTIVE" => "Y", "ADMIN" => "N"));
        while ($zr = $z->Fetch()) {
            $APPLICATION->DelGroupRight($module_id, array($zr["ID"]));
        }
        CGroup::SetTasksForModule($module_id, array());
        COption::SetOptionString($module_id, "GROUP_DEFAULT_TASK", CTask::GetIdByLetter('N', $module_id));
        COption::SetOptionString($module_id, "GROUP_DEFAULT_RIGHT", "N");
    } else {
        foreach ($arAllModuleOptions as $tab => $arAllOptions) {
            foreach ($arAllOptions as $opt => $arOptDef) {
                // if (true isset($_REQUEST[$opt]))
                // {
                $value = trim($_REQUEST[$opt]);
                switch ($arOptDef[1]) {
                    case 'time':
                        if (strlen($value) > 0) {
                            list($hour, $min) = explode(':', $value, 2);
                            if (IsAmPmMode() && preg_match('/(am|pm)/i', $min, $match)) {
                                $ampm = strtolower($match[0]);
                                if ($ampm == 'pm' && $hour < 12) {
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:options.php

示例4: foreach

    foreach ($arGroup["TASKS_FILE"] as $arFile) {
        $taskName = $arFile[0];
        $filePath = $arFile[1];
        $dbResult = CTask::GetList(array(), array("NAME" => $taskName));
        if ($arTask = $dbResult->Fetch()) {
            CExtranetWizardServices::SetFilePermission(array(WIZARD_SITE_ID, $filePath), array($groupID => "T_" . $arTask["ID"]));
        }
    }
}
// set view perms for employee groups
$rsGroupEmployees = CGroup::GetList($by = "c_sort", $order = "asc", array("STRING_ID" => "EMPLOYEES%"));
while ($arGroupEmployees = $rsGroupEmployees->Fetch()) {
    $dbResult = CTask::GetList(array(), array("NAME" => "fm_folder_access_read"));
    if ($arTask = $dbResult->Fetch()) {
        CExtranetWizardServices::SetFilePermission(array(WIZARD_SITE_ID, WIZARD_SITE_DIR), array($arGroupEmployees["ID"] => "T_" . $arTask["ID"]));
    }
}
$APPLICATION->SetGroupRight("fileman", WIZARD_EXTRANET_ADMIN_GROUP, "F");
$task_id = CTask::GetIdByLetter("F", "fileman");
if (intval($task_id) > 0) {
    CGroup::SetTasksForModule("fileman", array(WIZARD_EXTRANET_ADMIN_GROUP => array("ID" => $task_id)));
}
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/.top.menu.php", array("EXTRANET_ADMIN_GROUP_ID" => $ExtranetAdminGroupID));
$rsUser = CUser::GetList($by = "ID", $order = "desc", array("GROUPS_ID" => array(1)));
while ($arAdminUser = $rsUser->Fetch()) {
    $arUserGroups = CUser::GetUserGroup($arAdminUser["ID"]);
    if (is_array($arUserGroups) && !in_array(WIZARD_EXTRANET_GROUP, $arUserGroups)) {
        $arUserGroups[] = WIZARD_EXTRANET_GROUP;
        CUser::SetUserGroup($arAdminUser["ID"], $arUserGroups);
    }
}
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:groups.php


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