本文整理汇总了PHP中CIntranetUtils::GetIBlockSectionChildren方法的典型用法代码示例。如果您正苦于以下问题:PHP CIntranetUtils::GetIBlockSectionChildren方法的具体用法?PHP CIntranetUtils::GetIBlockSectionChildren怎么用?PHP CIntranetUtils::GetIBlockSectionChildren使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CIntranetUtils
的用法示例。
在下文中一共展示了CIntranetUtils::GetIBlockSectionChildren方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: intval
CUserOptions::SetOption("timeman.report.weekly", "department_id", intval($_REQUEST['department']), false, $USER->GetID());
$page = intval($_REQUEST['page']);
if ($page <= 0) {
$page = 1;
}
$arAccessUsers = CTimeMan::GetAccess();
if (count($arAccessUsers['READ']) > 0) {
$bCanEditAll = in_array('*', $arAccessUsers['WRITE']);
$date_to = ConvertTimeStamp($_POST["tf"]);
$date_from = ConvertTimeStamp($_POST["ts"]);
$datefomat = CSite::GetDateFormat("SHORT", SITE_ID);
$bCanReadAll = in_array('*', $arAccessUsers['READ']);
$section_id = 0;
if ($_REQUEST['department']) {
$section_id = intval($_REQUEST['department']);
$arFilter['UF_DEPARTMENT'] = CIntranetUtils::GetIBlockSectionChildren(intval($_REQUEST['department']));
}
if (!$bShowAll) {
$arDirectUsers = CTimeMan::GetDirectAccess();
if (!$bCanReadAll) {
$arAccessUsers['READ'] = array_intersect($arAccessUsers['READ'], $arDirectUsers);
} else {
$arAccessUsers['READ'] = $arDirectUsers;
}
//$arAccessUsers['READ'] = $arDirectUsers;
$bCanReadAll = false;
if (count($arAccessUsers['READ']) <= 0) {
break;
}
}
$arFilter[] = array("LOGIC" => "OR", array("LOGIC" => "AND", "<DATE_TO" => $date_to, ">=DATE_TO" => $date_from), array("LOGIC" => "AND", "<DATE_FROM" => $date_to, ">=DATE_FROM" => $date_from));
示例2: GetSubordinateDepartmentsOld
function GetSubordinateDepartmentsOld($USER_ID = null, $bRecursive = false)
{
global $USER;
$arDpts = array();
if (!$USER_ID) {
$USER_ID = $USER->GetID();
}
if ($USER_ID) {
$dbRes = CIntranetUtils::GetSubordinateDepartmentsList($USER_ID);
while ($arRes = $dbRes->Fetch()) {
$arDpts[] = $arRes['ID'];
}
if ($bRecursive && count($arDpts) > 0) {
$arDpts = CIntranetUtils::GetIBlockSectionChildren($arDpts);
}
}
return $arDpts;
}
示例3: array
$arParams['mode'] = 'now';
}
if (!isset($arParams["CACHE_TIME"])) {
$arParams["CACHE_TIME"] = 3600;
}
if (!isset($arParams["CACHE_TYPE"])) {
$arParams["CACHE_TYPE"] = 'A';
}
if ($this->StartResultCache(false, $arParams['mode'] . '|' . ($arParams['DEPARTMENT'] > 0 ? $arParams['DEPARTMENT'] : ''))) {
global $CACHE_MANAGER;
$CACHE_MANAGER->RegisterTag('intranet_users');
$format = $DB->DateFormatToPHP(CLang::GetDateFormat("SHORT"));
$USERS = false;
if ($arParams['DEPARTMENT']) {
$USERS = array();
$dbRes = CUser::GetList($by = 'ID', $order = "ASC", array('ACTIVE' => 'Y', 'UF_DEPARTMENT' => CIntranetUtils::GetIBlockSectionChildren($arParams['DEPARTMENT'])));
while ($arRes = $dbRes->Fetch()) {
$USERS[] = $arRes['ID'];
}
}
switch ($arParams['mode']) {
case 'today':
$date_start = $date_finish = date($format);
break;
case 'tomorrow':
$date_start = $date_finish = date($format, strtotime('+1 day'));
break;
case 'after_tomorrow':
$date_start = $date_finish = date($format, strtotime('+2 day'));
break;
case 'now':
示例4: __getFilter
private function __getFilter()
{
$arFilter = null;
if ($this->_checkAccess()) {
$ts = strtotime(date('Y-m-01', $this->ts));
$ts_finish = strtotime('+1 month', $ts);
$date_start = ConvertTimeStamp($ts, 'FULL');
$date_finish = ConvertTimeStamp($ts_finish, 'FULL');
$arFilter = array('>DATE_START' => $date_start, '<DATE_START' => $date_finish, '+<DATE_FINISH' => $date_finish, 'USER_ACTIVE' => 'Y');
if ($this->department > 0) {
$arFilter['UF_DEPARTMENT'] = CIntranetUtils::GetIBlockSectionChildren($this->department);
}
}
return $arFilter;
}
示例5: array
$arParams['DEPARTMENT'] = $arResult['CURRENT_USER']['DEPARTMENT_TOP'];
}
} else {
$arParams['bShowFilter'] = false;
}
}
$dbEnum = CIBlockPropertyEnum::GetList(array("DEF" => "DESC", "SORT" => "ASC"), array('IBLOCK_ID' => $arParams['IBLOCK_ID'], 'CODE' => 'STATE', 'EXTERNAL_ID' => 'ACCEPTED'));
if ($arEnum = $dbEnum->Fetch()) {
$arFilter['PROPERTY_STATE'] = $arEnum['ID'];
} else {
// are dinos alive?
$arFilter['PREVIEW_TEXT'] = '%' . GetMessage('INTR_ISIN_ACCEPTED') . '%';
}
unset($dbEnum);
if ($arParams['DEPARTMENT']) {
$arFilter['PROPERTY_DEPARTMENT'] = CIntranetUtils::GetIBlockSectionChildren($arParams['DEPARTMENT']);
}
$arResult['USERS'] = array();
$arResult['ENTRIES'] = array();
$arUserIDs = array();
$dbEntries = CIBlockElement::GetList(array('active_from' => 'desc'), $arFilter, false, array('nTopCount' => $arParams['NUM_USERS']), array('IBLOCK_ID', 'NAME', 'DATE_ACTIVE_FROM', 'PROPERTY_USER'));
while ($arRes = $dbEntries->Fetch()) {
$arUserIDs[] = $arRes['PROPERTY_USER_VALUE'];
$arResult['ENTRIES'][] = $arRes;
}
unset($dbEntries);
if (count($arResult['ENTRIES']) > 0) {
$dbUsers = CUser::GetList($by = 'id', $order = 'asc', array('ID' => implode('|', $arUserIDs), '!UF_DEPARTMENT' => false, 'ACTIVE' => 'Y'));
while ($arUser = $dbUsers->Fetch()) {
$CACHE_MANAGER->RegisterTag('intranet_user_' . $arUser['ID']);
$arUser['DETAIL_URL'] = str_replace(array('#ID#', '#USER_ID#'), $arUser['ID'], $arParams['DETAIL_URL']);
示例6: fillFilter
protected function fillFilter()
{
if (CModule::IncludeModule('extranet') && CExtranet::IsExtranetSite()) {
$this->fillFilterByExtranet();
} else {
$this->fillFilterByIntranet();
}
if ($this->arParams['FILTER_1C_USERS'] == 'Y') {
$this->arFilter['UF_1C'] = 1;
}
if ($this->externalValues['UF_DEPARTMENT']) {
$this->arFilter['UF_DEPARTMENT'] = $this->arParams['FILTER_SECTION_CURONLY'] == 'N' ? CIntranetUtils::GetIBlockSectionChildren($this->externalValues['UF_DEPARTMENT']) : $this->externalValues['UF_DEPARTMENT'];
} elseif ((!CModule::IncludeModule('extranet') || !CExtranet::IsExtranetSite()) && $this->arParams["SHOW_USER"] != "all") {
// only employees for an intranet site
if ($this->arParams["SHOW_USER"] == "extranet") {
$this->arFilter["UF_DEPARTMENT"] = false;
} elseif ($this->arParams["SHOW_USER"] != "inactive" && $this->arParams["SHOW_USER"] != "fired") {
$this->arFilter["!UF_DEPARTMENT"] = false;
}
}
//items equal to FALSE (see converting to boolean in PHP) will be removed (see array_filter()). After merge with $this->arFilter
$this->arFilter = array_merge($this->arFilter, array_filter(array('WORK_POSITION' => $this->externalValues['POST'], 'WORK_PHONE' => $this->externalValues['PHONE'], 'UF_PHONE_INNER' => $this->externalValues['UF_PHONE_INNER'], 'WORK_COMPANY' => $this->externalValues['COMPANY'], 'EMAIL' => $this->externalValues['EMAIL'], 'NAME' => $this->externalValues['FIO'], 'KEYWORDS' => $this->externalValues['KEYWORDS'], 'LAST_NAME' => $this->externalValues['LAST_NAME'], 'LAST_NAME_RANGE' => $this->externalValues['LAST_NAME_RANGE'])));
if ($this->externalValues['IS_ONLINE'] == 'Y') {
$this->arFilter['LAST_ACTIVITY'] = static::LAST_ACTIVITY;
}
if ($this->externalValues['LAST_NAME']) {
$this->arFilter['LAST_NAME_EXACT_MATCH'] = 'Y';
}
$isEnoughFiltered = (bool) array_intersect(array_keys($this->arFilter), array('WORK_POSITION', 'WORK_PHONE', 'UF_PHONE_INNER', 'WORK_COMPANY', 'EMAIL', 'NAME', 'KEYWORDS', 'LAST_NAME', 'LAST_NAME_RANGE', 'LAST_ACTIVITY', 'UF_DEPARTMENT'));
if ($this->arFilter['LAST_NAME_RANGE']) {
//input format: a-z (letter - letter)
$letterRange = explode('-', $this->arFilter['LAST_NAME_RANGE'], 2);
$startLetterRange = array_shift($letterRange);
$endLetterRange = array_shift($letterRange);
$this->arFilter[] = array('LOGIC' => 'OR', array('><F_LAST_NAME' => array(toUpper($startLetterRange), toUpper($endLetterRange))), array('><F_LAST_NAME' => array(toLower($startLetterRange), toLower($endLetterRange))));
unset($this->arFilter['LAST_NAME_RANGE']);
}
return $isEnoughFiltered;
}