Ejemplo n.º 1
0
<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
$composite = \Bitrix\Main\Page\Frame::getInstance();
$composite->setEnable();
$composite->setUseAppCache();
?>
<div id="im-contact-list-search"></div>
<div id="im-contact-list-wrap"></div>
<?php 
$frame = $this->createFrame("im_component_recent_v2_" . $USER->GetId())->begin();
$frame->setBrowserStorage(true);
?>
<script type="text/javascript">
	<?php 
echo CIMMessenger::GetMobileTemplateJS(array(), $arResult);
?>
</script>
<?php 
$frame->beginStub();
?>
<div class="bx-messenger-cl-item-load"><?php 
echo GetMessage('IM_RESENT_LOADING');
?>
</div>
<?php 
$frame->end();
Ejemplo n.º 2
0
<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
$APPLICATION->AddHeadString('<script type="text/javascript" src="' . CUtil::GetAdditionalFileURL(SITE_TEMPLATE_PATH . "/im_mobile.js") . '"></script>');
$frame = \Bitrix\Main\Page\Frame::getInstance();
$frame->setEnable();
$frame->setUseAppCache();
$frame->startDynamicWithID("im_notify_legacy_" . $USER->GetId());
if (empty($arResult)) {
    ?>
	<div class="notif-block-empty"><?php 
    echo GetMessage('NM_EMPTY');
    ?>
</div>
<?php 
} else {
    ?>
	<div class="notif-block-wrap" id="notif-block-wrap">
	<?php 
    $jsIds = "";
    $maxId = 0;
    $newFlag = false;
    $firstNewFlag = true;
    foreach ($arResult as $data) {
        $avatarId = "notif-avatar-" . randString(5);
        $jsIds .= $jsIds !== "" ? ', "' . $avatarId . '"' : '"' . $avatarId . '"';
        $arFormat = array("tommorow" => "tommorow, " . GetMessage('NM_FORMAT_TIME'), "today" => "today, " . GetMessage('NM_FORMAT_TIME'), "yesterday" => "yesterday, " . GetMessage('NM_FORMAT_TIME'), "" => GetMessage('NM_FORMAT_DATE'));
        $maxId = $data['id'] > $maxId ? $data['id'] : $maxId;
        $data['date'] = FormatDate($arFormat, $data['date']);
Ejemplo n.º 3
0
 public function EndBufferContent($content = "")
 {
     if ($this->buffer_man) {
         $this->auto_buffer_cleaned = true;
         return "";
     }
     Frame::checkAdminPanel();
     if (function_exists("getmoduleevents")) {
         foreach (GetModuleEvents("main", "OnBeforeEndBufferContent", true) as $arEvent) {
             ExecuteModuleEventEx($arEvent, array());
         }
     }
     $asset = Asset::getInstance();
     if (Frame::getUseAppCache()) {
         $asset->addString(CJSCore::GetCoreMessagesScript(), false, AssetLocation::AFTER_CSS, AssetMode::ALL);
     } else {
         $asset->addString(CJSCore::GetCoreMessagesScript(), false, AssetLocation::AFTER_CSS, AssetMode::STANDARD);
         $asset->addString(CJSCore::GetCoreMessagesScript(true), false, AssetLocation::AFTER_CSS, AssetMode::COMPOSITE);
     }
     $asset->addString($this->GetSpreadCookieHTML(), false, AssetLocation::AFTER_JS, AssetMode::STANDARD);
     if ($asset->canMoveJsToBody() && \CJSCore::IsCoreLoaded()) {
         $asset->addString(\CJSCore::GetInlineCoreJs(), false, AssetLocation::BEFORE_CSS, AssetMode::ALL);
     }
     if (is_object($GLOBALS["APPLICATION"])) {
         $cnt = count($this->buffer_content_type);
         for ($i = 0; $i < $cnt; $i++) {
             $this->buffer_content[$i * 2 + 1] = call_user_func_array($this->buffer_content_type[$i]["F"], $this->buffer_content_type[$i]["P"]);
         }
     }
     $composite = Frame::getInstance();
     $compositeContent = $composite->startBuffering($content);
     $content = implode("", $this->buffer_content) . $content;
     if (function_exists("getmoduleevents")) {
         foreach (GetModuleEvents("main", "OnEndBufferContent", true) as $arEvent) {
             ExecuteModuleEventEx($arEvent, array(&$content));
         }
     }
     $wasContentModified = $composite->endBuffering($content, $compositeContent);
     if (!$wasContentModified && $asset->canMoveJsToBody()) {
         $asset->moveJsToBody($content);
     }
     return $content;
 }
Ejemplo n.º 4
0
    if ($_GET[___1149546406(529)] == ___1149546406(530) || $_GET[___1149546406(531)] == ___1149546406(532)) {
        $_SESSION[___1149546406(533)] = $_GET[___1149546406(534)];
    }
}
if (isset($_GET[___1149546406(535)]) && $_GET[___1149546406(536)] != ___1149546406(537)) {
    $GLOBALS[___1149546406(538)]->SetShowIncludeAreas($_GET[___1149546406(539)] == ___1149546406(540));
}
if ($GLOBALS[___1149546406(541)]->{$GLOBALS}['_____296732968'][39]()) {
    $_1439800944 = COption::$GLOBALS['_____296732968'][40](___1149546406(542), ___1149546406(543), ___1149546406(544));
    if (!isset($_COOKIE[$_1439800944 . ___1149546406(545)])) {
        $GLOBALS[___1149546406(546)]->set_cookie(___1149546406(547), ___1149546406(548), 237 * 2 - 474);
    }
}
if ($GLOBALS['____787902325'][128](___1149546406(549)) && USE_HTML_STATIC_CACHE === true) {
    if (!$GLOBALS['____787902325'][129](___1149546406(550)) && (!$GLOBALS['____787902325'][130](___1149546406(551)) || $GLOBALS['____787902325'][131](___1149546406(552)) && ADMIN_SECTION != ___1149546406(553))) {
        \Bitrix\Main\Page\Frame::getInstance()->setUseHTMLCache();
        $GLOBALS['____787902325'][132](___1149546406(554), true);
    }
} elseif ($GLOBALS['____787902325'][133](___1149546406(555)) && ENABLE_HTML_STATIC_CACHE_JS === true && (!$GLOBALS['____787902325'][134](___1149546406(556)) || ADMIN_SECTION !== true)) {
    CJSCore::init(array(___1149546406(557)));
}
foreach ($GLOBALS['_____296732968'][41](___1149546406(558), ___1149546406(559), true) as $_60804086) {
    ExecuteModuleEventEx($_60804086);
}
if ((!$GLOBALS['____787902325'][135](___1149546406(560)) || NOT_CHECK_PERMISSIONS !== true) && (!$GLOBALS['____787902325'][136](___1149546406(561)) || NOT_CHECK_FILE_PERMISSIONS !== true)) {
    $_1021365968 = $GLOBALS[___1149546406(562)]->{$GLOBALS}['_____296732968'][42](true);
    if (isset($_SERVER[___1149546406(563)]) && $_SERVER[___1149546406(564)] != ___1149546406(565)) {
        $_1021365968 = $_SERVER[___1149546406(566)];
    }
    if (!$GLOBALS[___1149546406(567)]->CanDoFileOperation(___1149546406(568), array(SITE_ID, $_1021365968)) || $GLOBALS['____787902325'][137](___1149546406(569)) && NEED_AUTH && !$GLOBALS[___1149546406(570)]->{$GLOBALS}['_____296732968'][43]()) {
        if ($GLOBALS[___1149546406(571)]->{$GLOBALS}['_____296732968'][44]() && $_1155945949[___1149546406(572)] == ___1149546406(573)) {
Ejemplo n.º 5
0
 /**
  * Checks component frame mode
  * @param string $context
  */
 public static function applyComponentFrameMode($context = "")
 {
     if (defined("USE_HTML_STATIC_CACHE") && USE_HTML_STATIC_CACHE === true && \Bitrix\Main\Page\Frame::getInstance()->getCurrentDynamicId() === false) {
         $staticHtmlCache = static::getInstance();
         if (!$staticHtmlCache->isVotingEnabled()) {
             return;
         }
         $staticHtmlCache->markNonCacheable();
         if (defined("BX_COMPOSITE_DEBUG") && BX_COMPOSITE_DEBUG === true) {
             AddMessage2Log("Reason: " . $context . "\n" . "Request URI: " . $_SERVER["REQUEST_URI"] . "\n" . "Script: " . (isset($_SERVER["REAL_FILE_PATH"]) ? $_SERVER["REAL_FILE_PATH"] : $_SERVER["SCRIPT_NAME"]), "Composite was rejected");
         }
     }
 }