本文整理汇总了PHP中CTask::GetList方法的典型用法代码示例。如果您正苦于以下问题:PHP CTask::GetList方法的具体用法?PHP CTask::GetList怎么用?PHP CTask::GetList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CTask
的用法示例。
在下文中一共展示了CTask::GetList方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetTasks
function GetTasks()
{
$arTasks = Array();
$res = CTask::GetList(Array('LETTER' => 'asc'), Array('MODULE_ID' => 'fileman', 'BINDING' => 'stickers'));
while($arRes = $res->Fetch())
{
$name = '';
if ($arRes['SYS'])
$name = GetMessage('TASK_NAME_'.strtoupper($arRes['NAME']));
if (strlen($name) == 0)
$name = $arRes['NAME'];
$arTasks[$arRes['ID']] = Array('title' => $name, 'letter' => $arRes['LETTER']);
}
return $arTasks;
}
示例2: GetTasks
function GetTasks()
{
IncludeModuleLangFile($_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/fileman/admin/task_description.php");
$arTasks = array();
$res = CTask::GetList(array('LETTER' => 'asc'), array('MODULE_ID' => 'fileman', 'BINDING' => 'stickers'));
while ($arRes = $res->Fetch()) {
$name = '';
if ($arRes['SYS']) {
$name = GetMessage('TASK_NAME_' . strtoupper($arRes['NAME']));
}
if (strlen($name) == 0) {
$name = $arRes['NAME'];
}
$arTasks[$arRes['ID']] = array('title' => $name, 'letter' => $arRes['LETTER']);
}
return $arTasks;
}
示例3: GetAccessTasks
public static function GetAccessTasks($binging = 'calendar_section')
{
\Bitrix\Main\Localization\Loc::loadLanguageFile($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/calendar/admin/task_description.php");
if (is_array(self::$arAccessTask[$binging])) {
return self::$arAccessTask[$binging];
}
$bIntranet = self::IsIntranetEnabled();
$arTasks = array();
$res = CTask::GetList(array('ID' => 'asc'), array('MODULE_ID' => 'calendar', 'BINDING' => $binging));
while ($arRes = $res->Fetch()) {
if (!$bIntranet && (strtolower($arRes['NAME']) == 'calendar_view_time' || strtolower($arRes['NAME']) == 'calendar_view_title')) {
continue;
}
$name = '';
if ($arRes['SYS']) {
$name = GetMessage('TASK_NAME_' . strtoupper($arRes['NAME']));
}
if (strlen($name) == 0) {
$name = $arRes['NAME'];
}
$arTasks[$arRes['ID']] = array('name' => $arRes['NAME'], 'title' => $name);
}
self::$arAccessTask[$binging] = $arTasks;
return $arTasks;
}
示例4: GetMessage
</tr>
<tr>
<td align="center" colspan="2">
<table border="0" cellspacing="1" cellpadding="2" width="100%" class="internal">
<tr class="heading">
<td valign="middle" align="center" nowrap>
<?echo GetMessage("FILEMAN_FOLDER_ACCESS_GROUP")?>
</td>
<td valign="top" align="center" nowrap>
<?echo GetMessage("FILEMAN_FOLDER_ACCESS_LEVEL")?>
</td>
</tr>
<?
$arPermTypes = Array();
$res = CTask::GetList(Array('LETTER' => 'asc'), Array('MODULE_ID' => 'main','BINDING' => 'file'));
while($arRes = $res->Fetch())
{
$name = '';
if ($arRes['SYS'])
$name = GetMessage(strtoupper($arRes['NAME']));
if (strlen($name) == 0)
$name = $arRes['NAME'];
$arPermTypes[$arRes['ID']] = Array(
'title' => $name,
'letter' => $arRes['LETTER']
);
}
$arPermTypes['NOT_REF'] = Array(
'title' => GetMessage("FILEMAN_FOLDER_ACCESS_INHERIT"),
示例5: array_merge
if (isset($PERM[$name]) && is_array($PERM[$name]))
$arUserGroupsID = array_merge($arUserGroupsID, array_keys($PERM[$name]));
if (strlen($currentPath)<=0)
break;
}
foreach($arUserGroupsID as $key=>$val)
if(preg_match('/^[0-9]+$/', $val))
$arUserGroupsID[$key] = "G".$val;
$arUserGroupsID = array_unique($arUserGroupsID);
//Get all tasks
$arPermTypes = array();
$obTask = CTask::GetList(array("LETTER" => "ASC"), array("MODULE_ID" => "main", "BINDING" => "file"));
while($arTask = $obTask->Fetch())
$arPermTypes[$arTask["ID"]] = CTask::GetLangTitle($arTask["NAME"]);
//Current file/folder permissions
$currentPermission = array();
if($io->FileExists($documentRoot.$assignFolderName.".access.php"))
{
$PERM = array();
include($io->GetPhysicalName($documentRoot.$assignFolderName.".access.php"));
foreach($PERM as $file => $arPerm)
foreach($arPerm as $code => $permission)
$currentPermission[$file][(preg_match('/^[0-9]+$/', $code)? "G".$code : $code)] = $permission;
}
示例6: array
<?php
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
die;
}
if (!CModule::IncludeModule("timeman")) {
return;
}
if (!WIZARD_IS_RERUN) {
$arAccessRights = array(WIZARD_EMPLOYEES_GROUP => 'N', WIZARD_PERSONNEL_DEPARTMENT_GROUP => 'R', WIZARD_DIRECTION_GROUP => 'T');
$arTaskIDs = array();
$dbRes = CTask::GetList(array(), array('MODULE_ID' => 'timeman', 'SYS' => 'Y', 'LETTER' => implode('|', $arAccessRights)));
while ($arRes = $dbRes->Fetch()) {
$arTaskIDs[$arRes['LETTER']] = $arRes['ID'];
}
$arTasksForModule = array();
foreach ($arAccessRights as $group => $letter) {
$APPLICATION->SetGroupRight('timeman', $group, $letter);
$arTasksForModule[$group] = array('ID' => $arTaskIDs[$letter]);
}
CGroup::SetTasksForModule('timeman', $arTasksForModule);
if (CModule::IncludeModule('iblock')) {
$fields_file = $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/timeman/install/fields.php";
if (file_exists($fields_file)) {
include $fields_file;
}
$dep = new CIBlockSection();
if ($ib = COption::GetOptionInt('intranet', 'iblock_structure', false)) {
$entity_id = 'IBLOCK_' . $ib . '_SECTION';
}
$arFields = array("UF_TM_TIME" => "16:00", "UF_TM_DAY" => 5);
示例7: strtolower
<?php
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
die;
}
global $DBType;
require_once $_SERVER['DOCUMENT_ROOT'] . "/bitrix/modules/main/classes/" . strtolower($DBType) . "/favorites.php";
__IncludeLang(GetLangFileName(dirname(__FILE__) . "/lang/", "/" . basename(__FILE__)));
//Change site name
$obSite = new CSite();
$obSite->Update("s1", array("NAME" => COption::GetOptionString("main", "site_name", GetMessage("DEFAULT_SITE_NAME"))));
//Edit profile task
$editProfileTask = false;
$dbResult = CTask::GetList(array(), array("NAME" => "main_change_profile"));
if ($arTask = $dbResult->Fetch()) {
$editProfileTask = $arTask["ID"];
}
//admin security policy
$z = CGroup::GetByID(1);
if ($res = $z->Fetch()) {
if ($res["SECURITY_POLICY"] == "") {
$group = new CGroup();
$arGroupPolicy = array("SESSION_TIMEOUT" => 15, "SESSION_IP_MASK" => "255.255.255.255", "MAX_STORE_NUM" => 1, "STORE_IP_MASK" => "255.255.255.255", "STORE_TIMEOUT" => 60 * 24 * 3, "CHECKWORD_TIMEOUT" => 60, "PASSWORD_LENGTH" => 10, "PASSWORD_UPPERCASE" => "Y", "PASSWORD_LOWERCASE" => "Y", "PASSWORD_DIGITS" => "Y", "PASSWORD_PUNCTUATION" => "Y", "LOGIN_ATTEMPTS" => 3);
$arFields = array("SECURITY_POLICY" => serialize($arGroupPolicy));
$group->Update(1, $arFields);
}
}
//Registered users group
$dbResult = CGroup::GetList($by, $order, array("STRING_ID" => "REGISTERED_USERS"));
if ($dbResult->Fetch()) {
return;
示例8: SetTaskSecurity
function SetTaskSecurity($task_id, $module_id, $arOperations, $letter = '')
{
$ID = 0;
$dbr_task = CTask::GetList(array(), array('NAME' => $task_id, 'MODULE_ID' => $module_id, "BINDING" => 'module'));
if ($ar_task = $dbr_task->Fetch()) {
if ($ar_task['SYS'] == 'Y') {
return false;
}
$ID = $ar_task['ID'];
}
$arFields = array("NAME" => $task_id, "LETTER" => $letter, "BINDING" => 'module', "MODULE_ID" => $module_id);
if ($ID > 0) {
$res = CTask::Update($arFields, $ID);
} else {
$ID = CTask::Add($arFields);
$res = $ID > 0;
if ($res) {
$arBackup = CControllerClient::GetBackup();
$arBackup['security_task'][] = $ID;
CControllerClient::SetBackup($arBackup);
}
}
if ($res) {
CTask::SetOperations($ID, $arOperations, true);
}
}
示例9: GetIdByLetter
function GetIdByLetter($letter, $module, $binding = 'module')
{
global $DB;
static $TASK_LETTER_CACHE = array();
if (!$letter) {
return false;
}
if (!isset($TASK_LETTER_CACHE)) {
$TASK_LETTER_CACHE = array();
}
$k = strtoupper($letter . '_' . $module . '_' . $binding);
if (isset($TASK_LETTER_CACHE[$k])) {
return $TASK_LETTER_CACHE[$k];
}
$z = CTask::GetList(array(), array("LETTER" => $letter, "MODULE_ID" => $module, "BINDING" => $binding, "SYS" => "Y"));
if ($r = $z->Fetch()) {
$TASK_LETTER_CACHE[$k] = $r['ID'];
if ($r['ID']) {
return $r['ID'];
}
}
return false;
}
示例10: while
while ($arRes = $db_groups->Fetch()) {
$arGroups[] = $arRes;
}
if ($REQUEST_METHOD == "POST" && strlen($saveperm) > 0 && check_bitrix_sessid()) {
$arTaskPerm = array();
for ($i = 0, $l = count($arGroups); $i < $l; $i++) {
$id = $arGroups[$i]['ID'];
if (isset($_POST['g_' . $id]) && intVal($_POST['g_' . $id]) > 0) {
$arTaskPerm[$id] = intVal($_POST['g_' . $id]);
}
}
CMedialib::SaveAccessPermissions($curColId, $arTaskPerm);
}
$arGroupTask = CMedialib::GetAccessPermissionsArray($curColId, $ctRes['Collections']);
$arTasks = array();
$res = CTask::GetList(array('LETTER' => 'asc'), array('MODULE_ID' => 'fileman', 'BINDING' => 'medialib'));
while ($arRes = $res->Fetch()) {
$name = $arRes['TITLE'];
if (strlen($name) == 0) {
$name = $arRes['NAME'];
}
$arTasks[$arRes['ID']] = array('title' => $name, 'letter' => $arRes['LETTER']);
}
?>
<form method="POST" action="<?php
echo $APPLICATION->GetCurPage();
?>
?" name="ml_access_form">
<input type="hidden" name="site" value="<?php
echo htmlspecialcharsbx($site);
示例11: foreach
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()) {
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;
示例12: GetTasks
static function GetTasks()
{
static $arTasks = null;
if ($arTasks == null) {
$rs = CTask::GetList(array("LETTER" => "asc"), array("MODULE_ID" => "iblock", "BINDING" => "iblock", "SYS" => "Y"));
$arTasks = array();
while ($ar = $rs->Fetch()) {
$arTasks[$ar["LETTER"]] = $ar["ID"];
}
}
return $arTasks;
}
示例13: IncludeModuleLangFile
# mailto:sources@bitrixsoft.com #
##############################################
*/
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_before.php";
require_once $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/controller/prolog.php";
$MOD_RIGHT = $APPLICATION->GetGroupRight("controller");
if ($MOD_RIGHT < "W") {
$APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));
}
IncludeModuleLangFile(__FILE__);
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/controller/include.php";
$err_mess = "File: " . __FILE__ . "<br>Line: ";
$arThirdSettings = CControllerGroupSettings::Get3rdPartyOptions();
$subordinate_id = COperation::GetIDByName('edit_subordinate_users');
$arMainSubordinateTask = array();
$db_task = CTask::GetList(array("MODULE_ID" => "asc", "LETTER" => "asc"), array("BINDING" => 'module'));
while ($ar_task = $db_task->GetNext()) {
if (!isset($arTasksModules[$ar_task['MODULE_ID']])) {
$arTasksModules[$ar_task['MODULE_ID']] = array("reference" => array(), "reference_id" => array());
}
$arTasksModules[$ar_task['MODULE_ID']]["reference"][] = '[' . ($ar_task['LETTER'] ? $ar_task['LETTER'] : '..') . '] ' . CTask::GetLangTitle($ar_task['NAME']);
$arTasksModules[$ar_task['MODULE_ID']]["reference_id"][] = $ar_task['NAME'];
if ($ar_task['MODULE_ID'] == 'main') {
$arOpInTask = CTask::GetOperations($ar_task['ID']);
if (in_array($subordinate_id, $arOpInTask)) {
$arMainSubordinateTask[] = $ar_task['NAME'];
}
}
}
if ($REQUEST_METHOD == "POST" && $COUNTER_UPDATE_PERIOD_TYPE != '' && (strlen($save) > 0 || strlen($apply) > 0) && $MOD_RIGHT >= "W") {
if ($COUNTER_UPDATE_PERIOD_TYPE == 'H') {
示例14: loadIblockTasks
protected function loadIblockTasks()
{
if ($this->iblockTasks !== null) {
return;
}
$rs = CTask::GetList(array("LETTER" => "asc"), array("MODULE_ID" => "iblock", "BINDING" => "iblock"));
$this->iblockTasks = array();
while ($row = $rs->fetch()) {
$this->iblockTasks[$row["ID"]] = $row;
}
return;
}
示例15: GetAccessTasks
public static function GetAccessTasks($binging = 'calendar_section')
{
if (is_array(self::$arAccessTask[$binging]))
return self::$arAccessTask[$binging];
$bIntranet = self::IsIntranetEnabled();
$arTasks = Array();
$res = CTask::GetList(Array('ID' => 'asc'), Array('MODULE_ID' => 'calendar', 'BINDING' => $binging));
while($arRes = $res->Fetch())
{
if (!$bIntranet && (strtolower($arRes['NAME']) == 'calendar_view_time' || strtolower($arRes['NAME']) == 'calendar_view_title'))
continue;
$name = '';
if ($arRes['SYS'])
$name = GetMessage('TASK_NAME_'.strtoupper($arRes['NAME']));
if (strlen($name) == 0)
$name = $arRes['NAME'];
$arTasks[$arRes['ID']] = array(
'name' => $arRes['NAME'],
'title' => $name
);
}
self::$arAccessTask[$binging] = $arTasks;
return $arTasks;
}