Пример #1
0
 /**
  * Sets viewport-metadata
  */
 public static function initScripts()
 {
     global $APPLICATION;
     $APPLICATION->AddHeadString("<script type=\"text/javascript\"> var appVersion = " . self::$apiVersion . ";var platform = \"" . self::$platform . "\";</script>", false, true);
     $APPLICATION->AddHeadString("<script type=\"text/javascript\" src=\"" . CUtil::GetAdditionalFileURL("/bitrix/js/mobileapp/" . self::$platform . "-cordova-2.0.0.js") . "\"></script>", false, true);
     if ($APPLICATION->IsJSOptimized()) {
         $APPLICATION->AddHeadScript("/bitrix/js/mobileapp/bitrix_mobile.js");
     } else {
         $APPLICATION->AddHeadString("<script type=\"text/javascript\" src=\"" . CUtil::GetAdditionalFileURL("/bitrix/js/mobileapp/bitrix_mobile.js") . "\"></script>", false, true);
     }
     if (self::$platform == "android") {
         $APPLICATION->AddHeadString("<script type=\"text/javascript\">app.bindloadPageBlank();</script>", false, false);
     }
     $APPLICATION->AddHeadString(CMobile::getInstance()->getViewPort());
 }
Пример #2
0
 private static function _loadCSS($css, $bReturn)
 {
     /** @global CMain $APPLICATION */
     global $APPLICATION;
     if (is_array($css)) {
         $ret = '';
         foreach ($css as $css_file) {
             $ret .= self::_loadCSS($css_file, $bReturn);
         }
         return $ret;
     }
     $css_filename = $_SERVER['DOCUMENT_ROOT'] . $css;
     if (!file_exists($css_filename)) {
         return '';
     }
     if ($bReturn) {
         return '<link href="' . CUtil::GetAdditionalFileURL($css) . '" type="text/css" rel="stylesheet" />' . "\r\n";
     } else {
         $APPLICATION->SetAdditionalCSS($css);
     }
     return '';
 }
Пример #3
0
	function ShowSound()
	{
		/** @global CMain $APPLICATION */
		global $USER, $APPLICATION;

		$res = '';
		if($USER->IsAuthorized() && !isset($_COOKIE[COption::GetOptionString("main", "cookie_name", "FREETRIX_SM").'_SOUND_LOGIN_PLAYED']))
		{
			$aUserOptGlobal = CUserOptions::GetOption("global", "settings");
			if($aUserOptGlobal["sound"] == 'Y')
			{
				if($aUserOptGlobal["sound_login"] == '')
					$aUserOptGlobal["sound_login"] = "******";

				ob_start();
				$APPLICATION->IncludeComponent("freetrix:player",	"",
					Array(
						"PLAYER_TYPE" => "flv",
						"PATH" => htmlspecialcharsbx($aUserOptGlobal["sound_login"]),
						"WIDTH" => "1",
						"HEIGHT" => "1",
						"CONTROLBAR" => "none",
						"AUTOSTART" => "Y",
						"REPEAT" => "N",
						"VOLUME" => "90",
						"MUTE" => "N",
						"HIGH_QUALITY" => "Y",
						"BUFFER_LENGTH" => "2",
						"PROVIDER"=>"sound",
					),
					null, array("HIDE_ICONS"=>"Y")
				);
				$res = ob_get_contents();
				ob_end_clean();

				$res = '
<script type="text/javascript" src="'.CUtil::GetAdditionalFileURL('/freetrix/components/freetrix/player/mediaplayer/flvscript.js', true).'"></script>
<div style="position:absolute; top:-1000px; left:-1000px;">
'.$res.'
</div>
';
			}
		}
		return $res;
	}
Пример #4
0
             $arCSSNew[] = $css_path;
         }
     }
     $arCSSNew = array_unique($arCSSNew);
     $arHeadScriptsNew = $APPLICATION->arHeadScripts;
     if (!$APPLICATION->oAsset->optimizeJs()) {
         $arHeadScriptsNew = array_merge(CJSCore::GetScriptsList(), $arHeadScriptsNew);
     }
     $arAdditionalData["CSS"] = array();
     foreach ($arCSSNew as $style) {
         $arAdditionalData["CSS"][] = CUtil::GetAdditionalFileURL($style);
     }
     $arAdditionalData['SCRIPTS'] = array();
     $arHeadScriptsNew = array_unique($arHeadScriptsNew);
     foreach ($arHeadScriptsNew as $script) {
         $arAdditionalData["SCRIPTS"][] = CUtil::GetAdditionalFileURL($script);
     }
     $additional_data = '<script type="text/javascript" bxrunfirst="true">' . "\n";
     $additional_data .= 'top.__logGetNextPageLinkEntities(' . CUtil::PhpToJSObject($component->arResult["ENTITIES_XML_ID"]) . ', ' . CUtil::PhpToJSObject($component->arResult["ENTITIES_CORRESPONDENCE"]) . ');';
     $additional_data .= '</script>';
     if ($arResult["AJAX_CALL"]) {
         $strText = ob_get_clean();
         echo CUtil::PhpToJSObject(array("PROPS" => array("CONTENT" => $additional_data . $strText, "STRINGS" => array(), "JS" => $arAdditionalData["SCRIPTS"], "CSS" => $arAdditionalData["CSS"]), "LAST_TS" => $arResult["dateLastPageTS"] ? intval($arResult["dateLastPageTS"]) : 0));
     } else {
         echo $additional_data;
     }
     if (CModule::IncludeModule("pull")) {
         CPullWatch::DeferredSql();
     }
     die;
 }
