?> _items')); }); </script> <? if (isset($arResult['REQUEST_ITEMS'])) { CJSCore::Init(array('ajax')); // component parameters $signer = new \Bitrix\Main\Security\Sign\Signer; $signedParameters = $signer->sign( base64_encode(serialize($arResult['_ORIGINAL_PARAMS'])), 'bx.bd.products.recommendation' ); $signedTemplate = $signer->sign($arResult['RCM_TEMPLATE'], 'bx.bd.products.recommendation'); ?> <span id="<?php echo $injectId; ?> " class="bigdata_recommended_products_container"></span> <script type="application/javascript"> BX.ready(function(){ var params = <?php
public static function generateToken($workflowId, $activityName, $eventId) { $signer = new \Bitrix\Main\Security\Sign\Signer(); return $signer->sign($workflowId . '|' . $activityName . '|' . $eventId, self::TOKEN_SALT); }
$arParams["ERROR_MESSAGE"] = trim($arParams["ERROR_MESSAGE"]); $arParams["OK_MESSAGE"] = trim($arParams["OK_MESSAGE"]); // Template params $arParams["VISIBLE_RECORDS_COUNT"] = !!$arParams["NAV_RESULT"] ? intval($arParams["VISIBLE_RECORDS_COUNT"]) : 0; $arParams["TEMPLATE_ID"] = !!$arParams["TEMPLATE_ID"] ? $arParams["TEMPLATE_ID"] : 'COMMENT_' . $arParams["ENTITY_XML_ID"] . '_'; $arParams["AVATAR_SIZE"] = $arParams["AVATAR_SIZE"] > 0 ? $arParams["AVATAR_SIZE"] : 39; //$arParams["IMAGE_SIZE"] = ($arParams["IMAGE_SIZE"] > 0 ? $arParams["IMAGE_SIZE"] : 30); $arParams['SHOW_MINIMIZED'] = $arParams['SHOW_MINIMIZED'] == "Y" ? "Y" : "N"; $arParams["PATH_TO_USER"] = trim($arParams["PATH_TO_USER"]); $arParams["NAME_TEMPLATE"] = !!$_REQUEST["NAME_TEMPLATE"] ? $_REQUEST["NAME_TEMPLATE"] : CSite::GetNameFormat(); $arParams["SHOW_LOGIN"] = $_REQUEST["SHOW_LOGIN"] == "Y" ? "Y" : "N"; $arParams["DATE_TIME_FORMAT"] = trim($arParams["DATE_TIME_FORMAT"]); $arParams["SHOW_POST_FORM"] = $arParams["SHOW_POST_FORM"] == "Y" ? "Y" : "N"; $arParams["BIND_VIEWER"] = $arParams["BIND_VIEWER"] == "Y" ? "Y" : "N"; $sign = new \Bitrix\Main\Security\Sign\Signer(); $arParams["SIGN"] = $sign->sign($arParams["ENTITY_XML_ID"], "main.post.list"); if ($arParams["VISIBLE_RECORDS_COUNT"] > 0) { if ($arParams["NAV_RESULT"]->bShowAll) { $arParams["VISIBLE_RECORDS_COUNT"] = 0; } else { if (array_key_exists($arResult['RESULT'], $arParams["RECORDS"])) { $arParams["VISIBLE_RECORDS_COUNT"] = count($arResult["MESSAGES"]); } else { if ($arParams["NAV_RESULT"]->NavRecordCount <= $arParams["VISIBLE_RECORDS_COUNT"]) { $arParams["VISIBLE_RECORDS_COUNT"] = $arParams["NAV_RESULT"]->NavRecordCount; } else { if (isset($_REQUEST["PAGEN_" . $arParams["NAV_RESULT"]->NavNum]) || isset($_REQUEST["FILTER"]) && $arParams["ENTITY_XML_ID"] == $_REQUEST["ENTITY_XML_ID"]) { $arParams["VISIBLE_RECORDS_COUNT"] = 0; } } }
$cond = $arTemplates[$key]; } else { continue; } } $SITE_TEMPLATE[$key] = array("TEMPLATE" => $val['TEMPLATE'], "SORT" => $val['SORT'], "CONDITION" => $cond); } } $signer = new Bitrix\Main\Security\Sign\Signer(); //templates $arSiteTemplates = array(); $templateSigns = array(); $db_res = CSiteTemplate::GetList(array("sort" => "asc", "name" => "asc"), array("TYPE" => ""), array("ID", "NAME")); while ($arRes = $db_res->GetNext()) { $arSiteTemplates[] = $arRes; $templateSigns[$arRes["ID"]] = $signer->sign($arRes["ID"], "template_preview" . bitrix_sessid()); } $bFirst = true; foreach ($SITE_TEMPLATE as $i => $val) { ConditionParse($val['CONDITION']); ?> <tr> <td> <select name="SITE_TEMPLATE[<?php echo $i; ?> ][TEMPLATE]" id="SITE_TEMPLATE[<?php echo $i; ?> ][TEMPLATE]"> <option value=""><?php
?> " class="adm-btn-save"> <input <?php echo $dis ? "disabled" : ""; ?> type="submit" name="apply" value="<?php echo GetMessage("admin_lib_edit_apply"); ?> " title="<?php GetMessage("admin_lib_edit_apply_title"); ?> "> <?php if (($USER->CanDoOperation('edit_other_settings') || $USER->CanDoOperation('lpa_template_edit')) && !empty($ID) && !$isEditingMessageThemePage) { $signer = new Bitrix\Main\Security\Sign\Signer(); $sign = $signer->sign($ID, "template_preview" . bitrix_sessid()); ?> <input type="button" value="<?php echo GetMessage('FILEMAN_PREVIEW_TEMPLATE'); ?> " name="template_preview" onclick="preview_template('<?php echo htmlspecialcharsbx(CUtil::JSEscape($ID)); ?> ', '<?php echo bitrix_sessid(); ?> ', '<?php echo htmlspecialcharsbx(CUtil::JSEscape($sign)); ?> ');" title="<?php echo GetMessage('FILEMAN_PREVIEW_TEMPLATE_TITLE');
if (\Bitrix\Main\ModuleManager::isModuleInstalled("intranet") || \Bitrix\Main\ModuleManager::isModuleInstalled("rest")) { $arResult["FOR_INTRANET"] = true; } if (\Bitrix\Main\Loader::includeModule("socialservices") && $arResult["ALLOW_SOCSERV_AUTHORIZATION"] == 'Y') { $oAuthManager = new CSocServAuthManager(); $arServices = $oAuthManager->GetActiveAuthServices(array('BACKURL' => $this->arParams['~CURRENT_PAGE'], 'FOR_INTRANET' => $arResult['FOR_INTRANET'])); if (!empty($arServices)) { $APPLICATION->IncludeComponent("bitrix:socserv.auth.form", "flat", array("AUTH_SERVICES" => $arServices, "AUTH_URL" => $arParams["~CURRENT_PAGE"], "POST" => $arResult["POST"]), $component, array("HIDE_ICONS" => "Y")); } } ?> </div> <?php $signer = new \Bitrix\Main\Security\Sign\Signer(); $signedParams = $signer->sign(base64_encode(serialize($arParams)), 'sale.order.ajax'); $messages = \Bitrix\Main\Localization\Loc::loadLanguageFile(__FILE__); ?> <script type="text/javascript"> BX.message(<?php echo CUtil::PhpToJSObject($messages); ?> ); BX.Sale.OrderAjaxComponent.init({ result: <?php echo CUtil::PhpToJSObject($arResult['JS_DATA']); ?> , locations: <?php echo CUtil::PhpToJSObject($arResult['LOCATIONS']);
<?php if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) { die; } if (IntVal($arParams["PAGE_ELEMENTS"]) <= 0) { $arParams["PAGE_ELEMENTS"] = 10; } $signer = new \Bitrix\Main\Security\Sign\Signer(); $arParams["ADDITIONAL_VALUES"] = "pe:" . $arParams["PAGE_ELEMENTS"] . ","; $arParams["ADDITIONAL_VALUES"] .= "gf:" . $arParams["GROUP_ID"] . ","; $nt = str_replace(",", "#COMMA#", $arParams["NAME_TEMPLATE"]); $arParams["ADDITIONAL_VALUES"] .= "nt:" . $signer->sign($nt) . ","; $sl = $arParams["SHOW_LOGIN"]; $arParams["ADDITIONAL_VALUES"] .= "sl:" . $signer->sign($sl) . ","; if (IsModuleInstalled("extranet") && strlen(CExtranet::GetExtranetSiteID()) > 0) { $arParams["ADDITIONAL_VALUES"] .= "ex:" . $arParams["EXTRANET"] . ","; $arParams["ADDITIONAL_VALUES"] .= "site:" . SITE_ID . ""; } $arParams["~ADDITIONAL_VALUES"] = $arParams["ADDITIONAL_VALUES"]; $arParams["ADDITIONAL_VALUES"] = CUtil::JSEscape($arParams["ADDITIONAL_VALUES"]); $arResult["TEXT"] = str_replace(array("<", ">"), array('<', '>'), $arParams["~TEXT"]);