當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。