Пример #5
0
    function GetHTML($arBanner, $bNoIndex = false)
    {
        $strReturn = "";
        // обрабатываем изображение
        if (intval($arBanner["IMAGE_ID"]) > 0 && $arBanner["AD_TYPE"] != "html") {
            $arImage = CFile::GetFileArray($arBanner["IMAGE_ID"]);
            if ($arImage) {
                $file_type = GetFileType($arImage["FILE_NAME"]);
                $path = $arImage["SRC"];
                switch ($file_type) {
                    case "FLASH":
                        $arParams = array();
                        $url = $param = "";
                        $alt = $a_title = $a_target = "";
                        if (strlen(trim($arBanner["URL"])) > 0) {
                            $param = CAdvBanner::PrepareHTML($arBanner["URL"], $arBanner);
                            $param = CAdvBanner::GetRedirectURL($param, $arBanner);
                            $url = $param;
                            $arParams[] = "flash_link=" . urlencode($param);
                            if (strlen(trim($arBanner["URL_TARGET"])) > 0) {
                                $arParams[] = "flash_target=" . urlencode($arBanner["URL_TARGET"]);
                                $a_target = ' target="' . htmlspecialcharsbx($arBanner["URL_TARGET"]) . '" ';
                            }
                        }
                        if (strlen(trim($arBanner["IMAGE_ALT"])) > 0) {
                            $alt = CAdvBanner::PrepareHTML($arBanner["IMAGE_ALT"], $arBanner);
                            $arParams[] = "flash_alt=" . urlencode($alt);
                            $a_title = " title=\"" . htmlspecialcharsbx($alt) . "\" ";
                        }
                        if (count($arParams) > 0) {
                            $param = "?" . implode("&amp;", $arParams);
                        }
                        if ($arBanner["FLASH_TRANSPARENT"] == '') {
                            $arBanner["FLASH_TRANSPARENT"] = 'transparent';
                        }
                        if ($arBanner["FLASH_JS"] != 'Y') {
                            $strReturn = '<div style="width: ' . $arImage["WIDTH"] . 'px; height: ' . $arImage["HEIGHT"] . 'px; padding:0; margin:0">';
                            if (strlen(trim($arBanner["URL"])) > 0 && $arBanner["NO_URL_IN_FLASH"] == "Y") {
                                $strReturn .= ($bNoIndex ? '<noindex>' : '') . '<div style="position:absolute; z-index:100;"><a href="' . $url . '"' . $a_target . $a_title . ($bNoIndex ? ' rel="nofollow"' : '') . '><img src="/bitrix/images/1.gif" width="' . $arImage["WIDTH"] . '" height="' . $arImage["HEIGHT"] . '" style="border:0;" alt="' . htmlspecialcharsEx($alt) . '" /></a></div>' . ($bNoIndex ? '</noindex>' : '');
                            }
                            $strReturn .= '<OBJECT
	classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000"
	codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
	id="banner_' . $arBanner["ID"] . '"
	WIDTH="' . $arImage["WIDTH"] . '"
	HEIGHT="' . $arImage["HEIGHT"] . '">
		<PARAM NAME="movie" VALUE="' . $path . $param . '" />
		<PARAM NAME="quality" VALUE="high" />
		<PARAM NAME="bgcolor" VALUE="#FFFFFF" />
		<PARAM NAME="wmode" VALUE="' . $arBanner["FLASH_TRANSPARENT"] . '" />
		<EMBED
			src="' . $path . $param . '"
			quality="high"
			bgcolor="#FFFFFF"
			wmode="' . $arBanner["FLASH_TRANSPARENT"] . '"
			WIDTH="' . $arImage["WIDTH"] . '"
			HEIGHT="' . $arImage["HEIGHT"] . '"
			NAME="banner"
			TYPE="application/x-shockwave-flash"
			PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
		</EMBED>
</OBJECT></div>';
                        } else {
                            $strReturn = "";
                            static $bScript = null;
                            if ($bScript === null) {
                                $bScript = true;
                                $strReturn .= '<script type="text/javascript" src="' . CUtil::GetAdditionalFileURL('/bitrix/js/advertising/flash.js') . '"></script>';
                            }
                            $altImgPath = '';
                            $arAltImage = CFile::GetFileArray($arBanner["FLASH_IMAGE"]);
                            if ($arAltImage) {
                                $altImgPath = $arAltImage["SRC"];
                            }
                            $test_id = 'id' . RandString(10);
                            $strReturn .= '<div id="' . $test_id . '" style="width: ' . $arImage["WIDTH"] . 'px; height: ' . $arImage["HEIGHT"] . 'px; padding:0; margin:0;">';
                            $altHref = '';
                            if (trim($arBanner["URL"]) != '') {
                                if ($arBanner["NO_URL_IN_FLASH"] == "Y") {
                                    $strReturn .= ($bNoIndex ? '<noindex>' : '') . '<div style="position:absolute; z-index:100;"><a href="' . $url . '"' . $a_target . $a_title . ($bNoIndex ? ' rel="nofollow"' : '') . '><img src="/bitrix/images/1.gif" width="' . $arImage["WIDTH"] . '" height="' . $arImage["HEIGHT"] . '" style="border:0;" alt="' . htmlspecialcharsEx($alt) . '" /></a></div>' . ($bNoIndex ? '</noindex>' : '');
                                } else {
                                    $altHref = $url;
                                }
                            }
                            $strReturn .= '</div>';
                            $strReturn .= '<script type="text/javascript">bx_adv_includeFlash("' . $test_id . '", "' . CUtil::JSEscape($path . $param) . '", "' . $arImage["WIDTH"] . '", "' . $arImage["HEIGHT"] . '", "' . $arBanner["FLASH_TRANSPARENT"] . '", "' . CUtil::JSEscape($altImgPath) . '", ' . (intval($arBanner["FLASH_VER"]) <= 0 ? 'null' : intval($arBanner["FLASH_VER"])) . ', "' . CUtil::JSEscape($altHref) . '", "' . CUtil::JSEscape(htmlspecialcharsbx($arBanner["URL_TARGET"])) . '", "' . CUtil::JSEscape(htmlspecialcharsbx($alt)) . '");</script>';
                        }
                        break;
                    default:
                        $alt = CAdvBanner::PrepareHTML(trim($arBanner["IMAGE_ALT"]), $arBanner);
                        $strImage = "<img alt=\"" . htmlspecialcharsEx($alt) . "\" title=\"" . htmlspecialcharsEx($alt) . "\" src=\"" . $path . "\" width=\"" . $arImage["WIDTH"] . "\" height=\"" . $arImage["HEIGHT"] . "\" style=\"border:0;\" />";
                        if (strlen(trim($arBanner["URL"])) > 0) {
                            $url = $arBanner["URL"];
                            $url = CAdvBanner::PrepareHTML($url, $arBanner);
                            $url = CAdvBanner::GetRedirectURL($url, $arBanner);
                            $target = strlen(trim($arBanner["URL_TARGET"])) > 0 ? " target=\"" . $arBanner["URL_TARGET"] . "\" " : "";
                            $strReturn = ($bNoIndex ? '<noindex>' : '') . "<a href=\"" . $url . "\"" . $target . ($bNoIndex ? ' rel="nofollow"' : '') . ">" . $strImage . "</a>" . ($bNoIndex ? '</noindex>' : '');
                        } else {
                            $strReturn .= $strImage;
                        }
                        break;
                }
            }
        }
        if ($arBanner["CODE"] != '') {
            $code = $arBanner["CODE"];
            if ($arBanner["CODE_TYPE"] == "text") {
                $code = TxtToHTML($code);
            }
            $code = CAdvBanner::PrepareHTML($code, $arBanner);
            $strReturn .= CAdvBanner::ReplaceURL($code, $arBanner);
        }
        return $strReturn;
    }
Пример #6
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']);
Пример #7
0
//login-main-wrapper
?>

	<div style="display: none;" id="window_wrapper"></div>

