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


PHP CDBResult::NavStringForCache方法代码示例

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


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

示例1: trim

}
$arParams["DATE_TIME_FORMAT"] = trim(empty($arParams["DATE_TIME_FORMAT"]) ? $DB->DateFormatToPHP(CSite::GetDateFormat("FULL")) : $arParams["DATE_TIME_FORMAT"]);
if (empty($arParams["GROUP_ID"]) || !empty($arParams["GROUP_ID"]) && in_array($arParams["ID"], $arParams["GROUP_ID"]) || $bShowAll) {
    $arGroup = CBlogGroup::GetByID($arParams["ID"]);
    if (!empty($arGroup) || $bShowAll) {
        $arGroup = CBlogTools::htmlspecialcharsExArray($arGroup);
        $arResult["GROUP"] = $arGroup;
        if ($arParams["SET_TITLE"] == "Y") {
            if ($bShowAll) {
                $APPLICATION->SetTitle(GetMessage("B_B_GR_TITLE"));
            } else {
                $APPLICATION->SetTitle(GetMessage("B_B_GR_TITLE_NAME", array("#group#" => $arGroup["NAME"])));
            }
        }
        $cache = new CPHPCache();
        $cache_id = "blog_groups_" . serialize($arParams) . "_" . CDBResult::NavStringForCache($arParams["BLOG_COUNT"]);
        if (($tzOffset = CTimeZone::GetOffset()) != 0) {
            $cache_id .= "_" . $tzOffset;
        }
        $cache_path = "/" . SITE_ID . "/blog/groups/" . $arParams["ID"] . "/";
        if ($arParams["CACHE_TIME"] > 0 && $cache->InitCache($arParams["CACHE_TIME"], $cache_id, $cache_path)) {
            $Vars = $cache->GetVars();
            foreach ($Vars["arResult"] as $k => $v) {
                $arResult[$k] = $v;
            }
            CBitrixComponentTemplate::ApplyCachedData($Vars["templateCachedData"]);
            $cache->Output();
        } else {
            if ($arParams["CACHE_TIME"] > 0) {
                $cache->StartDataCache($arParams["CACHE_TIME"], $cache_id, $cache_path);
            }
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:component.php

示例2: is_string

    return;
}
$arBlog = $arResult["BLOG"];
$tmpVal = COption::GetOptionInt("idea", "blog_group_id", false, SITE_ID);
if (intval($arBlog["GROUP_ID"]) > 0 && (!$tmpVal || $tmpVal != intval($arBlog["GROUP_ID"]))) {
    COption::SetOptionInt("idea", "blog_group_id", $arBlog["GROUP_ID"], false, SITE_ID);
}
$arFilter = is_string($arParams["FILTER_NAME"]) && preg_match("/^[A-Za-z_][A-Za-z01-9_]*\$/i", $arParams["FILTER_NAME"]) ? $GLOBALS[$arParams["FILTER_NAME"]] : array();
$arFilter = is_array($arFilter) ? $arFilter : array();
$arResult["ERROR_MESSAGE"] = array();
$arResultNFCache = array("OK_MESSAGE" => array(), "ERROR_MESSAGE" => array());
$user_id = intval($USER->GetID());
$arResult["PostPerm"] = CBlog::GetBlogUserPostPerms($arResult["BLOG"]["ID"], $user_id);
$arUserGroups = $GLOBALS["USER"]->IsAuthorized() ? CBlogUser::GetUserGroups($user_id, $arParams["BLOG_URL"], "Y", BLOG_BY_USER_ID, "URL") : array(1);
sort($arUserGroups);
$cache_id = "blog_blog_message_" . serialize(array($arParams["BLOG_URL"], $arParams["RATING_TEMPLATE"], $arParams["SORT_BY1"] => $arParams["SORT_ORDER1"], $arParams["SORT_BY2"] => $arParams["SORT_ORDER2"], $arParams["IBLOCK_CATEGORIES"], $arParams["EXT_FILTER"], $arParams["PATH_TO_BLOG"], $arParams["POST_PROPERTY_LIST"], $arParams["DATE_TIME_FORMAT"], $arParams["NAV_TEMPLATE"], $arParams["GROUP_ID"], $arParams["NAME_TEMPLATE"], $arParams["SHOW_LOGIN"], $arParams["IMAGE_MAX_WIDTH"], $arParams["IMAGE_MAX_HEIGHT"], $arParams["ALLOW_POST_CODE"], $arParams["CATEGORY_ID"], CDBResult::NavStringForCache($arParams["MESSAGE_COUNT"]), $arUserGroups, $arResult["PostPerm"], $arResult["IDEA_MODERATOR"]));
if (!isset($_GET["PAGEN_1"]) || IntVal($_GET["PAGEN_1"]) < 1) {
    $CACHE_TIME = $arParams["CACHE_TIME"];
    $cache_path = "/" . SITE_ID . "/idea/" . $arBlog["ID"] . "/first_page/";
} else {
    $CACHE_TIME = $arParams["CACHE_TIME_LONG"];
    $cache_path = "/" . SITE_ID . "/idea/" . $arBlog["ID"] . "/pages/" . IntVal($_GET["PAGEN_1"]) . "/";
}
/********************************************************************
				/Default params
********************************************************************/
/********************************************************************
				Actions
********************************************************************/
$postId = $_GET["del_id"] > 0 ? $_GET["del_id"] : ($_GET["hide_id"] > 0 ? $_GET["hide_id"] : $_GET["show_id"]);
if ($arResult["IDEA_MODERATOR"] && $postId > 0) {
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:component.php

示例3: array

    }
}
//*****************************************************************************************************//
// activation rating
CRatingsComponentsMain::GetShowRating($arParams);
if ($arResult["ShowResults"]) {
    $arMonths_r = array();
    for ($i = 1; $i <= 12; $i++) {
        $arMonths_r[$i] = ToLower(GetMessage('MONTH_' . $i . '_S'));
    }
    $iSize = 150;
    if ($arResult['CURRENT_VIEW'] == "icon") {
        $iSize = 100;
    }
    if (!$bFilter) {
        $cache_id = $this->GetName() . '|' . $arParams['ITEMS_COUNT'] . '|' . $by . '|' . $order . '|' . $iSize . '|' . $arParams["PATH_TO_USER"] . '|' . $arParams["PATH_TO_USER_FRIENDS_ADD"] . '|' . $arParams["PATH_TO_MESSAGE_FORM"] . '|' . $arParams["PATH_TO_MESSAGES_CHAT"] . '|' . $arParams['NAME_TEMPLATE'] . '|' . $bUseLogin . '|' . $arParams['SHOW_YEAR'] . '|' . implode(';', $arParams['USER_FIELDS_LIST']) . '|' . implode(';', $arParams['USER_PROPERTY_LIST']) . CDBResult::NavStringForCache($arParams['ITEMS_COUNT'], false);
        $obCache = new CPHPCache();
    }
    if ($arParams["SHOW_RATING"] == 'Y' && array_key_exists("RATING_ID", $arParams) && intval($arParams["RATING_ID"]) > 0) {
        $db_rating = CRatings::GetByID($arParams["RATING_ID"]);
        if ($arRating = $db_rating->GetNext()) {
            $arResult["RATING"]["NAME"] = $arRating["NAME"];
        }
    }
    if (!$bFilter && $obCache->InitCache($arParams['CACHE_TIME'], $cache_id)) {
        $vars = $obCache->GetVars();
        $arResult['SEARCH_RESULT'] = $vars['SEARCH_RESULT'];
        $arResult['NAV_STRING'] = $vars['NAV_STRING'];
        // recaclulating some user data
        foreach ($arResult['SEARCH_RESULT'] as $i => $arUser) {
            $arUser["SHOW_PROFILE_LINK"] = CSocNetUserPerms::CanPerformOperation($GLOBALS["USER"]->GetID(), $arUser["ID"], "viewprofile", CSocNetUser::IsCurrentUserModuleAdmin());
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:component.php

示例4: array

    if (CModule::IncludeModule("webdav") || CModule::IncludeModule("disk")) {
        $arParams["POST_PROPERTY_LIST"][] = "UF_BLOG_POST_FILE";
    } else {
        $arParams["POST_PROPERTY_LIST"][] = "UF_BLOG_POST_DOC";
    }
}
$UserGroupID = array(1);
if ($USER->IsAuthorized()) {
    $UserGroupID[] = 2;
}
if ($arParams["SET_TITLE"] == "Y") {
    $APPLICATION->SetTitle(GetMessage("BNPL_TITLE"));
}
$user_id = IntVal($USER->GetID());
$cache = new CPHPCache();
$cache_id = "blog_last_messages_" . serialize($arParams) . "_" . serialize($UserGroupID) . "_" . $USER->IsAdmin() . "_" . CDBResult::NavStringForCache($arParams["BLOG_COUNT"]);
if (($tzOffset = CTimeZone::GetOffset()) != 0) {
    $cache_id .= "_" . $tzOffset;
}
if ($arParams["USE_SOCNET"] == "Y") {
    $cache_id .= "_" . $user_id;
}
$cache_path = "/" . SITE_ID . "/blog/last_messages_list/";
if ($arParams["CACHE_TIME"] > 0 && $cache->InitCache($arParams["CACHE_TIME"], $cache_id, $cache_path)) {
    $Vars = $cache->GetVars();
    foreach ($Vars["arResult"] as $k => $v) {
        $arResult[$k] = $v;
    }
    CBitrixComponentTemplate::ApplyCachedData($Vars["templateCachedData"]);
    $cache->Output();
} else {
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:component.php

示例5: CPHPCache

             $arUserGroups[$j] = $tmpGroup;
         }
     }
 }
 $strUserGroups = "";
 for ($i = 0; $i < $numUserGroups; $i++) {
     $strUserGroups .= "_" . $arUserGroups[$i];
 }
 if (empty($arResult["BLOG"])) {
     $arResult["BLOG"] = CBlog::GetByUrl($arParams["BLOG_URL"], $arParams["GROUP_ID"]);
 }
 if (!empty($arResult["BLOG"]) && strlen($arResult["PostPerm"]) <= 0) {
     $arResult["PostPerm"] = CBlog::GetBlogUserPostPerms($arResult["BLOG"]["ID"], $user_id);
 }
 $cache = new CPHPCache();
 $cache_id = "blog_blog_message_" . serialize($arParams) . "_" . CDBResult::NavStringForCache($arParams["MESSAGE_COUNT"]) . "_" . $strUserGroups . "_" . $arResult["PostPerm"];
 if (($tzOffset = CTimeZone::GetOffset()) != 0) {
     $cache_id .= "_" . $tzOffset;
 }
 if ($arResult["PostPerm"] == BLOG_PERMS_WRITE) {
     $cache_id .= "_" . $user_id;
 }
 if (!empty($arResult["BLOG"])) {
     $arBlog = $arResult["BLOG"];
     if ($arBlog["ACTIVE"] == "Y") {
         if (!isset($_GET["PAGEN_1"]) || IntVal($_GET["PAGEN_1"]) < 1) {
             $CACHE_TIME = $arParams["CACHE_TIME"];
             $cache_path = "/" . SITE_ID . "/blog/" . $arBlog["URL"] . "/first_page/";
         } else {
             $CACHE_TIME = $arParams["CACHE_TIME_LONG"];
             $cache_path = "/" . SITE_ID . "/blog/" . $arBlog["URL"] . "/pages/" . IntVal($_GET["PAGEN_1"]) . "/";
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:component.php

示例6: GetMessage

                } else {
                    $strError = GetMessage("CATALOG_ERROR2BASKET") . ".";
                }
            }
        }
    }
}
if (strlen($strError) > 0) {
    ShowError($strError);
    return;
}
$arResult["SECTIONS"] = array();
/*************************************************************************
			Work with cache
*************************************************************************/
if ($this->StartResultCache(false, array($arrFilter, CDBResult::NavStringForCache($arParams["PAGE_ELEMENT_COUNT"]), $arParams["CACHE_GROUPS"] === "N" ? false : $USER->GetGroups()))) {
    global $CACHE_MANAGER;
    $arConvertParams = array();
    if ('Y' == $arParams['CONVERT_CURRENCY']) {
        if (!CModule::IncludeModule('currency')) {
            $arParams['CONVERT_CURRENCY'] = 'N';
            $arParams['CURRENCY_ID'] = '';
        } else {
            $arCurrencyInfo = CCurrency::GetByID($arParams['CURRENCY_ID']);
            if (!(is_array($arCurrencyInfo) && !empty($arCurrencyInfo))) {
                $arParams['CONVERT_CURRENCY'] = 'N';
                $arParams['CURRENCY_ID'] = '';
            } else {
                $arParams['CURRENCY_ID'] = $arCurrencyInfo['CURRENCY'];
                $arConvertParams['CURRENCY_ID'] = $arCurrencyInfo['CURRENCY'];
            }
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:component.php

示例7: elseif

        $arParams["PATH_TO_MESSAGES_CHAT"] = "/extranet/contacts/personal/messages/chat/#user_id#/";
    } elseif (!isset($arParams["PATH_TO_MESSAGES_CHAT"])) {
        $arParams["PATH_TO_MESSAGES_CHAT"] = "/club/messages/chat/#user_id#/";
    }
    $arParams["~PATH_TO_MESSAGES_CHAT"] = $arParams["PATH_TO_MESSAGES_CHAT"];
    if (!isset($arParams["PATH_TO_SONET_USER_PROFILE"]) && IsModuleInstalled("intranet")) {
        $arParams["PATH_TO_SONET_USER_PROFILE"] = "/extranet/contacts/personal/user/#user_id#/";
    } elseif (!isset($arParams["PATH_TO_SONET_USER_PROFILE"])) {
        $arParams["PATH_TO_SONET_USER_PROFILE"] = "/club/user/#user_id#/";
    }
}
if ($arParams["SET_TITLE"] == "Y") {
    $APPLICATION->SetTitle(GetMessage("EBNPL_TITLE"));
}
$cache = new CPHPCache();
$cache_id = "blog_last_messages_" . serialize($arParams) . "_" . $USER->GetID() . "_" . CDBResult::NavStringForCache($arParams["BLOG_COUNT"]) . "_extranet";
if (($tzOffset = CTimeZone::GetOffset()) != 0) {
    $cache_id .= "_" . $tzOffset;
}
$cache_path = "/" . SITE_ID . "/blog/last_messages_list/";
if ($arParams["CACHE_TIME"] > 0 && $cache->InitCache($arParams["CACHE_TIME"], $cache_id, $cache_path)) {
    $Vars = $cache->GetVars();
    foreach ($Vars["arResult"] as $k => $v) {
        $arResult[$k] = $v;
    }
    CBitrixComponentTemplate::ApplyCachedData($Vars["templateCachedData"]);
    $cache->Output();
} else {
    if ($arParams["CACHE_TIME"] > 0) {
        $cache->StartDataCache($arParams["CACHE_TIME"], $cache_id, $cache_path);
    }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例8: unserialize

}
if (!array_key_exists("USER_PROPERTY_TOOLTIP", $arParams)) {
    $arParams["USER_PROPERTY_TOOLTIP"] = unserialize(COption::GetOptionString("socialnetwork", "tooltip_properties", $arTooltipPropertiesDefault));
}
if (!array_key_exists("PATH_TO_CONPANY_DEPARTMENT", $arParams)) {
    $arParams["PATH_TO_CONPANY_DEPARTMENT"] = "/company/structure.php?set_filter_structure=Y&structure_UF_DEPARTMENT=#ID#";
}
$IBLOCK_PERMISSION = CIBlock::GetPermission($arParams['IBLOCK_ID']);
$arParams['bAdmin'] = $IBLOCK_PERMISSION >= 'U';
$DEPARTMENT = intval($_REQUEST['department']);
$arParams['bCache'] = $arParams['CACHE_TYPE'] == 'Y' && $arParams['CACHE_TIME'] > 0;
// && $DEPARTMENT <= 0;
CPageOption::SetOptionString("main", "nav_page_in_session", "N");
if ($arParams['bCache']) {
    $cache_dir = '/' . SITE_ID . $this->GetRelativePath() . '/' . trim(CDBResult::NavStringForCache($arParams['NUM_USERS'], false), '|');
    $cache_id = $this->GetName() . '|' . $arParams['NUM_USERS'] . '|' . $arParams['IBLOCK_ID'] . '|' . (is_array($arParams['USER_PROPERTY']) ? implode(';', $arParams['USER_PROPERTY']) : '') . CDBResult::NavStringForCache($arParams['NUM_USERS'], false);
    if ($DEPARTMENT) {
        $cache_dir .= '/' . $DEPARTMENT;
        $cache_id .= '|dpt' . $DEPARTMENT;
    }
    $obCache = new CPHPCache();
}
if ($arParams['bCache'] && $obCache->InitCache($arParams['CACHE_TIME'], $cache_id, $cache_dir)) {
    $bDataFromCache = true;
    $vars = $obCache->GetVars();
    $arResult['ENTRIES'] = $vars['ENTRIES'];
    $arResult['ENTRIES_NAV'] = $vars['ENTRIES_NAV'];
    $arResult['DEPARTMENTS'] = $vars['DEPARTMENTS'];
    $arResult['USERS'] = $vars['USERS'];
} else {
    $bDataFromCache = false;
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例9: count

    return;
}
$arParams['bCache'] = $cnt_start == count($arFilter) && !$bExcel && $arParams['CACHE_TYPE'] == 'Y' && $arParams['CACHE_TIME'] > 0;
$arResult['FILTER_VALUES'] = $arFilter;
if (!$bExcel && $bNav) {
    CPageOption::SetOptionString("main", "nav_page_in_session", "N");
}
if ($arParams['bCache']) {
    $cache_dir = '/' . SITE_ID . $this->GetRelativePath();
    $cache_dir .= '/' . substr(md5($cnt_start_cache_id), 0, 5);
    $cache_dir .= '/' . trim(CDBResult::NavStringForCache($arParams['USERS_PER_PAGE'], false), '|');
    $cache_id = $this->GetName() . '|' . SITE_ID;
    if (CModule::IncludeModule('extranet') && CExtranet::IsExtranetSite()) {
        $cache_id .= '|' . $USER->GetID() . '|' . $arParams['EXTRANET_TYPE'];
    }
    $cache_id .= CDBResult::NavStringForCache($arParams['USERS_PER_PAGE'], false);
    $cache_id .= $cnt_start_cache_id . "|" . $arParams['USERS_PER_PAGE'];
    $obCache = new CPHPCache();
}
if ($arParams['bCache'] && $obCache->InitCache($arParams['CACHE_TIME'], $cache_id, $cache_dir)) {
    $bFromCache = true;
    $vars = $obCache->GetVars();
    $arResult['USERS'] = $vars['USERS'];
    $arResult['DEPARTMENTS'] = $vars['DEPARTMENTS'];
    $arResult['DEPARTMENT_HEAD'] = $vars['DEPARTMENT_HEAD'];
    $arResult['USERS_NAV'] = $vars['USERS_NAV'];
    $strUserIDs = $vars['STR_USER_ID'];
} else {
    $bFromCache = false;
    if ($arParams['bCache']) {
        $obCache->StartDataCache();
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例10: initCache

 /**
  * Init CPHPCache and return status of initialization
  * @param $cntStartCacheId
  * @return bool
  */
 protected function initCache($cntStartCacheId)
 {
     $this->cacheDir = '/' . SITE_ID . $this->getRelativePath() . '/' . substr(md5($cntStartCacheId), 0, 5) . '/' . trim(CDBResult::NavStringForCache($this->arParams['USERS_PER_PAGE'], false), '|');
     $this->cacheId = $this->getName() . '|' . SITE_ID;
     if (CModule::IncludeModule('extranet') && CExtranet::IsExtranetSite()) {
         $this->cacheId .= '|' . $this->getUser()->GetID() . '|' . $this->arParams['EXTRANET_TYPE'];
     }
     $this->cacheId .= CDBResult::NavStringForCache($this->arParams['USERS_PER_PAGE'], false) . $cntStartCacheId . "|" . $this->arParams['USERS_PER_PAGE'];
     $this->obCache = new CPHPCache();
     return $this->obCache->initCache($this->arParams['CACHE_TIME'], $this->cacheId, $this->cacheDir);
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:16,代码来源:class.php


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