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


PHP CUserCounter::GetLastDate方法代码示例

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


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

示例1: elseif

     } elseif ($arParams["FILTER"] == "bizproc") {
         $arFilter["EVENT_ID"] = "lists_new_element";
     }
 }
 if (intval($arParams["GROUP_ID"]) > 0) {
     $arResult["COUNTER_TYPE"] = "SG" . intval($arParams["GROUP_ID"]);
     $arParams["SET_LOG_PAGE_CACHE"] = "Y";
     $arParams["USE_FOLLOW"] = "N";
     $arParams["SET_LOG_COUNTER"] = "N";
 } elseif ($arParams["IS_CRM"] == "Y" && $arParams["SET_LOG_COUNTER"] != "N") {
     $arResult["COUNTER_TYPE"] = "CRM_**";
 } else {
     $arResult["COUNTER_TYPE"] = "**";
 }
 if ($arParams["SET_LOG_COUNTER"] == "Y") {
     $arResult["LAST_LOG_TS"] = CUserCounter::GetLastDate($GLOBALS["USER"]->GetID(), $arResult["COUNTER_TYPE"]);
     $counterLastDate = ConvertTimeStamp($arResult["LAST_LOG_TS"], "FULL");
     if ($arResult["LAST_LOG_TS"] == 0) {
         $arResult["LAST_LOG_TS"] = 1;
     } else {
         //We substruct TimeZone offset in order to get server time
         //because of template compatibility
         $arResult["LAST_LOG_TS"] -= $arResult["TZ_OFFSET"];
     }
 } elseif ($arResult["COUNTER_TYPE"] == "**" && ($arParams["LOG_ID"] > 0 || $arResult["AJAX_CALL"]) && intval($_REQUEST["LAST_LOG_TS"]) > 0) {
     $arResult["LAST_LOG_TS"] = intval($_REQUEST["LAST_LOG_TS"]);
 }
 $arListParams = array("CHECK_RIGHTS" => "Y", "USE_SUBSCRIBE" => "N");
 if (CModule::IncludeModule('extranet') && CExtranet::IsExtranetSite()) {
     $arListParams["MY_GROUPS_ONLY"] = "Y";
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例2: intval

 if ((!isset($arParams["USE_FAVORITES"]) || $arParams["USE_FAVORITES"] != "N") && $arParams["FAVORITES"] == "Y") {
     $arFilter[">FAVORITES_USER_ID"] = 0;
     $arParams["SET_LOG_COUNTER"] = $arParams["SET_LOG_PAGE_CACHE"] = "N";
 }
 $arParams["NAME_TEMPLATE"] = $arParams["NAME_TEMPLATE_WO_NOBR"];
 if (intval($arParams["GROUP_ID"]) > 0) {
     $arResult["COUNTER_TYPE"] = "SG" . intval($arParams["GROUP_ID"]);
 } elseif ($arParams["IS_CRM"] == "Y" && ($arParams["SET_LOG_COUNTER"] != "N" || $arParams["SET_LOG_PAGE_CACHE"] != "N")) {
     $arResult["COUNTER_TYPE"] = is_set($arParams["CUSTOM_DATA"]) && is_set($arParams["CUSTOM_DATA"]["CRM_PRESET_TOP_ID"]) && $arParams["CUSTOM_DATA"]["CRM_PRESET_TOP_ID"] == "all" ? "CRM_**_ALL" : "CRM_**";
 } elseif ($arParams["EXACT_EVENT_ID"] == "blog_post") {
     $arResult["COUNTER_TYPE"] = "blog_post";
 } else {
     $arResult["COUNTER_TYPE"] = "**";
 }
 if ($arParams["LOG_ID"] <= 0 && (!$arResult["AJAX_CALL"] || $arResult["bReload"])) {
     $arResult["LAST_LOG_TS"] = CUserCounter::GetLastDate($user_id, $arResult["COUNTER_TYPE"]);
     if ($arResult["LAST_LOG_TS"] == 0) {
         $arResult["LAST_LOG_TS"] = 1;
     } else {
         //We substruct TimeZone offset in order to get server time
         //because of template compatibility
         $arResult["LAST_LOG_TS"] -= $arResult["TZ_OFFSET"];
     }
 } else {
     $arResult["LAST_LOG_TS"] = intval($_REQUEST["ts"]);
 }
 if ($arParams["IS_CRM"] == "Y") {
     $arListParams = array("IS_CRM" => "Y", "CHECK_CRM_RIGHTS" => "Y");
     $filterParams = array("ENTITY_TYPE" => $arParams["CRM_ENTITY_TYPE"], "ENTITY_ID" => $arParams["CRM_ENTITY_ID"], "AFFECTED_TYPES" => array(), "OPTIONS" => array("CUSTOM_DATA" => isset($arParams["CUSTOM_DATA"]) && is_array($arParams["CUSTOM_DATA"]) ? $arParams["CUSTOM_DATA"] : array()));
     $events = GetModuleEvents("socialnetwork", "OnBuildSocNetLogFilter");
     while ($arEvent = $events->Fetch()) {
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:component.php

示例3: GetLastDate

 public static function GetLastDate($code, $site_id = SITE_ID)
 {
     return CUserCounter::GetLastDate(CUserCounter::SYSTEM_USER_ID, $code, $site_id);
 }
开发者ID:Satariall,项目名称:izurit,代码行数:4,代码来源:global_counter.php


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