<script type="text/javascript">
BX.ready(BX.defer(function(){
	BX.addClass(document.body, 'login-animate');
	BX.addClass(document.body, 'login-animate-popup');
<?php 
$arPreload = array('CSS' => array('/bitrix/panel/main/admin.css', '/bitrix/panel/main/admin-public.css', '/bitrix/panel/main/adminstyles_fixed.css', '/bitrix/themes/.default/modules.css'), 'JS' => array('/bitrix/js/main/utils.js', '/bitrix/js/main/admin_tools.js', '/bitrix/js/main/popup_menu.js', '/bitrix/js/main/admin_search.js', '/bitrix/js/main/dd.js', '/bitrix/js/main/core/core_popup.js', '/bitrix/js/main/core/core_date.js', '/bitrix/js/main/core/core_admin_interface.js', '/bitrix/js/main/core/core_autosave.js', '/bitrix/js/main/core/core_fx.js'));
foreach ($arPreload['CSS'] as $key => $file) {
    $arPreload['CSS'][$key] = CUtil::GetAdditionalFileURL($file, true);
}
foreach ($arPreload['JS'] as $key => $file) {
    $arPreload['JS'][$key] = CUtil::GetAdditionalFileURL($file, true);
}
?>

	//preload admin scripts&styles
	setTimeout("BX.loadCSS(['<?php 
echo implode("','", $arPreload['CSS']);
?>
']); BX.ajax.loadScriptAjax(['<?php 
echo implode("','", $arPreload['JS']);
?>
'], null, true);", 2000);
}));

new BX.COpener({DIV: 'login_lang_button', ACTIVE_CLASS: 'login-language-btn-active', MENU: <?php 
echo CUtil::PhpToJsObject($arLangButton['MENU']);
Пример #8
0
 function _PrepareAdditionalData()
 {
     /** @global CMain $APPLICATION */
     global $APPLICATION;
     // get CSS changes list
     if ($this->bStyle) {
         $arCSSList = $APPLICATION->sPath2css;
         $cnt_old = count($this->arCSSList);
         $cnt_new = count($arCSSList);
         $arCSSNew = array();
         if ($cnt_old != $cnt_new) {
             for ($i = $cnt_old; $i < $cnt_new; $i++) {
                 $css_path = $arCSSList[$i];
                 if (strtolower(substr($css_path, 0, 7)) != 'http://' && strtolower(substr($css_path, 0, 8)) != 'https://') {
                     if (($p = strpos($css_path, "?")) > 0) {
                         $css_file = substr($css_path, 0, $p);
                     } else {
                         $css_file = $css_path;
                     }
                     if (file_exists($_SERVER["DOCUMENT_ROOT"] . $css_file)) {
                         $arCSSNew[] = $arCSSList[$i];
                     }
                 } else {
                     $arCSSNew[] = $arCSSList[$i];
                 }
             }
         }
     }
     // get scripts changes list
     $arHeadScripts = $APPLICATION->arHeadScripts;
     $cnt_old = count($this->arHeadScripts);
     $cnt_new = count($arHeadScripts);
     $arHeadScriptsNew = array();
     if ($cnt_old != $cnt_new) {
         for ($i = $cnt_old; $i < $cnt_new; $i++) {
             $arHeadScriptsNew[] = $arHeadScripts[$i];
         }
     }
     if (!$APPLICATION->oAsset->optimizeJs()) {
         $arHeadScriptsNew = array_merge(CJSCore::GetScriptsList(), $arHeadScriptsNew);
     }
     // prepare additional data
     $arAdditionalData = array();
     $arAdditionalData['TITLE'] = htmlspecialcharsback($APPLICATION->GetTitle());
     $arAdditionalData['WINDOW_TITLE'] = htmlspecialcharsback($APPLICATION->GetTitle('title'));
     $arAdditionalData['SCRIPTS'] = array();
     $arHeadScriptsNew = array_unique($arHeadScriptsNew);
     foreach ($arHeadScriptsNew as $script) {
         $arAdditionalData['SCRIPTS'][] = CUtil::GetAdditionalFileURL($script);
     }
     if (null !== $this->__nav_params) {
         $arAdditionalData['NAV_CHAIN'] = $APPLICATION->GetNavChain($this->__nav_params[0], $this->__nav_params[1], $this->__nav_params[2], $this->__nav_params[3], $this->__nav_params[4]);
     }
     if ($this->bStyle) {
         $arAdditionalData["CSS"] = array();
         /** @noinspection PhpUndefinedVariableInspection */
         $arCSSNew = array_unique($arCSSNew);
         foreach ($arCSSNew as $style) {
             $arAdditionalData['CSS'][] = CUtil::GetAdditionalFileURL($style);
         }
     }
     $additional_data = '<script type="text/javascript" bxrunfirst="true">' . "\n";
     $additional_data .= 'var arAjaxPageData = ' . CUtil::PhpToJSObject($arAdditionalData) . ";\r\n";
     $additional_data .= 'top.BX.ajax.UpdatePageData(arAjaxPageData)' . ";\r\n";
     $additional_data .= '</script><script type="text/javascript">';
     if (!$this->bIFrameMode && $this->bHistory) {
         $additional_data .= 'top.BX.ajax.history.put(window.AJAX_PAGE_STATE.getState(), \'' . CUtil::JSEscape(CAjax::encodeURI($APPLICATION->GetCurPageParam('', array(BX_AJAX_PARAM_ID), false))) . '\')' . ";\r\n";
     }
     if ($this->bJump) {
         if ($this->bIFrameMode) {
             $additional_data .= 'top.setTimeout(\'BX.scrollToNode("comp_' . $this->componentID . '")\', 100)' . ";\r\n";
         } else {
             $additional_data .= 'top.BX.scrollToNode(\'comp_' . $this->componentID . '\')' . ";\r\n";
         }
     }
     $additional_data .= '</script>';
     echo $additional_data;
 }
Пример #9
0
<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
$APPLICATION->SetAdditionalCSS(CUtil::GetAdditionalFileURL('/bitrix/js/mobileapp/interface.css'));
if ($arResult['GET_JS']) {
    echo '<script type="text/javascript">' . file_get_contents($_SERVER['DOCUMENT_ROOT'] . $templateFolder . '/script.js') . '</script>';
}
?>
<script type="text/javascript">
	topSwichControl = new __MATopSwitchersControl({
							itemSelectedId: "<?php 
echo $arResult['SELECTED'];
?>
",
							callbackFunc: "<?php 
echo $arResult['JS_CALLBACK_FUNC'];
?>
"
	});
</script>
<div class="order_nav">
	<ul>
		<?php 
foreach ($arParams["ITEMS"] as $key => $text) {
    ?>
			<li id="top_sw_<?php 
    echo $key;
    ?>
" <?php 
Пример #10
0
 /**
  * Sets viewport-metadata
  */
 public static function initScripts()
 {
     global $APPLICATION;
     $pgJsFile = "/bitrix/js/mobileapp/" . self::$platform . "-cordova-" . self::$pgVersion . ".js";
     if (!file_exists($_SERVER["DOCUMENT_ROOT"] . $pgJsFile)) {
         $pgJsFile = self::$remoteScriptPath . self::$platform . "-cordova-" . self::$pgVersion . ".js";
     }
     $APPLICATION->AddHeadString("<script type=\"text/javascript\"> var appVersion = " . self::$apiVersion . ";var platform = \"" . self::$platform . "\";</script>", false, true);
     $APPLICATION->AddHeadString("<script type=\"text/javascript\" src=\"" . CUtil::GetAdditionalFileURL($pgJsFile) . "\"></script>", false, true);
     $APPLICATION->AddHeadString("<script type=\"text/javascript\" src=\"" . CUtil::GetAdditionalFileURL("/bitrix/js/mobileapp/bitrix_mobile.js") . "\"></script>", false, true);
     if (self::$platform == "android") {
         $APPLICATION->AddHeadString("<script type=\"text/javascript\">app.bindloadPageBlank();</script>", false, false);
     }
     $APPLICATION->AddHeadString(CMobile::getInstance()->getViewPort());
 }
Пример #11
0
<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
if ($arParams['FORUM_ID'] > 0) {
    if ($arParams['MINIMAL']) {
        ?>
<script type="text/javascript">
			if (!window.onForumImageLoad)
			{
				BX.loadCSS('<?php 
        echo CUtil::GetAdditionalFileURL('/bitrix/components/bitrix/forum.comments/templates/.default/style.css', true);
        ?>
');
				BX.loadScript('<?php 
        echo CUtil::GetAdditionalFileURL('/bitrix/components/bitrix/forum.comments/templates/.default/script.js', true);
        ?>
');
			}
			else
			{
				window.onForumImagesLoad();
			}
		</script><?php 
    }
    $APPLICATION->IncludeComponent("bitrix:forum.comments", ".default", array("FORUM_ID" => $arParams['FORUM_ID'], "ENTITY_TYPE" => MEETING_ITEMS_COMMENTS_ENTITY_TYPE, "ENTITY_ID" => $arResult['ITEM']['ID'], "ENTITY_XML_ID" => "MEETING_ITEM_" . $arResult['ITEM']['ID'], "URL_TEMPLATES_PROFILE_VIEW" => COption::GetOptionString('intranet', 'path_user', '/company/personal/user/#USER_ID#/', SITE_ID), "CACHE_TYPE" => "A", "CACHE_TIME" => "36000", "MESSAGES_PER_PAGE" => "50", "PAGE_NAVIGATION_TEMPLATE" => "", "DATE_TIME_FORMAT" => CDatabase::DateFormatToPHP(FORMAT_DATETIME), "PATH_TO_SMILE" => "/bitrix/images/forum/smile/", "EDITOR_CODE_DEFAULT" => "N", "SHOW_MODERATION" => "Y", "SHOW_AVATAR" => "Y", "SHOW_RATING" => $arParams['MINIMAL'] ? "N" : "Y", "SHOW_MINIMIZED" => "N", "USE_CAPTCHA" => "N", "PREORDER" => "Y", "SHOW_LINK_TO_FORUM" => "N", "SHOW_SUBSCRIBE" => "N", "FILES_COUNT" => 10, "AJAX_MODE" => 'Y', "AJAX_OPTION_HISTORY" => $arParams['MINIMAL'] ? "N" : "Y", "AJAX_OPTION_ADDITIONAL" => "MEETING_ITEM_" . $arResult['ITEM']['ID'] . "_" . $arParams['COMMENTS'], "SHOW_WYSIWYG_EDITOR" => $arParams['MINIMAL'] ? "N" : "Y", "AUTOSAVE" => $arParams['MINIMAL'] ? false : true, "PERMISSION" => "M", "NAME_TEMPLATE" => $arParams["NAME_TEMPLATE"]), null, array('HIDE_ICONS' => 'Y'));
}
Пример #12
0
 = null;
<? if (sizeof($arValue) < 1) { ?>
		BX.addCustomEvent(<?php 
echo $controller;
?>
.parentNode, "BFileDLoadFormController", function() {
<? } ?>
			if (! <?php 
echo $controller;
?>
.loaded)
			{
				BX.loadScript(
					[
					'<?php 
echo CUtil::GetAdditionalFileURL('/bitrix/components/bitrix/main.file.input/templates/drag_n_drop/script.js');
?>
',
						'/bitrix/js/main/core/core_ajax.js',
						'/bitrix/js/main/core/core_dd.js'
					], function() {

						<?php 
echo $controller;
?>
.loaded = true;

						var dropbox = new BX.DD.dropFiles();
						var variant = 'simple';
						if (dropbox && dropbox.supported() && BX.ajax.FormData.isSupported())
						{
Пример #13
0
    public static function AttachJSScripts()
    {
        if (!defined("BX_B_FILE_DIALOG_SCRIPT_LOADED")) {
            // define("BX_B_FILE_DIALOG_SCRIPT_LOADED", true);
            ?>
if (window.jsUtils)
{
	jsUtils.addEvent(window, 'load', function(){jsUtils.loadJSFile('<?php 
            echo CUtil::GetAdditionalFileURL("/bitrix/js/main/file_dialog.js");
            ?>
');}, false);
}
<?php 
        }
    }
Пример #14
0
    function ShowPanelScripts($bReturn = false)
    {
        global $APPLICATION, $adminPage;
        static $bPanelScriptsIncluded = false;
        if ($bPanelScriptsIncluded) {
            return null;
        }
        $bPanelScriptsIncluded = true;
        require_once $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/interface/init_admin.php";
        if (!$bReturn) {
            CUtil::InitJSCore(array('window', 'ajax', 'admin'));
            $APPLICATION->AddHeadString($adminPage->ShowScript());
            $APPLICATION->AddHeadScript('/bitrix/js/main/public_tools.js');
            $APPLICATION->SetAdditionalCSS(ADMIN_THEMES_PATH . '/' . ADMIN_THEME_ID . '/pubstyles.css');
        } else {
            return CUtil::InitJSCore(array('window', 'ajax', 'admin'), true) . $adminPage->ShowScript() . '
<script type="text/javascript" src="' . CUtil::GetAdditionalFileURL('/bitrix/js/main/public_tools.js', true) . '"></script>
<link rel="stylesheet" type="text/css" href="' . CUtil::GetAdditionalFileURL(ADMIN_THEMES_PATH . '/' . ADMIN_THEME_ID . '/pubstyles.css', true) . '" />
';
        }
        return null;
    }
Пример #15
0
?>
 <= 100)
			setTimeout(__vote<?php 
echo $arResult["CONTROL_UID"];
?>
, 10);
		return false;
	}
	if (!<?php 
echo $controller;
?>
.loaded) {
		BX.loadScript(
				[
					'<?php 
echo CUtil::GetAdditionalFileURL('/bitrix/components/bitrix/voting.vote.edit/templates/.default/script.js');
?>
',
				],
				function() {
				<?php 
echo $controller;
?>
.loaded = true;

					BVoteC<?php 
echo $uid;
?>
 = new BVoteConstructor({
								'CID' : "<?php 
echo $arResult['CONTROL_UID'];
Пример #16
0
 /**
  *
  * @param array[int]string $match
  * @return string
  *
  */
 private function _filter($match)
 {
     $attribute = $match[1];
     $open_quote = $match[2];
     $prefix = $match[3];
     $link = $match[4];
     $extension = $match[5];
     $params = $match[6];
     $close_quote = $match[7];
     $location = null;
     if (self::$ajax && $extension === "js") {
         return $match[0];
     }
     //if(preg_match("/^background/i", $attribute))
     //	$proto = self::$proto."://";
     //else
     $proto = "//";
     foreach (self::$config->getLocations() as $location) {
         /* @var CBitrixCloudCDNLocation $location */
         if ($location->getProto() === self::$proto) {
             $server = $location->getServerNameByPrefixAndExtension($prefix, $extension, $link);
             if ($server !== "") {
                 $filePath = $prefix . $link . $extension;
                 if ($params === '') {
                     $filePath = CUtil::GetAdditionalFileURL($filePath);
                 }
                 //Fix spaces in the link
                 $link = str_replace(" ", "%20", $link);
                 return $attribute . $open_quote . $proto . $server . $filePath . $params . $close_quote;
             }
         }
     }
     return $match[0];
 }
Пример #17
0
 function PrologActions()
 {
     /** @global CMain $APPLICATION */
     global $APPLICATION, $USER;
     if (defined("BX_CHECK_SHORT_URI") && BX_CHECK_SHORT_URI) {
         if ($arUri = CBXShortUri::GetUri($_SERVER["REQUEST_URI"])) {
             CBXShortUri::SetLastUsed($arUri["ID"]);
             if (CModule::IncludeModule("statistic")) {
                 CStatEvent::AddCurrent("short_uri_redirect", "", "", "", "", $arUri["URI"], "N", SITE_ID);
             }
             LocalRedirect($arUri["URI"], true, CBXShortUri::GetHttpStatusCodeText($arUri["STATUS"]));
             die;
         }
     }
     //session expander
     if (COption::GetOptionString("main", "session_expand", "Y") != "N" && (!defined("BX_SKIP_SESSION_EXPAND") || BX_SKIP_SESSION_EXPAND == false)) {
         $arPolicy = $USER->GetSecurityPolicy();
         $phpSessTimeout = ini_get("session.gc_maxlifetime");
         if ($arPolicy["SESSION_TIMEOUT"] > 0) {
             $sessTimeout = min($arPolicy["SESSION_TIMEOUT"] * 60, $phpSessTimeout);
         } else {
             $sessTimeout = $phpSessTimeout;
         }
         $cookie_prefix = COption::GetOptionString('main', 'cookie_name', 'BITRIX_SM');
         $salt = $_COOKIE[$cookie_prefix . '_UIDH'] . "|" . $_SERVER["REMOTE_ADDR"] . "|" . @filemtime($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/classes/general/version.php") . "|" . LICENSE_KEY . "|" . CMain::GetServerUniqID();
         $key = md5(bitrix_sessid() . $salt);
         $bShowMess = $USER->IsAuthorized() && COption::GetOptionString("main", "session_show_message", "Y") != "N";
         $ext = array('ajax');
         if ($bShowMess) {
             $ext[] = "fx";
         }
         CUtil::InitJSCore($ext);
         $jsMsg = '<script type="text/javascript">' . "\n" . ($bShowMess ? 'bxSession.mess.messSessExpired = \'' . CUtil::JSEscape(GetMessage("MAIN_SESS_MESS", array("#TIMEOUT#" => round($sessTimeout / 60)))) . '\';' . "\n" : '') . 'bxSession.Expand(' . $sessTimeout . ', \'' . bitrix_sessid() . '\', ' . ($bShowMess ? 'true' : 'false') . ', \'' . $key . '\');' . "\n" . '</script>';
         if ($APPLICATION->IsJSOptimized()) {
             $APPLICATION->AddHeadScript('/bitrix/js/main/session.js');
             $APPLICATION->AddAdditionalJS($jsMsg);
         } else {
             $APPLICATION->AddHeadString('<script type="text/javascript" src="' . CUtil::GetAdditionalFileURL('/bitrix/js/main/session.js') . '"></script>' . "\n" . $jsMsg, true);
         }
         $_SESSION["BX_SESSION_COUNTER"] = intval($_SESSION["BX_SESSION_COUNTER"]) + 1;
         if (!defined("BX_SKIP_SESSION_TERMINATE_TIME")) {
             $_SESSION["BX_SESSION_TERMINATE_TIME"] = time() + $sessTimeout;
         }
     }
     //user auto time zone via js cookies
     if (CTimeZone::Enabled()) {
         CTimeZone::SetAutoCookie();
     }
     // check user options set via cookie
     if ($USER->IsAuthorized()) {
         $cookieName = COption::GetOptionString("main", "cookie_name", "BITRIX_SM") . "_LAST_SETTINGS";
         if (!empty($_COOKIE[$cookieName])) {
             CUserOptions::SetCookieOptions($cookieName);
         }
     }
     if (COption::GetOptionString("main", "buffer_content", "Y") == "Y" && (!defined("BX_BUFFER_USED") || BX_BUFFER_USED !== true)) {
         ob_start(array(&$APPLICATION, "EndBufferContent"));
         $APPLICATION->buffered = true;
         define("BX_BUFFER_USED", true);
         register_shutdown_function(create_function('', 'while(@ob_end_flush());'));
     }
     foreach (GetModuleEvents("main", "OnProlog", true) as $arEvent) {
         ExecuteModuleEventEx($arEvent);
     }
 }
Пример #18
0
 /**
  * @param array $arFile
  * @param bool $unique
  * @param string $prefix
  * @param string $setName
  * @param string $type
  * @return array
  */
 private function optimizeAsset($arFile = array(), $unique = false, $prefix = 'default', $setName = '', $type = 'css')
 {
     if (!is_array($arFile) || empty($arFile)) {
         return array('RESULT' => '', 'FILES' => array());
     }
     $this->setTemplateID();
     $res = $assetMD5 = $strFiles = $contents = '';
     $prefix = trim($prefix);
     $prefix = strlen($prefix) < 1 ? 'default' : $prefix;
     $add2End = strncmp($prefix, 'kernel', 6) == 0;
     $type = $type == 'js' ? 'js' : 'css';
     $arIEContent = array();
     /** @var bool $noCheckOnly when we cant frite files */
     $noCheckOnly = !defined('BX_HEADFILES_CACHE_CHECK_ONLY');
     $prefix = $unique ? $prefix : $prefix . '_' . $this->getAssetChecksum($arFile);
     $dbType = ToUpper(\Bitrix\Main\Application::getInstance()->getConnection()->getType());
     $documentRoot = Main\Loader::getDocumentRoot();
     $optimPath = BX_PERSONAL_ROOT . '/cache/' . $type . '/' . SITE_ID . '/' . $this->siteTemplateID . '/' . $prefix . '/';
     $infoFile = $documentRoot . BX_PERSONAL_ROOT . '/managed_cache/' . $dbType . '/' . $type . '/' . SITE_ID . '/' . $this->siteTemplateID . '/' . $prefix . '/info.php';
     $optimFile = $optimPath . $prefix . ($type == 'css' ? '.css' : '.js');
     $optimFName = $documentRoot . $optimFile;
     $cssFNameIE = $optimPath . $prefix . '#CNT#.css';
     $cssFPathIE = $documentRoot . $cssFNameIE;
     $tmpInfo = $this->isAssetChanged($arFile, $infoFile, $optimFName, $unique);
     $arFilesInfo = $tmpInfo['INFO'];
     $action = $tmpInfo['ACTION'];
     $arFile = $tmpInfo['FILE'];
     $optimFileExist = $tmpInfo['FILE_EXIST'];
     $writeResult = $action == 'NEW' ? false : true;
     if ($action != 'NO') {
         if ($type == 'css') {
             $this->fileList['CSS'][$setName]['UP_NEW_FILES'] = $tmpInfo['FILE'];
         } else {
             $this->fileList['JS'][$setName]['UP_NEW_FILES'] = $tmpInfo['FILE'];
         }
         $arFilesInfo['CUR_IE_CNT'] = intval($arFilesInfo['CUR_IE_CNT']);
         $arFilesInfo['CUR_SEL_CNT'] = intval($arFilesInfo['CUR_SEL_CNT']);
         if ($action == 'UP') {
             if ($noCheckOnly) {
                 $contents .= file_get_contents($optimFName);
                 if ($type == 'css') {
                     if ($arFilesInfo['CUR_SEL_CNT'] < self::MAX_ADD_CSS_SELECTOR) {
                         $css = str_replace('#CNT#', $arFilesInfo['CUR_IE_CNT'], $cssFPathIE);
                         if (file_exists($css)) {
                             $arIEContent[$arFilesInfo['CUR_IE_CNT']] .= file_get_contents($css);
                             $arFilesInfo['CUR_SEL_CNT'] = $this->getCssSelectCnt($arIEContent[$arFilesInfo['CUR_IE_CNT']]);
                         }
                     } else {
                         $arFilesInfo['CUR_IE_CNT']++;
                         $arFilesInfo['CUR_SEL_CNT'] = 0;
                     }
                 }
             } else {
                 $writeResult = false;
             }
         }
         $needWrite = false;
         if ($noCheckOnly) {
             $tmpStr = '';
             foreach ($arFile as $file) {
                 $tmpContent = file_get_contents($file['FILE_PATH']);
                 if ($type == 'css') {
                     $f_cnt = $this->getCssSelectCnt($tmpContent);
                     $new_cnt = $f_cnt + $arFilesInfo['CUR_SEL_CNT'];
                     $strFiles .= "/* " . $file['PATH'] . " */\n";
                     $tmpContent = $this->fixCSSIncludes($tmpContent, $file['PATH']);
                     $tmpContent = "\n/* Start:" . $file['PATH'] . "*/\n" . $tmpContent . "\n/* End */\n";
                     if ($new_cnt < self::MAX_CSS_SELECTOR) {
                         $arFilesInfo['CUR_SEL_CNT'] = $new_cnt;
                         $arIEContent[$arFilesInfo['CUR_IE_CNT']] .= $tmpContent;
                     } else {
                         $arFilesInfo['CUR_SEL_CNT'] = $f_cnt;
                         $arFilesInfo['CUR_IE_CNT']++;
                         $arIEContent[$arFilesInfo['CUR_IE_CNT']] .= $tmpContent;
                     }
                     $tmpStr .= "\n\n" . $tmpContent;
                 } else {
                     $strFiles .= "; /* " . $file['PATH'] . "*/\n";
                     $tmpStr .= "\n; /* Start:" . $file['PATH'] . "*/\n" . $tmpContent . "\n/* End */\n;";
                 }
                 $arFilesInfo['FILES'][$file['PATH']] = $this->getAssetTime($file['FULL_PATH']);
                 $needWrite = true;
             }
             if ($needWrite) {
                 // Write packed files and meta information
                 $contents = $add2End ? $strFiles . $contents . $tmpStr : $tmpStr . $contents . $strFiles;
                 if ($writeResult = $this->write($optimFName, $contents)) {
                     $cacheInfo = '<? $arFilesInfo = array( \'FILES\' => array(';
                     foreach ($arFilesInfo['FILES'] as $key => $time) {
                         $cacheInfo .= '"' . EscapePHPString($key) . '" => "' . $time . '",';
                     }
                     $cacheInfo .= "), 'CUR_SEL_CNT' => '" . $arFilesInfo['CUR_SEL_CNT'] . "', 'CUR_IE_CNT' => '" . $arFilesInfo['CUR_IE_CNT'] . "'); ?>";
                     $this->write($infoFile, $cacheInfo, false);
                     if ($type == 'css') {
                         foreach ($arIEContent as $key => $ieContent) {
                             $css = str_replace('#CNT#', $key, $cssFPathIE);
                             $this->write($css, $ieContent);
                         }
                     }
                 }
             } elseif ($optimFileExist) {
                 $writeResult = true;
             }
             unset($contents, $arIEContent);
         }
     }
     $label = $prefix == 'template' || substr($prefix, 0, 9) == 'template_' ? ' data-template-style="true" ' : '';
     if ($type == 'css' && $this->isIE && $writeResult) {
         for ($i = 0; $i <= $arFilesInfo['CUR_IE_CNT']; $i++) {
             $css = \CUtil::GetAdditionalFileURL(str_replace('#CNT#', $i, $cssFNameIE));
             $res .= '<link href="' . $this->cssDomain . $css . '" type="text/css" ' . ($i == 0 ? $label : '') . ' rel="stylesheet"' . ($this->xhtmlStyle ? ' /' : '') . '>' . "\n";
             $this->fileList['CSS'][$setName]['FILES'][] = $this->cssDomain . $css;
         }
     } else {
         if ($type == 'css') {
             if ($writeResult || !$writeResult && $unique && $action == 'UP') {
                 $css = \CUtil::GetAdditionalFileURL($optimFile);
                 $res .= '<link href="' . $this->cssDomain . $css . '" type="text/css" ' . $label . ' rel="stylesheet"' . ($this->xhtmlStyle ? ' /' : '') . '>' . "\n";
                 $this->fileList['CSS'][$setName]['FILES'][] = $this->cssDomain . $css;
             }
             if (!$writeResult) {
                 if ($this->isIE) {
                     $cnt = 0;
                     $resContent = '';
                     $ruleCount = 0;
                     foreach ($arFile as $file) {
                         if ($cnt < $this->maxStylesCnt) {
                             $res .= '<link href="' . $this->cssDomain . $file['FULL_PATH'] . '" ' . ($cnt == 0 ? $label : '') . ' type="text/css" rel="stylesheet"' . ($this->xhtmlStyle ? ' /' : '') . '>' . "\n";
                             $this->fileList['CSS'][$setName]['FILES'][] = $this->cssDomain . $file['FULL_PATH'];
                         } else {
                             $tmpInfo = $this->showInlineCssIE($file['FILE_PATH'], $file['FULL_PATH'], $ruleCount, true);
                             $ruleCount = $tmpInfo['CNT'];
                             $resContent .= $tmpInfo['CONTENT'];
                         }
                         $cnt++;
                     }
                     if ($resContent != '') {
                         $res .= '<style type="text/css">' . "\n" . $resContent . "\n</style>\n";
                     }
                 } else {
                     foreach ($arFile as $file) {
                         $res .= '<link href="' . $this->cssDomain . $file['FULL_PATH'] . '" type="text/css" ' . $label . ' rel="stylesheet"' . ($this->xhtmlStyle ? ' /' : '') . '>' . "\n";
                         $this->fileList['CSS'][$setName]['FILES'][] = $this->jsDomain . $file['FULL_PATH'];
                     }
                 }
             }
         } else {
             if ($writeResult || !$writeResult && $unique && $action == 'UP') {
                 $js = \CUtil::GetAdditionalFileURL($optimFile);
                 $res .= '<script type="text/javascript" src="' . $this->jsDomain . $js . '"></script>' . "\n";
                 $this->fileList['JS'][$setName]['FILES'][] = $this->jsDomain . $js;
             }
             if (!$writeResult) {
                 foreach ($arFile as $file) {
                     $res .= '<script type="text/javascript" src="' . $this->jsDomain . $file['FULL_PATH'] . '"></script>' . "\n";
                     $this->fileList['JS'][$setName]['FILES'][] = $this->jsDomain . $file['FULL_PATH'];
                 }
             }
         }
     }
     $arF = array();
     foreach ($arFilesInfo['FILES'] as $key => $time) {
         $arF[] = str_replace($documentRoot, '', $key) . '?' . $time;
     }
     unset($arFile, $arFilesInfo);
     return array('RESULT' => $res, 'FILES' => $arF);
 }
Пример #19
0
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>


<script src="<?php 
echo CUtil::GetAdditionalFileURL(SITE_TEMPLATE_PATH . "/js/jquery-1.11.1.min.js");
?>
"></script>



</body></html>
Пример #20
0
 /**
  * Sets viewport-metadata
  */
 public static function initScripts()
 {
     global $APPLICATION;
     \CJSCore::Init();
     $APPLICATION->AddHeadString("<script type=\"text/javascript\">var mobileSiteDir=\"" . SITE_DIR . "\"; var appVersion = " . self::$apiVersion . ";var platform = \"" . self::$platform . "\";</script>", false, true);
     if (self::$platform == "android") {
         /**
          * This is workaround for android
          * We use console.log() to tell the application about successful loading of this page
          */
         $APPLICATION->AddHeadString("<script type=\"text/javascript\">console.log(\"bxdata://success\")</script>", false, true);
     }
     if (self::getInstance()->getBXScriptSupported()) {
         /**
          * If the application tells us bxscript-feature is available
          * it means that device can load cordova-scripts (including plugins) itself.
          */
         $pgJsFile = "/bitrix/js/mobileapp/__deviceload__/cordova.js";
         $APPLICATION->AddHeadString("<script type=\"text/javascript\" src=\"" . $pgJsFile . "\"></script>", false, true);
     } else {
         $pgJsFile = "/bitrix/js/mobileapp/" . self::$platform . "-cordova-" . self::$pgVersion . ".js";
         if (!File::isFileExists(Application::getDocumentRoot() . $pgJsFile)) {
             $pgJsFile = self::$remoteScriptPath . self::$platform . "-cordova-" . self::$pgVersion . ".js";
         }
         $APPLICATION->AddHeadString("<script type=\"text/javascript\" src=\"" . \CUtil::GetAdditionalFileURL($pgJsFile) . "\"></script>", false, true);
     }
     $APPLICATION->AddHeadString("<script type=\"text/javascript\" src=\"" . \CUtil::GetAdditionalFileURL("/bitrix/js/mobileapp/bitrix_mobile.js") . "\"></script>", false, true);
     $APPLICATION->AddHeadString("<script type=\"text/javascript\" src=\"" . \CUtil::GetAdditionalFileURL("/bitrix/js/mobileapp/mobile_lib.js") . "\"></script>", false, true);
     if (self::$platform == "android") {
         $APPLICATION->AddHeadString("<script type=\"text/javascript\">app.bindloadPageBlank();</script>", false, false);
     }
     $APPLICATION->AddHeadString(Mobile::getInstance()->getViewPort());
 }
Пример #21
0
?>
 class="<?php 
echo CMobile::$platform;
?>
">
<head>
	<?php 
$APPLICATION->ShowHead();
?>
	<meta http-equiv="Content-Type" content="text/html;charset=<?php 
echo SITE_CHARSET;
?>
"/>
	<meta name="format-detection" content="telephone=no">
	<!--<link href="<?php 
echo CUtil::GetAdditionalFileURL(SITE_TEMPLATE_PATH . "/template_styles.css");
?>
" type="text/css" rel="stylesheet" />-->
	<?php 
//$APPLICATION->ShowHeadStrings();
?>
	<?php 
$APPLICATION->AddHeadScript(SITE_TEMPLATE_PATH . "/script.js");
?>
	<?php 
CJSCore::Init('ajax');
?>
	<title><?php 
$APPLICATION->ShowTitle();
?>
</title>
Пример #22
0
 function Show($Params)
 {
     global $APPLICATION, $USER, $EC_UserFields;
     $this->GetPermissions(array('userId' => $curUserId));
     if (!$this->bAccess) {
         return $APPLICATION->ThrowException(GetMessage("EC_ACCESS_DENIED"));
     }
     if ($this->reserveMeetingReadonlyMode) {
         $this->bReadOnly = true;
     }
     $arCalendars = $this->GetCalendarsEx();
     // Cache inside
     $sectionId = $this->GetSectionId();
     // * * * HANDLE SUPERPOSED CALENDARS  * * *
     if ($this->allowSuperpose) {
         $this->HandleSuperpose($this->arSPIblIds, true);
     }
     $arCalendarIds = $this->GetUserActiveCalendars();
     // Show popup event at start
     if (isset($_GET['EVENT_ID']) && intVal($_GET['EVENT_ID']) > 0) {
         $eventId = intVal($_GET['EVENT_ID']);
         $bDelEvent = false;
         $rsEvent = CIBlockElement::GetList(array(), array("IBLOCK_ID" => $this->iblockId, "ACTIVE" => "Y", "ID" => $eventId, "CHECK_PERMISSIONS" => "N"), false, false, array("ACTIVE_FROM", "IBLOCK_SECTION_ID", "CREATED_BY", "PROPERTY_CONFIRMED"));
         if ($ev = $rsEvent->Fetch()) {
             if ($ev["CREATED_BY"] == $USER->GetId() && isset($_GET['CONFIRM']) && $ev["PROPERTY_CONFIRMED_ENUM_ID"] == $this->GetConfirmedID($this->iblockId, "Q")) {
                 $this->GenEventDynClose($eventId);
                 if ($_GET['CONFIRM'] == 'Y') {
                     $this->ClearCache($this->cachePath . 'events/' . $this->iblockId . '/');
                     $this->ConfirmEvent(array('id' => $eventId, 'bCheckOwner' => false));
                 } elseif ($_GET['CONFIRM'] == 'N') {
                     $this->ClearCache($this->cachePath . 'events/' . $this->iblockId . '/');
                     CECEvent::Delete(array('id' => $eventId, 'iblockId' => $this->iblockId, 'ownerType' => $this->ownerType, 'ownerId' => $this->ownerId, 'userId' => $USER->GetId(), 'pathToUserCalendar' => $this->pathToUserCalendar, 'RMiblockId' => $this->allowResMeeting ? $this->RMiblockId : 0, 'allowResMeeting' => $this->allowResMeeting, 'VMiblockId' => $this->allowVideoMeeting ? $this->VMiblockId : 0, 'allowVideoMeeting' => $this->allowVideoMeeting));
                     $bDelEvent = true;
                     // Event was deleted
                     $eventId = false;
                 }
             } elseif ($ev["CREATED_BY"] == $USER->GetId() && isset($_GET['CLOSE_MESS']) && $_GET['CLOSE_MESS'] == 'Y') {
                 $this->GenEventDynClose($eventId);
             }
             if (!$bDelEvent) {
                 // If user turn off this calendar
                 if (!in_array($ev["IBLOCK_SECTION_ID"], $arCalendarIds)) {
                     $arCalendarIds[] = $ev["IBLOCK_SECTION_ID"];
                 }
                 if (!isset($_GET['EVENT_DATE'])) {
                     $date = $ev['ACTIVE_FROM'];
                 } else {
                     $date = $_GET['EVENT_DATE'];
                 }
                 $ts = MakeTimeStamp($date, getTSFormat());
                 $startup_event_date = date(getDateFormat(false), $ts);
                 $init_month = date('m', $ts);
                 $init_year = date('Y', $ts);
             }
         }
         $arStartupEvent = $eventId ? array('id' => $eventId, 'date' => $startup_event_date) : false;
     } else {
         $arStartupEvent = false;
     }
     if (!$init_month && !$init_year && strlen($Params["initDate"]) > 0 && strpos($Params["initDate"], '.') !== false) {
         $ts = MakeTimeStamp($Params["initDate"], getTSFormat());
         $init_month = date('m', $ts);
         $init_year = date('Y', $ts);
     }
     if (!isset($init_month)) {
         $init_month = date("m");
     }
     if (!isset($init_year)) {
         $init_year = date("Y");
     }
     $id = 'EC' . rand() . '_';
     if (!isset($Params['weekHolidays'])) {
         $Params['weekHolidays'] = array(5, 6);
     }
     if ($Params["workTime"][0] <= 0) {
         $Params["workTime"][0] = 9;
     }
     if ($Params["workTime"][1] <= 0) {
         $Params["workTime"][1] = 19;
     }
     if (isset($Params['yearHolidays'])) {
         $Params['yearHolidays'] = explode(',', $Params['yearHolidays']);
         array_walk($Params['yearHolidays'], 'trim_');
     } else {
         $Params['yearHolidays'] = array();
     }
     $arCalColors = array('#CEE669', '#E6A469', '#98AEF6', '#7DDEC2', '#B592EC', '#D98E85', '#F6EA68', '#DDBFEB');
     $arStrWeek = array(array(GetMessage('EC_MON_F'), GetMessage('EC_MON')), array(GetMessage('EC_TUE_F'), GetMessage('EC_TUE')), array(GetMessage('EC_WEN_F'), GetMessage('EC_WEN')), array(GetMessage('EC_THU_F'), GetMessage('EC_THU')), array(GetMessage('EC_FRI_F'), GetMessage('EC_FRI')), array(GetMessage('EC_SAT_F'), GetMessage('EC_SAT')), array(GetMessage('EC_SAN_F'), GetMessage('EC_SAN')));
     $arStrMonth = array(GetMessage('EC_JAN'), GetMessage('EC_FEB'), GetMessage('EC_MAR'), GetMessage('EC_APR'), GetMessage('EC_MAY'), GetMessage('EC_JUN'), GetMessage('EC_JUL'), GetMessage('EC_AUG'), GetMessage('EC_SEP'), GetMessage('EC_OCT'), GetMessage('EC_NOV'), GetMessage('EC_DEC'));
     $arStrMonth_R = array(GetMessage('EC_JAN_R'), GetMessage('EC_FEB_R'), GetMessage('EC_MAR_R'), GetMessage('EC_APR_R'), GetMessage('EC_MAY_R'), GetMessage('EC_JUN_R'), GetMessage('EC_JUL_R'), GetMessage('EC_AUG_R'), GetMessage('EC_SEP_R'), GetMessage('EC_OCT_R'), GetMessage('EC_NOV_R'), GetMessage('EC_DEC_R'));
     $EC_UserFields = false;
     $this->CheckSectionProperties($this->iblockId, $this->ownerType);
     $UserSettings = $this->GetUserSettings();
     if (!$this->bReadOnly && count($arCalendars) > 0) {
         $this->bShowBanner = true;
     }
     if (isset($UserSettings['ShowBanner']) && !$UserSettings['ShowBanner']) {
         $this->bShowBanner = false;
     }
     $JSConfig = array('sessid' => bitrix_sessid(), 'month' => $arStrMonth, 'month_r' => $arStrMonth_R, 'days' => $arStrWeek, 'id' => $id, 'week_holidays' => $Params['weekHolidays'], 'year_holidays' => $Params['yearHolidays'], 'iblockId' => $this->iblockId, 'init_month' => $init_month, 'init_year' => $init_year, 'arCalColors' => $arCalColors, 'bReadOnly' => $this->bReadOnly, 'ownerType' => $this->ownerType, 'ownerId' => $this->ownerId, 'userId' => $this->userId, 'userName' => $this->userName, 'section_id' => $sectionId, 'arCalendars' => $arCalendars, 'arCalendarIds' => $arCalendarIds, 'page' => $this->pageUrl, 'fullUrl' => $this->fullUrl, 'startupEvent' => $arStartupEvent, 'bSuperpose' => $this->bSuperpose, 'arSPCalendars' => $this->arSPCal, 'arSPCalendarsShow' => $this->arSPCalShow, 'superposeExportLink' => $this->superposeExportLink, 'bSPUserCals' => $this->superposeUsersCals || $this->superposeCurUserCals, 'SP' => $this->GetCurCalsSPParams(), 'allowAdd2SP' => $this->allowAdd2SP, 'workTime' => $Params["workTime"], 'Settings' => $UserSettings, 'bSocNet' => $this->bSocNet, 'pathToUser' => $this->pathToUser, 'dateFormat' => CSite::GetDateFormat("SHORT", SITE_ID), 'meetingRooms' => $this->GetMeetingRoomList(), 'allowResMeeting' => $this->allowResMeeting, 'allowVideoMeeting' => $this->allowVideoMeeting, 'bExtranet' => $this->bExtranet, 'bShowBanner' => $this->bShowBanner, 'planner_js_src' => '/bitrix/js/intranet/event_calendar/planner.js?v=' . filemtime($_SERVER['DOCUMENT_ROOT'] . "/bitrix/js/intranet/event_calendar/planner.js"), 'reserveMeetingReadonlyMode' => $this->reserveMeetingReadonlyMode);
     if ($this->reserveMeetingReadonlyMode) {
         $JSConfig['pathToReserveNew'] = $this->pathToReserveNew;
     }
     if (CEventCalendar::IsCalDAVEnabled() && $this->ownerType == "USER") {
         $JSConfig['bCalDAV'] = true;
         if (defined("SITE_SERVER_NAME") && strlen(SITE_SERVER_NAME) > 0) {
             $serverName = SITE_SERVER_NAME;
         } else {
             $serverName = COption::GetOptionString("main", "server_name", $_SERVER["SERVER_NAME"]);
         }
         $JSConfig['caldav_link_all'] = (CMain::IsHTTPS() ? "https://" : "http://") . $serverName;
         if ($this->ownerType == 'USER') {
             if ($this->ownerId == $this->userId) {
                 $login = $USER->GetLogin();
             } else {
                 $rsUser = CUser::GetByID($this->ownerId);
                 if ($arUser = $rsUser->Fetch()) {
                     $login = $arUser['LOGIN'];
                 }
             }
             $JSConfig['caldav_link_one'] = (CMain::IsHTTPS() ? "https://" : "http://") . $_SERVER["SERVER_NAME"] . "/bitrix/groupdav.php/" . SITE_ID . "/" . $login . "/calendar/#CALENDAR_ID#/";
         } else {
             if ($this->ownerType == 'GROUP') {
                 $JSConfig['caldav_link_one'] = (CMain::IsHTTPS() ? "https://" : "http://") . $_SERVER["SERVER_NAME"] . "/bitrix/groupdav.php/" . SITE_ID . "/group-" . $this->ownerId . "/calendar/#CALENDAR_ID#/";
             }
         }
         if ($this->ownerType == 'USER') {
             $res = CDavConnection::GetList(array("ID" => "DESC"), array("ENTITY_TYPE" => "user", "ENTITY_ID" => $this->ownerId, "ACCOUNT_TYPE" => 'caldav'), false, false);
             $arConnections = array();
             while ($arCon = $res->Fetch()) {
                 $arConnections[] = array('id' => $arCon['ID'], 'name' => $arCon['NAME'], 'link' => $arCon['SERVER'], 'user_name' => $arCon['SERVER_USERNAME'], 'last_result' => $arCon['LAST_RESULT'], 'sync_date' => $arCon['SYNCHRONIZED']);
             }
             $JSConfig['connections'] = $arConnections;
         }
     }
     if (CEventCalendar::IsExchangeEnabled() && $this->ownerType == 'USER') {
         $JSConfig['bExchange'] = true;
     }
     $from_limit = date(getDateFormat(false), mktime(0, 0, 0, $init_month - 1, 20, $init_year));
     $to_limit = date(getDateFormat(false), mktime(0, 0, 0, $init_month + 1, 10, $init_year));
     $this->SetLoadLimits($init_month, $init_year);
     if ($sectionId !== false) {
         // Get events  (*Cache Inside)
         $ids = array();
         for ($i = 0, $l = count($arCalendars); $i < $l; $i++) {
             if (in_array($arCalendars[$i]['ID'], $arCalendarIds)) {
                 $ids[] = $arCalendars[$i]['ID'];
             }
         }
         $JS_arEvents = $this->GetEventsEx(array("bJS" => true, "arCalendarIds" => $ids, 'DontSaveOptions' => true, 'checkPermissions' => false));
         // Get events from superposed calendars *Favorite calendars*
         $JS_arSPEvents = $this->GetSuperposedEvents(array('bJS' => true));
     } else {
         $JS_arEvents = '[]';
         $JS_arSPEvents = '[]';
     }
     $APPLICATION->AddHeadString('<link rel="stylesheet" type="text/css" href="' . CUtil::GetAdditionalFileURL("/bitrix/js/intranet/event_calendar/event_calendar.css") . '">');
     // Build calendar base html and dialogs
     CEventCalendar::BuildCalendarSceleton(array('bExtranet' => $this->bExtranet, 'bReadOnly' => $this->bReadOnly, 'id' => $id, 'arCalendarsCount' => count($arCalendars), 'allowSuperpose' => $this->allowSuperpose, 'bSocNet' => $this->bSocNet, 'week_days' => $arStrWeek, 'ownerId' => $this->ownerId, 'ownerType' => $this->ownerType, 'component' => $component, 'bShowBanner' => $this->bShowBanner));
     // Append Javascript files and CSS files
     $this->AppendJS(array('JSConfig' => CUtil::PhpToJSObject($JSConfig), 'JS_arEvents' => $JS_arEvents, 'JS_arSPEvents' => $JS_arSPEvents));
 }
Пример #23
0
	private static function _loadCSS($css, $bReturn)
	{
		if (is_array($css))
		{
			$ret = '';
			foreach ($css as $css_file)
				$res .= self::_loadCSS($css_file, $bReturn);
			return $ret;
		}

		$css_filename = $_SERVER['DOCUMENT_ROOT'].$css;

		if (!file_exists($css_filename))
			return '';

		if ($bReturn)
			return '<link href="'.CUtil::GetAdditionalFileURL($css).'" type="text/css" rel="stylesheet" />'."\r\n";
		else
			$GLOBALS['APPLICATION']->SetAdditionalCSS($css);

		return '';
	}
Пример #24
0
<?php
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");

// Раздел виден только авторизованным пользователям
if ($USER->IsAuthorized())
{
	?>
	<link rel="stylesheet" type="text/css" href="<?=CUtil::GetAdditionalFileURL("style.css")?>" />
	<?php
	if (CModule::IncludeModule("iblock"))
	{
		?>
		<div class="conteiner">
		<h1>Список товаров к обработке</h1>
		<h3>Ответственный: <?=$USER->GetFullName()?></h3>
		<p>После обработки позиции снимите галочку «Отправлено на доработку» и позиция исчезнет из этого списка</p>
		<?php
		// Только товары, где ответственный текущий пользователь
		$GLOBALS["arrFilterSec"]["PROPERTY_C_MANAGER"] = $USER->GetID();
		// и помеченный на редактирование
		$GLOBALS["arrFilterSec"]["!PROPERTY_C_TO_EDIT_FLAG"] = false;
		
		$APPLICATION->IncludeComponent(
			"bitrix:catalog.section", 
			"content-to-edit", 
			array(
				"IBLOCK_TYPE" => "catalog",
				"IBLOCK_ID" => "4",
				"SECTION_ID" => "",
				"SECTION_CODE" => "",
				"SECTION_USER_FIELDS" => array(
Пример #25
0
    public function LoadScript($arParams)
    {
        if (!is_array($arParams)) {
            $arParams = array("formID" => $arParams);
        }
        if (!isset($arParams['recoverMessage'])) {
            $arParams['recoverMessage'] = GetMessage('F_MESSAGE_RECOVER');
        }
        $jsParams = CUtil::PhpToJSObject($arParams);
        $id = $this->as->GetID();
        ob_start();
        ?>
		<script>
		window.autosave_<?php 
        echo $id;
        ?>
_func = function() { ForumFormAutosave(<?php 
        echo $jsParams;
        ?>
); window.autosave_<?php 
        echo $id;
        ?>
.Prepare(); };
		if (!!window["ForumFormAutosave"])
			window.autosave_<?php 
        echo $id;
        ?>
_func();
		else
		{
			BX.addCustomEvent(window, 'onScriptForumAutosaveLoaded', window.autosave_<?php 
        echo $id;
        ?>
_func);
			BX.loadScript("<?php 
        echo CUtil::GetAdditionalFileURL("/bitrix/js/forum/autosave.js");
        ?>
");
		}
		</script>
<?php 
        ob_end_flush();
    }
Пример #26
0
    public static function Show($arParams)
    {
        global $APPLICATION;
        CClock::Init($arParams);
        $APPLICATION->AddHeadScript('/bitrix/js/main/utils.js');
        // Show input
        switch ($arParams['view']) {
            case 'label':
                ?>
				<input type="hidden" id="<?php 
                echo $arParams['inputId'];
                ?>
" name="<?php 
                echo $arParams['inputName'];
                ?>
"  value="<?php 
                echo $arParams['initTime'];
                ?>
">
				<div id=class="bx-clock-label" onmouseover="this.className='bx-clock-label-over';" onmouseout="this.className='bx-clock-label';" onclick=""><?php 
                echo $arParams['initTime'] ? $arParams['initTime'] : 'Time';
                ?>
</div><?php 
                break;
            case 'select':
                ?>
				<select id="<?php 
                echo $arParams['inputId'];
                ?>
" name="<?php 
                echo $arParams['inputName'];
                ?>
">
					<?php 
                for ($i = 0; $i < 24; $i++) {
                    $h = $i < 10 ? '0' . $i : $i;
                    ?>
<option value="<?php 
                    echo $h;
                    ?>
:00"><?php 
                    echo $h;
                    ?>
:00</option><?php 
                    if ($arParams['step']) {
                        ?>
<option value="<?php 
                        echo $h;
                        ?>
:30"><?php 
                        echo $h;
                        ?>
:30</option><?php 
                    }
                }
                ?>
				</select>
				<?php 
                break;
            case 'inline':
                ?>
				<input type="hidden" id="<?php 
                echo $arParams['inputId'];
                ?>
" name="<?php 
                echo $arParams['inputName'];
                ?>
"  value="<?php 
                echo $arParams['initTime'];
                ?>
" />
				<div id="<?php 
                echo $arParams['inputId'];
                ?>
_clock"></div>
				<script type="text/javascript">
					if (!window.bxClockLoaders)
					{
						window.bxClockLoaders = [];
						window.onload = function() {
							for (var i=0; i<window.bxClockLoaders.length; i++)
								setTimeout(window.bxClockLoaders[i], 20*i + 20);
							window.bxClockLoaders = null;
						}
					}

					window.bxClockLoaders.push("bxShowClock_<?php 
                echo $arParams['inputId'];
                ?>
('<?php 
                echo $arParams['inputId'];
                ?>
_clock');");
				</script>
				<?php 
                break;
            default:
                //input
                ?>
<input id="<?php 
                echo $arParams['inputId'];
                ?>
" name="<?php 
                echo $arParams['inputName'];
                ?>
" type="text" value="<?php 
                echo $arParams['initTime'];
                ?>
" size="<?php 
                echo IsAmPmMode() ? 6 : 4;
                ?>
" title="<?php 
                echo $arParams['inputTitle'];
                ?>
" /><?php 
                break;
        }
        // Show icon
        if ($arParams['showIcon'] !== false) {
            ?>
<a href="javascript:void(0);" onclick="bxShowClock_<?php 
            echo $arParams['inputId'];
            ?>
()" title="<?php 
            echo GetMessage('BX_CLOCK_TITLE');
            ?>
" onmouseover="this.className='bxc-icon-hover';" onmouseout="this.className='';"><img id="<?php 
            echo $arParams['inputId'];
            ?>
_icon" src="/bitrix/images/1.gif" class="bx-clock-icon bxc-iconkit-c"></a><?php 
        }
        //Init JS and append CSS
        ?>
<script>
		function bxLoadClock_<?php 
        echo $arParams['inputId'];
        ?>
(callback)
		{
			<?php 
        if ($arParams['view'] != 'inline') {
            ?>
			if (!window.JCClock && !window.jsUtils)
			{
				return setTimeout(function(){bxLoadClock_<?php 
            echo $arParams['inputId'];
            ?>
(callback);}, 50);
			}
			<?php 
        }
        ?>

			if (!window.JCClock)
			{
				if(!!window.bClockLoading)
				{
					return setTimeout(function(){bxLoadClock_<?php 
        echo $arParams['inputId'];
        ?>
(callback);}, 50);
				}
				else
				{
					window.bClockLoading = true;
					return BX.load(
						[
							'<?php 
        echo CUtil::GetAdditionalFileURL("/bitrix/js/main/clock.js");
        ?>
',
							'<?php 
        echo CUtil::GetAdditionalFileURL("/bitrix/themes/.default/clock.css");
        ?>
'
						],
						function() {bxLoadClock_<?php 
        echo $arParams['inputId'];
        ?>
(callback)}
					);
				}
			}

			window.bClockLoading = false;

			var obId = 'bxClock_<?php 
        echo $arParams['inputId'];
        ?>
';

			window[obId] = new JCClock({
				step: <?php 
        echo $arParams['step'];
        ?>
,
				initTime: '<?php 
        echo $arParams['initTime'];
        ?>
',
				showIcon: <?php 
        echo $arParams['showIcon'] ? 'true' : 'false';
        ?>
,
				inputId: '<?php 
        echo $arParams['inputId'];
        ?>
',
				iconId: '<?php 
        echo $arParams['inputId'] . '_icon';
        ?>
',
				zIndex: <?php 
        echo isset($arParams['zIndex']) ? intval($arParams['zIndex']) : 0;
        ?>
,
				AmPmMode: <?php 
        echo $arParams['am_pm_mode'] ? 'true' : 'false';
        ?>
,
				MESS: {
					Insert: '<?php 
        echo GetMessageJS('BX_CLOCK_INSERT');
        ?>
',
					Close: '<?php 
        echo GetMessageJS('BX_CLOCK_CLOSE');
        ?>
',
					Hours: '<?php 
        echo GetMessageJS('BX_CLOCK_HOURS');
        ?>
',
					Minutes: '<?php 
        echo GetMessageJS('BX_CLOCK_MINUTES');
        ?>
',
					Up: '<?php 
        echo GetMessageJS('BX_CLOCK_UP');
        ?>
',
					Down: '<?php 
        echo GetMessageJS('BX_CLOCK_DOWN');
        ?>
'
				}
				});

			return callback.apply(window, [window[obId]]);
		}

		function bxShowClock_<?php 
        echo $arParams['inputId'];
        ?>
(id)
		{
			bxLoadClock_<?php 
        echo $arParams['inputId'];
        ?>
(function(obClock)
			{
				obClock.Show(id);
			});
		}
	</script><?php 
    }
Пример #27
0
<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
global $APPLICATION;
$APPLICATION->AddHeadString('<script type="text/javascript" src="' . CUtil::GetAdditionalFileURL(SITE_TEMPLATE_PATH . '/crm_mobile.js') . '"></script>', true, \Bitrix\Main\Page\AssetLocation::AFTER_JS_KERNEL);
$APPLICATION->SetPageProperty('BodyClass', 'crm-page');
$UID = $arResult['UID'];
$mode = $arResult['MODE'];
$prefix = htmlspecialcharsbx($UID);
$entityID = $arResult['ENTITY_ID'];
$entity = $arResult['ENTITY'];
$dataItem = CCrmMobileHelper::PrepareCompanyData($entity);
$multiFieldTypeInfos = CCrmFieldMulti::GetEntityTypes();
$multiFieldTypeSettings = array();
foreach ($multiFieldTypeInfos as $multiFieldTypeID => &$multiFieldTypeInfo) {
    $multiFieldTypeSettings[$multiFieldTypeID] = array();
    foreach ($multiFieldTypeInfo as $multiFieldValueTypeID => &$multiFieldValueTypeInfo) {
        $multiFieldTypeSettings[$multiFieldTypeID][$multiFieldValueTypeID] = isset($multiFieldValueTypeInfo['ABBR']) ? $multiFieldValueTypeInfo['ABBR'] : $multiFieldValueTypeID;
    }
    unset($multiFieldValueTypeInfo);
}
unset($multiFieldTypeInfo);
$formTitle = GetMessage("M_CRM_COMPANY_EDIT_{$mode}_TITLE");
if (!function_exists('__CrmMobileCompanyEditRenderMultiFields')) {
    function __CrmMobileCompanyEditRenderMultiFields($typeName, &$fields, &$typeInfos, $prefix = '')
    {
        $typeName = strtoupper($typeName);
        $data = isset($fields[$typeName]) ? $fields[$typeName] : array();
        if ($prefix !== '') {
Пример #28
0
}
$href = $arParams["PATH_TO_TASKS"];
if (isset($_GET['VIEW'])) {
    $href .= '?VIEW=' . (int) $_GET['VIEW'] . '&F_CANCEL=Y';
} else {
    $href .= '?F_CANCEL=Y';
}
?>
<script>
BX.ready(function(){
	BX.Tasks.filterV2.pathToTasks = '<?php 
echo CUtil::JSEscape($href);
?>
';
	BX.Tasks.filterV2.pathToEngineScript = '<?php 
echo CUtil::GetAdditionalFileURL('/bitrix/components/bitrix/tasks.filter.v2/templates/constructor/engine.js');
?>
';
});
</script>
<div class="task-filter-head">
	<div class="task-filter-title"><?php 
echo GetMessage("TASKS_FILTER");
?>
</div>
	<div class="task-filter-mode"><a href="" onclick="BX.PreventDefault(event); return SwitchTaskFilter(this);"<?php 
if ($arParams["ADV_FILTER"]["F_ADVANCED"] != "Y") {
    ?>
 class="task-filter-mode-selected"<?php 
}
?>
Пример #29
0
 <= 100)
			setTimeout(__vote<?php 
echo $uid;
?>
, 10);
		return false;
	}

	if (! <?php 
echo $controller;
?>
.loaded) {
		BX.loadScript(
				[
					'<?php 
echo CUtil::GetAdditionalFileURL('/bitrix/components/bitrix/voting.current/templates/.userfield/script.js');
?>
',
					'/bitrix/js/main/core/core_ajax.js',
					'/bitrix/js/main/core/core_dd.js',
					'/bitrix/js/main/core/core_popup.js'
				], function() {
					BX.loadCSS('/bitrix/components/bitrix/rating.vote/templates/like/popup.css');
			<?php 
echo $controller;
?>
.loaded = true;
					BVote<?php 
echo $uid;
?>
 = new BVotedUser({
Пример #30
0
function ForumAddDeferredScript($script)
{
    $url = CUtil::GetAdditionalFileURL($script);
    return "<script>BX.ready(function(){BX.loadScript(\"" . $url . "\");});</script>\n";
}