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


PHP CSocNetLogTools::FindFullSetEventIDByEventID方法代码示例

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


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

示例1: __SLEGetLogRecord

 function __SLEGetLogRecord($logID, $arParams, $arCurrentUserSubscribe, $current_page_date)
 {
     static $isExtranetInstalled, $isExtranetSite, $isExtranetUser, $arUserIdVisible, $arAvailableExtranetUserID, $isExtranetAdmin, $bCurrentUserIsAdmin, $arSocNetFeaturesSettings;
     if (!$isExtranetInstalled) {
         $isExtranetInstalled = CModule::IncludeModule("extranet") ? "Y" : "N";
         $isExtranetSite = $isExtranetInstalled == "Y" && CExtranet::IsExtranetSite() ? "Y" : "N";
         $isExtranetUser = $isExtranetInstalled == "Y" && !CExtranet::IsIntranetUser() ? "Y" : "N";
         $isExtranetAdmin = $isExtranetInstalled == "Y" && CExtranet::IsExtranetAdmin() ? "Y" : "N";
         $bCurrentUserIsAdmin = CSocNetUser::IsCurrentUserModuleAdmin();
         $arSocNetFeaturesSettings = CSocNetAllowed::GetAllowedFeatures();
         if ($isExtranetUser == "Y") {
             $arUserIdVisible = CExtranet::GetMyGroupsUsersSimple(SITE_ID);
         } elseif ($isExtranetInstalled == "Y" && $isExtranetUser != "Y") {
             if ($isExtranetAdmin == "Y" && $bCurrentUserIsAdmin) {
                 $arAvailableExtranetUserID = CExtranet::GetMyGroupsUsers(SITE_ID);
             } else {
                 $arAvailableExtranetUserID = CExtranet::GetMyGroupsUsersSimple(CExtranet::GetExtranetSiteID());
             }
         }
     }
     $cache_time = 31536000;
     $arEvent = array();
     $cache = new CPHPCache();
     $arCacheID = array();
     $arKeys = array("AVATAR_SIZE", "DESTINATION_LIMIT", "CHECK_PERMISSIONS_DEST", "NAME_TEMPLATE", "NAME_TEMPLATE_WO_NOBR", "SHOW_LOGIN", "DATE_TIME_FORMAT", "PATH_TO_USER", "PATH_TO_GROUP", "PATH_TO_CONPANY_DEPARTMENT");
     foreach ($arKeys as $param_key) {
         if (array_key_exists($param_key, $arParams)) {
             $arCacheID[$param_key] = $arParams[$param_key];
         } else {
             $arCacheID[$param_key] = false;
         }
     }
     $cache_id = "log_post_" . $logID . "_" . md5(serialize($arCacheID)) . "_" . SITE_TEMPLATE_ID . "_" . SITE_ID . "_" . LANGUAGE_ID . "_" . FORMAT_DATETIME . "_" . CTimeZone::GetOffset();
     $cache_path = "/sonet/log/" . intval(intval($logID) / 1000) . "/" . $logID . "/entry/";
     if (is_object($cache) && $cache->InitCache($cache_time, $cache_id, $cache_path)) {
         $arCacheVars = $cache->GetVars();
         $arEvent["FIELDS_FORMATTED"] = $arCacheVars["FIELDS_FORMATTED"];
         if (array_key_exists("CACHED_CSS_PATH", $arEvent["FIELDS_FORMATTED"])) {
             if (!is_array($arEvent["FIELDS_FORMATTED"]["CACHED_CSS_PATH"]) && strlen($arEvent["FIELDS_FORMATTED"]["CACHED_CSS_PATH"]) > 0) {
                 $GLOBALS['APPLICATION']->SetAdditionalCSS($arEvent["FIELDS_FORMATTED"]["CACHED_CSS_PATH"]);
             } elseif (is_array($arEvent["FIELDS_FORMATTED"]["CACHED_CSS_PATH"])) {
                 foreach ($arEvent["FIELDS_FORMATTED"]["CACHED_CSS_PATH"] as $css_path) {
                     $GLOBALS['APPLICATION']->SetAdditionalCSS($css_path);
                 }
             }
         }
         if (array_key_exists("CACHED_JS_PATH", $arEvent["FIELDS_FORMATTED"])) {
             if (!is_array($arEvent["FIELDS_FORMATTED"]["CACHED_JS_PATH"]) && $arEvent["FIELDS_FORMATTED"]["CACHED_JS_PATH"] !== '') {
                 $GLOBALS['APPLICATION']->AddHeadScript($arEvent["FIELDS_FORMATTED"]["CACHED_JS_PATH"]);
             } elseif (is_array($arEvent["FIELDS_FORMATTED"]["CACHED_JS_PATH"])) {
                 foreach ($arEvent["FIELDS_FORMATTED"]["CACHED_JS_PATH"] as $js_path) {
                     $GLOBALS['APPLICATION']->AddHeadScript($js_path);
                 }
             }
         }
     } else {
         if (is_object($cache)) {
             $cache->StartDataCache($cache_time, $cache_id, $cache_path);
         }
         $arFilter = array("ID" => $logID);
         $arListParams = array("CHECK_RIGHTS" => "N", "USE_FOLLOW" => "N", "USE_SUBSCRIBE" => "N");
         $arSelect = array("ID", "TMP_ID", "ENTITY_TYPE", "ENTITY_ID", "USER_ID", "EVENT_ID", "LOG_DATE", "LOG_UPDATE", "TITLE_TEMPLATE", "TITLE", "MESSAGE", "TEXT_MESSAGE", "URL", "MODULE_ID", "CALLBACK_FUNC", "EXTERNAL_ID", "SITE_ID", "PARAMS", "COMMENTS_COUNT", "ENABLE_COMMENTS", "SOURCE_ID", "GROUP_NAME", "GROUP_OWNER_ID", "GROUP_INITIATE_PERMS", "GROUP_VISIBLE", "GROUP_OPENED", "GROUP_IMAGE_ID", "USER_NAME", "USER_LAST_NAME", "USER_SECOND_NAME", "USER_LOGIN", "USER_PERSONAL_PHOTO", "USER_PERSONAL_GENDER", "CREATED_BY_NAME", "CREATED_BY_LAST_NAME", "CREATED_BY_SECOND_NAME", "CREATED_BY_LOGIN", "CREATED_BY_PERSONAL_PHOTO", "CREATED_BY_PERSONAL_GENDER", "RATING_TYPE_ID", "RATING_ENTITY_ID", "SOURCE_TYPE");
         $dbEvent = CSocNetLog::GetList(array(), $arFilter, false, false, $arSelect, $arListParams);
         if ($arEvent = $dbEvent->GetNext()) {
             if (defined("BX_COMP_MANAGED_CACHE")) {
                 $GLOBALS["CACHE_MANAGER"]->StartTagCache($cache_path);
                 $GLOBALS["CACHE_MANAGER"]->RegisterTag("USER_NAME_" . intval($arEvent["USER_ID"]));
                 $GLOBALS["CACHE_MANAGER"]->RegisterTag("SONET_LOG_" . intval($arEvent["ID"]));
                 if ($arEvent["ENTITY_TYPE"] == SONET_ENTITY_GROUP) {
                     $GLOBALS["CACHE_MANAGER"]->RegisterTag("sonet_group_" . $arEvent["ENTITY_ID"]);
                 }
             }
             $arEvent["EVENT_ID_FULLSET"] = CSocNetLogTools::FindFullSetEventIDByEventID($arEvent["EVENT_ID"]);
             if ($arEvent["ENTITY_TYPE"] == SONET_ENTITY_GROUP) {
                 static $arSiteWorkgroupsPage;
                 if (!$arSiteWorkgroupsPage && (IsModuleInstalled("extranet") || is_set($arEvent["URL"]) && strpos($arEvent["URL"], "#GROUPS_PATH#") !== false)) {
                     $rsSite = CSite::GetList($by = "sort", $order = "desc", array("ACTIVE" => "Y"));
                     while ($arSite = $rsSite->Fetch()) {
                         $arSiteWorkgroupsPage[$arSite["ID"]] = COption::GetOptionString("socialnetwork", "workgroups_page", $arSite["DIR"] . "workgroups/", $arSite["ID"]);
                     }
                 }
                 if (is_set($arEvent["URL"]) && isset($arSiteWorkgroupsPage[SITE_ID])) {
                     $arEvent["URL"] = str_replace("#GROUPS_PATH#", $arSiteWorkgroupsPage[SITE_ID], $arEvent["URL"]);
                 }
             }
             $arEventTmp = CSocNetLogTools::FindLogEventByID($arEvent["EVENT_ID"]);
             if ($arEventTmp && isset($arEventTmp["CLASS_FORMAT"]) && isset($arEventTmp["METHOD_FORMAT"])) {
                 $arEvent["UF"] = $GLOBALS["USER_FIELD_MANAGER"]->GetUserFields("SONET_LOG", $arEvent["ID"], LANGUAGE_ID);
                 $arEvent["FIELDS_FORMATTED"] = call_user_func(array($arEventTmp["CLASS_FORMAT"], $arEventTmp["METHOD_FORMAT"]), $arEvent, $arParams);
                 if (is_array($arEvent["FIELDS_FORMATTED"])) {
                     if (isset($arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"]) && is_array($arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"]) && isset($arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"]["MESSAGE"])) {
                         if (in_array($arEvent["EVENT_ID"], array('calendar'))) {
                             $arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"]["MESSAGE"] = htmlspecialcharsback($arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"]["MESSAGE"]);
                         } else {
                             $arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"]["MESSAGE"] = CSocNetTextParser::closetags(htmlspecialcharsback($arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"]["MESSAGE"]));
                         }
                     }
                     if (isset($arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"]) && is_array($arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"])) {
                         $arFields2Cache = array("URL", "STYLE", "DESTINATION", "DESTINATION_MORE", "TITLE_24", "TITLE_24_2", "TITLE_24_2_STYLE", "IS_IMPORTANT", "MESSAGE", "FOOTER_MESSAGE", "MESSAGE_TITLE_24", "DATETIME_FORMATTED", "LOG_DATE_FORMAT", "MENU", "COMMENT_URL");
                         foreach ($arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"] as $field => $value) {
//.........这里部分代码省略.........
开发者ID:webgksupport,项目名称:alpina,代码行数:101,代码来源:include.php

示例2: array

     }
 }
 if (!array_key_exists("COMMON_ALL", $arSubscribe) || !array_key_exists($strTmp, $arSubscribe["COMMON_ALL"]) || $arSubscribe["COMMON_ALL"][$strTmp] == "I") {
     $arSubscribe["COMMON_ALL"][$strTmp] = $value_default;
     $arSubscribe["COMMON_ALL"][$strTmp . "_INHERITED"] = true;
 }
 $fullset_event_id = CSocNetLogTools::FindFullSetEventIDByEventID($event_id);
 if ($fullset_event_id) {
     $arEvent = CSocNetLogTools::FindLogEventByID($fullset_event_id, $entity_type);
 } else {
     $arEvent = CSocNetLogTools::FindLogEventByID($event_id, $entity_type);
 }
 if (!$arEvent) {
     $arEvent = CSocNetLogTools::FindLogEventByCommentID($event_id);
     if ($arEvent) {
         $fullset_event_id = CSocNetLogTools::FindFullSetEventIDByEventID($arEvent["EVENT_ID"]);
         if ($fullset_event_id) {
             $arEvent = CSocNetLogTools::FindLogEventByID($fullset_event_id, $entity_type);
         }
     }
 }
 if ($arEvent) {
     $arSubscribe["EVENT"]["TITLE"] = $arEvent["ENTITIES"][$entity_type]["TITLE_SETTINGS"];
     if (array_key_exists("NAME_FORMATTED", $arEntityTmp) && strlen($arEntityTmp["NAME_FORMATTED"]) > 0) {
         $arSubscribe["EVENT"]["TITLE_1"] = str_replace(array("#TITLE#"), array(array_key_exists("~NAME_FORMATTED", $arEntityTmp) ? $arEntityTmp["~NAME_FORMATTED"] : $arEntityTmp["NAME_FORMATTED"]), $arEvent["ENTITIES"][$entity_type]["TITLE_SETTINGS_1"]);
         $arSubscribe["EVENT"]["TITLE_2"] = str_replace(array("#TITLE#"), array(array_key_exists("~NAME_FORMATTED", $arEntityTmp) ? $arEntityTmp["~NAME_FORMATTED"] : $arEntityTmp["NAME_FORMATTED"]), $arEvent["ENTITIES"][$entity_type]["TITLE_SETTINGS_2"]);
     }
 }
 if (array_key_exists($entity_type, $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"]) && array_key_exists("TITLE_SETTINGS_ALL", $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$entity_type]) && strlen($GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$entity_type]["TITLE_SETTINGS_ALL"]) > 0) {
     $arSubscribe["ALL"]["TITLE"] = $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$entity_type]["TITLE_SETTINGS_ALL"];
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:ajax.php

示例3: __SLMGetLogRecord

 function __SLMGetLogRecord($logID, $arParams, $current_page_date)
 {
     $cache_time = 31536000;
     $arEvent = array();
     $cache = new CPHPCache();
     $arCacheID = array();
     $arKeys = array("AVATAR_SIZE", "DESTINATION_LIMIT", "CHECK_PERMISSIONS_DEST", "NAME_TEMPLATE", "NAME_TEMPLATE_WO_NOBR", "SHOW_LOGIN", "DATE_TIME_FORMAT", "PATH_TO_USER", "PATH_TO_GROUP", "PATH_TO_CONPANY_DEPARTMENT");
     foreach ($arKeys as $param_key) {
         if (array_key_exists($param_key, $arParams)) {
             $arCacheID[$param_key] = $arParams[$param_key];
         } else {
             $arCacheID[$param_key] = false;
         }
     }
     $cache_id = "log_post_" . $logID . "_" . md5(serialize($arCacheID)) . "_" . SITE_TEMPLATE_ID . "_" . SITE_ID . "_" . LANGUAGE_ID . "_" . FORMAT_DATETIME . "_" . CTimeZone::GetOffset();
     $cache_path = "/sonet/log/" . intval(intval($logID) / 1000) . "/" . $logID . "/entry/";
     if (is_object($cache) && $cache->InitCache($cache_time, $cache_id, $cache_path)) {
         $arCacheVars = $cache->GetVars();
         $arEvent["FIELDS_FORMATTED"] = $arCacheVars["FIELDS_FORMATTED"];
         if (array_key_exists("EVENT", $arEvent["FIELDS_FORMATTED"]) && is_array($arEvent["FIELDS_FORMATTED"]["EVENT"])) {
             $arCommentEvent = CSocNetLogTools::FindLogCommentEventByLogEventID($arEvent["FIELDS_FORMATTED"]["EVENT"]["EVENT_ID"]);
         }
         if (array_key_exists("CACHED_CSS_PATH", $arEvent["FIELDS_FORMATTED"])) {
             if (!is_array($arEvent["FIELDS_FORMATTED"]["CACHED_CSS_PATH"]) && strlen($arEvent["FIELDS_FORMATTED"]["CACHED_CSS_PATH"]) > 0) {
                 $GLOBALS['APPLICATION']->SetAdditionalCSS($arEvent["FIELDS_FORMATTED"]["CACHED_CSS_PATH"]);
             } elseif (is_array($arEvent["FIELDS_FORMATTED"]["CACHED_CSS_PATH"])) {
                 foreach ($arEvent["FIELDS_FORMATTED"]["CACHED_CSS_PATH"] as $css_path) {
                     $GLOBALS['APPLICATION']->SetAdditionalCSS($css_path);
                 }
             }
         }
         if (array_key_exists("CACHED_JS_PATH", $arEvent["FIELDS_FORMATTED"])) {
             if (!is_array($arEvent["FIELDS_FORMATTED"]["CACHED_JS_PATH"]) && $arEvent["FIELDS_FORMATTED"]["CACHED_JS_PATH"] !== '') {
                 $GLOBALS['APPLICATION']->AddHeadScript($arEvent["FIELDS_FORMATTED"]["CACHED_JS_PATH"]);
             } elseif (is_array($arEvent["FIELDS_FORMATTED"]["CACHED_JS_PATH"])) {
                 foreach ($arEvent["FIELDS_FORMATTED"]["CACHED_JS_PATH"] as $js_path) {
                     $GLOBALS['APPLICATION']->AddHeadScript($js_path);
                 }
             }
         }
     } else {
         if (is_object($cache)) {
             $cache->StartDataCache($cache_time, $cache_id, $cache_path);
         }
         $arFilter = array("ID" => $logID);
         $arListParams = array("CHECK_RIGHTS" => "N", "USE_FOLLOW" => "N", "USE_SUBSCRIBE" => "N");
         $arSelect = array("ID", "TMP_ID", "ENTITY_TYPE", "ENTITY_ID", "USER_ID", "EVENT_ID", "LOG_DATE", "LOG_UPDATE", "TITLE_TEMPLATE", "TITLE", "MESSAGE", "TEXT_MESSAGE", "URL", "MODULE_ID", "CALLBACK_FUNC", "EXTERNAL_ID", "SITE_ID", "PARAMS", "ENABLE_COMMENTS", "SOURCE_ID", "GROUP_NAME", "GROUP_OWNER_ID", "GROUP_INITIATE_PERMS", "GROUP_VISIBLE", "GROUP_OPENED", "GROUP_IMAGE_ID", "USER_NAME", "USER_LAST_NAME", "USER_SECOND_NAME", "USER_LOGIN", "USER_PERSONAL_PHOTO", "USER_PERSONAL_GENDER", "CREATED_BY_NAME", "CREATED_BY_LAST_NAME", "CREATED_BY_SECOND_NAME", "CREATED_BY_LOGIN", "CREATED_BY_PERSONAL_PHOTO", "CREATED_BY_PERSONAL_GENDER", "RATING_TYPE_ID", "RATING_ENTITY_ID", "SOURCE_TYPE");
         $dbEvent = CSocNetLog::GetList(array(), $arFilter, false, false, $arSelect, $arListParams);
         if ($arEvent = $dbEvent->GetNext()) {
             $arCommentEvent = CSocNetLogTools::FindLogCommentEventByLogEventID($arEvent["EVENT_ID"]);
             if (defined("BX_COMP_MANAGED_CACHE")) {
                 $GLOBALS["CACHE_MANAGER"]->StartTagCache($cache_path);
                 $GLOBALS["CACHE_MANAGER"]->RegisterTag("USER_NAME_" . intval($arEvent["USER_ID"]));
                 $GLOBALS["CACHE_MANAGER"]->RegisterTag("SONET_LOG_" . intval($arEvent["ID"]));
                 if ($arEvent["ENTITY_TYPE"] == SONET_ENTITY_GROUP) {
                     $GLOBALS["CACHE_MANAGER"]->RegisterTag("sonet_group_" . $arEvent["ENTITY_ID"]);
                 }
             }
             $arEvent["EVENT_ID_FULLSET"] = CSocNetLogTools::FindFullSetEventIDByEventID($arEvent["EVENT_ID"]);
             if ($arEvent["ENTITY_TYPE"] == SONET_ENTITY_GROUP) {
                 static $arSiteWorkgroupsPage;
                 if (!$arSiteWorkgroupsPage && IsModuleInstalled("extranet")) {
                     $rsSite = CSite::GetList($by = "sort", $order = "desc", array("ACTIVE" => "Y"));
                     while ($arSite = $rsSite->Fetch()) {
                         $arSiteWorkgroupsPage[$arSite["ID"]] = COption::GetOptionString("socialnetwork", "workgroups_page", $arSite["DIR"] . "workgroups/", $arSite["ID"]);
                     }
                 }
                 if (is_set($arEvent["URL"]) && is_array($arSiteWorkgroupsPage) && array_key_exists(SITE_ID, $arSiteWorkgroupsPage)) {
                     $arEvent["URL"] = str_replace("#GROUPS_PATH#", $arSiteWorkgroupsPage[SITE_ID], $arEvent["URL"]);
                 }
             }
             $arEventTmp = CSocNetLogTools::FindLogEventByID($arEvent["EVENT_ID"]);
             if ($arEventTmp && is_array($arEventTmp) && array_key_exists("CLASS_FORMAT", $arEventTmp) && array_key_exists("METHOD_FORMAT", $arEventTmp)) {
                 $arParams["MOBILE"] = "Y";
                 $arParams["NEW_TEMPLATE"] = "Y";
                 $arEvent["UF"] = $GLOBALS["USER_FIELD_MANAGER"]->GetUserFields("SONET_LOG", $arEvent["ID"], LANGUAGE_ID);
                 $arEvent["FIELDS_FORMATTED"] = call_user_func(array($arEventTmp["CLASS_FORMAT"], $arEventTmp["METHOD_FORMAT"]), $arEvent, $arParams);
                 if (is_array($arEvent["FIELDS_FORMATTED"])) {
                     if (isset($arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"]) && is_array($arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"]) && isset($arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"]["MESSAGE"])) {
                         $arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"]["MESSAGE"] = CSocNetTextParser::closetags(htmlspecialcharsback($arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"]["MESSAGE"]));
                     }
                     if (isset($arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"]) && is_array($arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"])) {
                         $arFields2Cache = array("URL", "STYLE", "DESTINATION", "DESTINATION_MORE", "TITLE", "TITLE_24", "TITLE_24_2", "IS_IMPORTANT", "MESSAGE", "DATETIME_FORMATTED", "LOG_DATE_FORMAT", "DESCRIPTION", "DESCRIPTION_STYLE", "AVATAR_STYLE", "HAS_COMMENTS");
                         foreach ($arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"] as $field => $value) {
                             if (!in_array($field, $arFields2Cache)) {
                                 unset($arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"][$field]);
                             }
                         }
                     }
                     if (isset($arEvent["FIELDS_FORMATTED"]["EVENT"]) && is_array($arEvent["FIELDS_FORMATTED"]["EVENT"])) {
                         $arFields2Cache = array("ID", "URL", "USER_ID", "ENTITY_TYPE", "ENTITY_ID", "EVENT_ID", "EVENT_ID_FULLSET", "TITLE", "SOURCE_ID", "MODULE_ID", "PARAMS", "RATING_TYPE_ID", "RATING_ENTITY_ID");
                         foreach ($arEvent["FIELDS_FORMATTED"]["EVENT"] as $field => $value) {
                             if (!in_array($field, $arFields2Cache)) {
                                 unset($arEvent["FIELDS_FORMATTED"]["EVENT"][$field]);
                             }
                         }
                     }
                     if (isset($arEvent["FIELDS_FORMATTED"]["CREATED_BY"]) && is_array($arEvent["FIELDS_FORMATTED"]["CREATED_BY"])) {
                         $arFields2Cache = array("TOOLTIP_FIELDS", "FORMATTED", "URL");
                         foreach ($arEvent["FIELDS_FORMATTED"]["CREATED_BY"] as $field => $value) {
//.........这里部分代码省略.........
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:101,代码来源:include.php

示例4: strlen

     }
 }
 if ($cnt == 0 && isset($dateLastPageStart) && $GLOBALS["USER"]->IsAuthorized() && $arParams["SET_LOG_PAGE_CACHE"] == "Y") {
     CSocNetLogPages::DeleteEx($user_id, SITE_ID, $arParams["PAGE_SIZE"], strlen($arResult["COUNTER_TYPE"]) > 0 ? $arResult["COUNTER_TYPE"] : "**");
 }
 if ($cnt < $arParams["PAGE_SIZE"] && isset($arFilter[">=LOG_UPDATE"])) {
     $arResult["NEXT_PAGE_SIZE"] = $cnt;
 } elseif (intval($_REQUEST["pagesize"]) > 0) {
     $arResult["NEXT_PAGE_SIZE"] = intval($_REQUEST["pagesize"]);
 }
 $bArActivity2LogEmpty = empty($arActivity2Log);
 foreach ($arTmpEventsNew as $key => $arTmpEvent) {
     if ($arTmpEvent["EVENT_ID"] == "crm_activity_add" && !$bArActivity2LogEmpty && !in_array($arTmpEvent["ID"], $arActivity2Log)) {
         unset($arTmpEventsNew[$key]);
     } elseif (!is_array($arPrevPageLogID) || !in_array($arTmpEvent["ID"], $arPrevPageLogID)) {
         $arTmpEventsNew[$key]["EVENT_ID_FULLSET"] = CSocNetLogTools::FindFullSetEventIDByEventID($arTmpEvent["EVENT_ID"]);
         if ($key == 0) {
             if ($arTmpEvent["DATE_FOLLOW"]) {
                 $dateFirstPageTS = MakeTimeStamp($arTmpEvent["DATE_FOLLOW"], CSite::GetDateFormat("FULL"));
             } elseif ($arParams["USE_FOLLOW"] == "N" && $arTmpEvent["LOG_UPDATE"]) {
                 $dateFirstPageTS = MakeTimeStamp($arTmpEvent["LOG_UPDATE"], CSite::GetDateFormat("FULL"));
             }
         }
     } else {
         unset($arTmpEventsNew[$key]);
     }
 }
 $arResult["Events"] = $arTmpEventsNew;
 if ($arParams["LOG_ID"] > 0 && count($arResult["Events"]) <= 0) {
     $arResult["FatalError"] = GetMessage("SONET_73_ENTRY_NOT_FOUND");
 }
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:component.php

示例5: __SLEGetLogRecord

 function __SLEGetLogRecord($logID, $arParams, $arCurrentUserSubscribe, $current_page_date)
 {
     $cache_time = 31536000;
     $arEvent = array();
     $cache = new CPHPCache();
     $arCacheID = array();
     $arKeys = array("AVATAR_SIZE", "DESTINATION_LIMIT", "CHECK_PERMISSIONS_DEST", "NAME_TEMPLATE", "NAME_TEMPLATE_WO_NOBR", "SHOW_LOGIN", "DATE_TIME_FORMAT", "PATH_TO_USER", "PATH_TO_GROUP", "PATH_TO_CONPANY_DEPARTMENT");
     foreach ($arKeys as $param_key) {
         if (array_key_exists($param_key, $arParams)) {
             $arCacheID[$param_key] = $arParams[$param_key];
         } else {
             $arCacheID[$param_key] = false;
         }
     }
     $cache_id = "log_post_" . $logID . "_" . md5(serialize($arCacheID)) . "_" . SITE_TEMPLATE_ID . "_" . SITE_ID . "_" . LANGUAGE_ID . "_" . CTimeZone::GetOffset();
     $cache_path = "/sonet/log/";
     if (is_object($cache) && $cache->InitCache($cache_time, $cache_id, $cache_path)) {
         $arCacheVars = $cache->GetVars();
         $arEvent["FIELDS_FORMATTED"] = $arCacheVars["FIELDS_FORMATTED"];
         if (array_key_exists("CACHED_CSS_PATH", $arEvent["FIELDS_FORMATTED"])) {
             if (!is_array($arEvent["FIELDS_FORMATTED"]["CACHED_CSS_PATH"]) && strlen($arEvent["FIELDS_FORMATTED"]["CACHED_CSS_PATH"]) > 0) {
                 $GLOBALS['APPLICATION']->SetAdditionalCSS($arEvent["FIELDS_FORMATTED"]["CACHED_CSS_PATH"]);
             } elseif (is_array($arEvent["FIELDS_FORMATTED"]["CACHED_CSS_PATH"])) {
                 foreach ($arEvent["FIELDS_FORMATTED"]["CACHED_CSS_PATH"] as $css_path) {
                     $GLOBALS['APPLICATION']->SetAdditionalCSS($css_path);
                 }
             }
         }
     } else {
         if (is_object($cache)) {
             $cache->StartDataCache($cache_time, $cache_id, $cache_path);
         }
         $arFilter = array("ID" => $logID);
         $arListParams = array("CHECK_RIGHTS" => "N", "USE_FOLLOW" => "N", "USE_SUBSCRIBE" => "N");
         $arSelect = array("ID", "TMP_ID", "ENTITY_TYPE", "ENTITY_ID", "USER_ID", "EVENT_ID", "LOG_DATE", "LOG_UPDATE", "TITLE_TEMPLATE", "TITLE", "MESSAGE", "TEXT_MESSAGE", "URL", "MODULE_ID", "CALLBACK_FUNC", "EXTERNAL_ID", "SITE_ID", "PARAMS", "COMMENTS_COUNT", "ENABLE_COMMENTS", "SOURCE_ID", "GROUP_NAME", "GROUP_OWNER_ID", "GROUP_INITIATE_PERMS", "GROUP_VISIBLE", "GROUP_OPENED", "GROUP_IMAGE_ID", "USER_NAME", "USER_LAST_NAME", "USER_SECOND_NAME", "USER_LOGIN", "USER_PERSONAL_PHOTO", "USER_PERSONAL_GENDER", "CREATED_BY_NAME", "CREATED_BY_LAST_NAME", "CREATED_BY_SECOND_NAME", "CREATED_BY_LOGIN", "CREATED_BY_PERSONAL_PHOTO", "CREATED_BY_PERSONAL_GENDER", "RATING_TYPE_ID", "RATING_ENTITY_ID", "SOURCE_TYPE");
         $dbEvent = CSocNetLog::GetList(array(), $arFilter, false, false, $arSelect, $arListParams);
         if ($arEvent = $dbEvent->GetNext()) {
             if (defined("BX_COMP_MANAGED_CACHE")) {
                 $GLOBALS["CACHE_MANAGER"]->StartTagCache($cache_path);
                 $GLOBALS["CACHE_MANAGER"]->RegisterTag("USER_CARD_" . intval($arEvent["USER_ID"] / 100));
                 $GLOBALS["CACHE_MANAGER"]->RegisterTag("SONET_LOG_" . intval($arEvent["ID"]));
                 if ($arEvent["ENTITY_TYPE"] == SONET_ENTITY_GROUP) {
                     $GLOBALS["CACHE_MANAGER"]->RegisterTag("sonet_group_" . $arEvent["ENTITY_ID"]);
                 }
             }
             $arEvent["EVENT_ID_FULLSET"] = CSocNetLogTools::FindFullSetEventIDByEventID($arEvent["EVENT_ID"]);
             if ($arEvent["ENTITY_TYPE"] == SONET_ENTITY_GROUP) {
                 static $arSiteWorkgroupsPage;
                 if (!$arSiteWorkgroupsPage && IsModuleInstalled("extranet")) {
                     $rsSite = CSite::GetList($by = "sort", $order = "desc", array("ACTIVE" => "Y"));
                     while ($arSite = $rsSite->Fetch()) {
                         $arSiteWorkgroupsPage[$arSite["ID"]] = COption::GetOptionString("socialnetwork", "workgroup_page", $arSite["DIR"] . "workgroups/", $arSite["ID"]);
                     }
                 }
                 if (is_set($arEvent["URL"]) && is_array($arSiteWorkgroupsPage) && array_key_exists(SITE_ID, $arSiteWorkgroupsPage)) {
                     $arEvent["URL"] = str_replace("#GROUPS_PATH#", $arSiteWorkgroupsPage[SITE_ID], $arEvent["URL"]);
                 }
             }
             $arEventTmp = CSocNetLogTools::FindLogEventByID($arEvent["EVENT_ID"]);
             if ($arEventTmp && is_array($arEventTmp) && array_key_exists("CLASS_FORMAT", $arEventTmp) && array_key_exists("METHOD_FORMAT", $arEventTmp)) {
                 $arEvent["FIELDS_FORMATTED"] = call_user_func(array($arEventTmp["CLASS_FORMAT"], $arEventTmp["METHOD_FORMAT"]), $arEvent, $arParams);
                 if (is_array($arEvent["FIELDS_FORMATTED"])) {
                     if (isset($arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"]) && is_array($arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"]) && isset($arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"]["MESSAGE"])) {
                         $arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"]["MESSAGE"] = CSocNetTextParser::closetags(htmlspecialcharsback($arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"]["MESSAGE"]));
                     }
                     if (isset($arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"]) && is_array($arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"])) {
                         $arFields2Cache = array("URL", "STYLE", "DESTINATION", "DESTINATION_MORE", "TITLE_24", "TITLE_24_2", "IS_IMPORTANT", "MESSAGE", "MESSAGE_TITLE_24", "DATETIME_FORMATTED");
                         foreach ($arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"] as $field => $value) {
                             if (!in_array($field, $arFields2Cache)) {
                                 unset($arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"][$field]);
                             }
                         }
                     }
                     if (isset($arEvent["FIELDS_FORMATTED"]["EVENT"]) && is_array($arEvent["FIELDS_FORMATTED"]["EVENT"])) {
                         $arFields2Cache = array("ID", "URL", "USER_ID", "ENTITY_TYPE", "ENTITY_ID", "EVENT_ID", "EVENT_ID_FULLSET", "TITLE", "SOURCE_ID", "PARAMS", "RATING_TYPE_ID", "RATING_ENTITY_ID");
                         foreach ($arEvent["FIELDS_FORMATTED"]["EVENT"] as $field => $value) {
                             if (!in_array($field, $arFields2Cache)) {
                                 unset($arEvent["FIELDS_FORMATTED"]["EVENT"][$field]);
                             }
                         }
                     }
                     if (isset($arEvent["FIELDS_FORMATTED"]["CREATED_BY"]) && is_array($arEvent["FIELDS_FORMATTED"]["CREATED_BY"])) {
                         $arFields2Cache = array("TOOLTIP_FIELDS", "FORMATTED", "URL");
                         foreach ($arEvent["FIELDS_FORMATTED"]["CREATED_BY"] as $field => $value) {
                             if (!in_array($field, $arFields2Cache)) {
                                 unset($arEvent["FIELDS_FORMATTED"]["CREATED_BY"][$field]);
                             }
                         }
                         if (isset($arEvent["FIELDS_FORMATTED"]["CREATED_BY"]["TOOLTIP_FIELDS"]) && is_array($arEvent["FIELDS_FORMATTED"]["CREATED_BY"]["TOOLTIP_FIELDS"])) {
                             $arFields2Cache = array("ID", "PATH_TO_SONET_USER_PROFILE", "NAME", "LAST_NAME", "SECOND_NAME", "LOGIN", "EMAIL");
                             foreach ($arEvent["FIELDS_FORMATTED"]["CREATED_BY"]["TOOLTIP_FIELDS"] as $field => $value) {
                                 if (!in_array($field, $arFields2Cache)) {
                                     unset($arEvent["FIELDS_FORMATTED"]["CREATED_BY"]["TOOLTIP_FIELDS"][$field]);
                                 }
                             }
                         }
                     }
                     if (isset($arEvent["FIELDS_FORMATTED"]["ENTITY"]) && is_array($arEvent["FIELDS_FORMATTED"]["ENTITY"])) {
                         $arFields2Cache = array("TOOLTIP_FIELDS", "FORMATTED", "URL");
                         foreach ($arEvent["FIELDS_FORMATTED"]["ENTITY"] as $field => $value) {
//.........这里部分代码省略.........
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:101,代码来源:include.php


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