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


PHP CIntranetUtils::IsOnline方法代码示例

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


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

示例1: foreach

}
if ($arParams['bCache']) {
    $obCache->StartDataCache();
    global $CACHE_MANAGER;
    $CACHE_MANAGER->StartTagCache($cache_dir);
}
if (is_array($arResult['USERS'])) {
    foreach ($arResult['USERS'] as $key => $arUser) {
        if ($arResult['bUsersCached']) {
            $strUserIDs .= ($strUserIDs ? '|' : '') . $arUser['ID'];
        }
        if (!is_array($arCacheData[$arUser['ID']])) {
            $arCacheData[$arUser['ID']] = array();
        }
        if (!$arResult['bUsersCached']) {
            $arUser['IS_ONLINE'] = CIntranetUtils::IsOnline($arUser['LAST_ACTIVITY_DATE']);
        }
        $arUser['IS_BIRTHDAY'] = CIntranetUtils::IsToday($arUser['PERSONAL_BIRTHDAY']);
        $arUser['IS_FEATURED'] = true;
        if ($arUser['PERSONAL_PHOTO']) {
            $arImage = CIntranetUtils::InitImage($arUser['PERSONAL_PHOTO'], 100);
            $arUser['PERSONAL_PHOTO'] = $arImage['IMG'];
        }
        if ($bLoadDepartments && is_array($arUser['UF_DEPARTMENT']) && count($arUser['UF_DEPARTMENT']) > 0) {
            if (array_key_exists('UF_DEPARTMENT', $arCacheData[$arUser['ID']])) {
                $arUser['UF_DEPARTMENT'] = $arCacheData[$arUser['ID']]['UF_DEPARTMENT'];
            } else {
                $arUser['UF_DEPARTMENT'] = $arCacheData[$arUser['ID']]['UF_DEPARTMENT'] = CIntranetUtils::GetDepartmentsData($arUser['UF_DEPARTMENT']);
            }
        }
        $arResult['USERS'][$key] = $arUser;
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:result_modifier.php

示例2: foreach

if ($arResult['bUsersCached']) {
    $strUserIDs = '';
}
if ($arParams['bCache']) {
    $obCache->StartDataCache();
    global $CACHE_MANAGER;
    $CACHE_MANAGER->StartTagCache($cache_dir);
}
foreach ($arResult['USERS'] as $key => $arUser) {
    if ($arResult['bUsersCached']) {
        $strUserIDs .= ($strUserIDs ? '|' : '') . $arUser['ID'];
    }
    if (!is_array($arCacheData[$arUser['ID']])) {
        $arCacheData[$arUser['ID']] = array();
    }
    $arUser['IS_ONLINE'] = $arResult['bUsersCached'] ? false : CIntranetUtils::IsOnline($arUser['LAST_ACTIVITY_DATE']);
    $arUser['IS_BIRTHDAY'] = CIntranetUtils::IsToday($arUser['PERSONAL_BIRTHDAY']);
    if (array_key_exists('IS_ABSENT', $arCacheData[$arUser['ID']])) {
        $arUser['IS_ABSENT'] = $arCacheData[$arUser['ID']]['IS_ABSENT'];
    } else {
        $arUser['IS_ABSENT'] = $arCacheData[$arUser['ID']]['IS_ABSENT'] = CIntranetUtils::IsUserAbsent($arUser['ID']);
    }
    if (array_key_exists('IS_FEATURED', $arCacheData[$arUser['ID']])) {
        $arUser['IS_FEATURED'] = $arCacheData[$arUser['ID']]['IS_FEATURED'];
    } else {
        $arUser['IS_FEATURED'] = $arCacheData[$arUser['ID']]['IS_FEATURED'] = CIntranetUtils::IsUserHonoured($arUser['ID']);
    }
    if ($arUser['PERSONAL_PHOTO']) {
        $arImage = CIntranetUtils::InitImage($arUser['PERSONAL_PHOTO'], 100);
        $arUser['PERSONAL_PHOTO'] = $arImage['IMG'];
        //$arUser['PERSONAL_PHOTO'] = CFile::ShowImage($arUser['PERSONAL_PHOTO'], 100, 100);
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:result_modifier.php

示例3: foreach

}
if (count($arResult['USERS']) > 0) {
    foreach ($arResult['USERS'] as $USER_ID => $arUser) {
        $arResult['USERS'][$USER_ID]['IS_ABSENT'] = CIntranetUtils::IsUserAbsent($USER_ID);
    }
}
if ($bDataFromCache) {
    $dbRes = CUser::GetList($by = 'id', $order = 'asc', array('ID' => implode('|', array_keys($arResult['USERS'])), '!UF_DEPARTMENT' => false, 'LAST_ACTIVITY' => 120));
    while ($arRes = $dbRes->Fetch()) {
        $arResult['USERS'][$arRes['ID']]['IS_ONLINE'] = true;
    }
    unset($dbRes);
}
foreach ($arResult['USERS'] as $key => $arUser) {
    if (!$bDataFromCache) {
        $arResult['USERS']['IS_ONLINE'] = CIntranetUtils::IsOnline($arUser['LAST_ACTIVITY_DATE']);
    }
    $arUser['DETAIL_URL'] = str_replace(array('#ID#', '#USER_ID#'), $arUser['ID'], $arParams['DETAIL_URL']);
    $arUser['IS_BIRTHDAY'] = CIntranetUtils::IsToday($arUser['PERSONAL_BIRTHDAY']);
    // this component is an exception for this hack - such garbage isnt't so useless here
    //$arUser['ACTIVE'] = 'Y'; // simple hack to help not to catch useless garbage to a component cache
    if (!$arUser['PERSONAL_PHOTO']) {
        switch ($arUser['PERSONAL_GENDER']) {
            case "M":
                $suffix = "male";
                break;
            case "F":
                $suffix = "female";
                break;
            default:
                $suffix = "unknown";
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php


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