本文整理汇总了PHP中CUtil::InitJSCore方法的典型用法代码示例。如果您正苦于以下问题:PHP CUtil::InitJSCore方法的具体用法?PHP CUtil::InitJSCore怎么用?PHP CUtil::InitJSCore使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CUtil
的用法示例。
在下文中一共展示了CUtil::InitJSCore方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetFormHtml
public function GetFormHtml($arParams,$onclickJs)
{
$mailru_id = self::GetOption("mailru_id");
$mailru_private_key = self::GetOption("mailru_private_key");
$aRemove = array("logout", "auth_service_error", "auth_service_id");
$url_err = $GLOBALS['APPLICATION']->GetCurPageParam('auth_service_id='.self::ID.'&auth_service_error=1', $aRemove);
$url_ok = $GLOBALS['APPLICATION']->GetCurPageParam('', $aRemove);
$script = '
<script type="text/javascript" src="//cdn.connect.mail.ru/js/loader.js"></script>
<script type="text/javascript">
if(typeof(mailru) != "undefined"){
BX.ready(function(){mailru.loader.require("api",
function()
{
mailru.connect.init(\''.CUtil::JSEscape($mailru_id).'\', \''.CUtil::JSEscape($mailru_private_key).'\');
mailru.events.listen(mailru.connect.events.login, function(sess){mailru.common.users.getInfo(function(res){BxMailRuAuthInfo(sess, res);});});
}
);});
}
function BxMailRuAuthInfo(sess, response)
{
var url_err = \''.CUtil::JSEscape($url_err).'\';
if(sess && response && response[0])
{
var url_post = \''.CUtil::JSEscape($arParams["~AUTH_URL"]).'\';
var url_ok = \''.CUtil::JSEscape($url_ok).'\';
var data = {
"auth_service_id": "'.self::ID.'",
"mailru_user": response[0],
"mailru_sess": sess
};
BX.ajax.post(url_post, data, function(res){window.location = (res == "OK"? url_ok : url_err);});
}
else
{
window.location = url_err;
}
}
</script>
';
CUtil::InitJSCore(array("ajax"));
$GLOBALS['APPLICATION']->AddHeadString($script, true);
if($onclickJs) {
$s = 'mailru.connect.login();';
} else {
if($arParams['NO_TEXT'] == 'Y'){
$s = '<a href="javascript:void(0)" onclick="mailru.connect.login();" class="bx-ss-button mymailru-button"></a>';
}else{
$s = '<a href="javascript:void(0)" onclick="mailru.connect.login();" class="bx-ss-button mymailru-button"></a><span class="bx-spacer"></span><span>'.GetMessage("socserv_mailru_note").'</span>';
}
}
return $s;
}
示例2: GetInfoHTML
public function GetInfoHTML($params = array())
{
$html = '';
if (is_array($this->_file)) {
$intWidth = $this->_width;
$intHeight = $this->_height;
$img_src = '';
$divId = '';
if (isset($params['url_template']) && $intWidth > 0 && $intHeight > 0) {
$img_src = $this->GetImgSrc(array('url_template' => $params['url_template']));
if ($img_src) {
CUtil::InitJSCore(array("viewer"));
self::$_counter++;
$divId = 'lists-image-info-' . self::$_counter;
}
}
if ($divId) {
$html .= '<div id="' . $divId . '">';
} else {
$html .= '<div>';
}
if (isset($params['view']) && $params['view'] == 'short') {
$info = $this->_file["FILE_NAME"] . ' (';
if ($intWidth > 0 && $intHeight > 0) {
$info .= $intWidth . 'x' . $intHeight . ', ';
}
$info .= CFile::FormatSize($this->_file['FILE_SIZE']) . ')';
if ($divId) {
$html .= GetMessage('FILE_TEXT') . ': <span style="cursor:pointer" data-bx-viewer="image" data-bx-src="' . htmlspecialcharsbx($img_src) . '">' . htmlspecialcharsex($info) . '</span>';
} else {
$html .= GetMessage('FILE_TEXT') . ': ' . htmlspecialcharsex($info);
}
} else {
if ($divId) {
$html .= GetMessage('FILE_TEXT') . ': <span style="cursor:pointer" data-bx-viewer="image" data-bx-src="' . htmlspecialcharsbx($img_src) . '">' . htmlspecialcharsex($this->_file["FILE_NAME"]) . '</span>';
} else {
$html .= GetMessage('FILE_TEXT') . ': ' . htmlspecialcharsex($this->_file["FILE_NAME"]);
}
if ($intWidth > 0 && $intHeight > 0) {
$html .= '<br>' . GetMessage('FILE_WIDTH') . ': ' . $intWidth;
$html .= '<br>' . GetMessage('FILE_HEIGHT') . ': ' . $intHeight;
}
$html .= '<br>' . GetMessage('FILE_SIZE') . ': ' . CFile::FormatSize($this->_file['FILE_SIZE']);
}
if ($divId) {
$html .= '</div><script>BX.ready(function(){BX.viewElementBind("' . $divId . '");});</script>';
} else {
$html .= '</div>';
}
}
return $html;
}
示例3: ShowStep
function ShowStep()
{
$this->content = '';
CUtil::InitJSCore();
$this->content .= <<<EOT
<script type="text/javascript">
function checkZIP()
{
\tvar obCSVFileRus = BX('loc_ussr');
\tvar obCSVFileNone = BX('none');
\tvar obZIPFile = BX('load_zip');
\tvar obOwnFile = BX('ffile');
\tif (obCSVFileRus && obCSVFileNone && obZIPFile && obOwnFile)
\t{
\t\tif (obCSVFileRus.checked || obCSVFileNone.checked || obOwnFile.checked)
\t\t\tobZIPFile.disabled = false;
\t\telse
\t\t{
\t\t\tobZIPFile.disabled = true;
\t\t\tobZIPFile.checked = false;
\t\t}
\t\tif(obOwnFile.checked)
\t\t\tBX.show(BX('fileupload'));
\t\telse
\t\t\tBX.hide(BX('fileupload'));
\t}
}
</script>
EOT;
$this->content .= "<b>" . GetMessage('WSL_STEP2_GFILE_TITLE') . "</b><p>";
$this->content .= $this->ShowRadioField("locations_csv", "loc_ussr.csv", array("onchange" => "checkZIP()", "id" => "loc_ussr", "checked" => "checked")) . " <label for=\"loc_ussr\">" . GetMessage('WSL_STEP2_GFILE_USSR') . "</label><br />";
$this->content .= $this->ShowRadioField("locations_csv", "loc_ua.csv", array("onchange" => "checkZIP()", "id" => "loc_ua")) . " <label for=\"loc_ua\">" . GetMessage('WSL_STEP2_GFILE_UA') . "</label><br />";
$this->content .= $this->ShowRadioField("locations_csv", "loc_kz.csv", array("onchange" => "checkZIP()", "id" => "loc_kz")) . " <label for=\"loc_kz\">" . GetMessage('WSL_STEP2_GFILE_KZ') . "</label><br />";
$this->content .= $this->ShowRadioField("locations_csv", "loc_usa.csv", array("onchange" => "checkZIP()", "id" => "loc_usa")) . " <label for=\"loc_usa\">" . GetMessage('WSL_STEP2_GFILE_USA') . "</label><br />";
$this->content .= $this->ShowRadioField("locations_csv", "loc_cntr.csv", array("onchange" => "checkZIP()", "id" => "loc_cntr")) . " <label for=\"loc_cntr\">" . GetMessage('WSL_STEP2_GFILE_CNTR') . "</label><br />";
$this->content .= $this->ShowRadioField("locations_csv", "locations.csv", array("onchange" => "checkZIP()", "id" => "ffile")) . " <label for=\"ffile\">" . GetMessage('WSL_STEP2_GFILE_FILE') . "</label><br />" . "<span style=\"display:none;\" id=\"fileupload\">" . "<input type=\"file\" name=\"FILE_IMPORT_UPLOAD\" value=\"\"><br />" . "</span>";
$this->content .= $this->ShowRadioField("locations_csv", "", array("onchange" => "checkZIP()", "id" => "none")) . " <label for=\"none\">" . GetMessage('WSL_STEP2_GFILE_NONE') . "</label>";
$this->content .= "</p><p>";
$this->content .= $this->ShowCheckboxField("load_zip", 'Y', array("id" => "load_zip")) . " <label for=\"load_zip\">" . GetMessage('WSL_STEP2_GFILE_ZIP') . "</label>";
$this->content .= "</p><p><b>" . GetMessage('WSL_STEP2_GSYNC_TITLE') . "</b></p><p>";
$this->content .= $this->ShowRadioField("sync", 'Y', array("id" => "sync_Y", "checked" => "checked")) . " <label for=\"sync_Y\">" . GetMessage('WSL_STEP2_GSYNC_Y') . "</label><br />";
$this->content .= $this->ShowRadioField("sync", 'N', array("id" => "sync_N")) . " <label for=\"sync_N\">" . GetMessage('WSL_STEP2_GSYNC_N') . "</label><br />";
$this->content .= "</p>";
$this->content .= '<small>' . GetMessage('WSL_STEP2_GSYNC_HINT') . '</small>';
}
示例4: GetHTML
/**
* @param $params array Display parameters.
* <ul>
* <li>max_size - maximum file size to display IMG tag (default 100K).
* <li>max_width - width to scale image to (default 150).
* <li>max_height - height to scale image to (default 150).
* <li>url_template - template for image path builder (default '').
* <li>show_input - if set to true file control will be displayed.
* <li>show_info - if set to true file information will be displayed.
* <li>download_text - text to be shown on download link.
* </ul>
* @return string Html to display.
*/
function GetHTML($params)
{
$html = '';
$max_size = 102400;
$max_width = 150;
$max_height = 150;
$url_template = '';
$show_input = true;
$show_info = true;
if (is_array($params)) {
if (isset($params['max_size'])) {
$max_size = intval($params['max_size']);
}
if (isset($params['max_width'])) {
$max_width = intval($params['max_width']);
}
if (isset($params['max_height'])) {
$max_height = intval($params['max_height']);
}
if (isset($params['url_template'])) {
$url_template = $params['url_template'];
}
if (isset($params['show_input'])) {
$show_input = (bool) $params['show_input'];
}
if (isset($params['show_info'])) {
$show_info = (bool) $params['show_info'];
}
}
if ($show_input) {
$html .= $this->_ob_file->GetInputHTML(array('show_info' => true, 'url_template' => $url_template, 'input_name' => $this->_input_name));
} elseif ($show_info) {
$html .= $this->_ob_file->GetInfoHTML(array('url_template' => $url_template));
}
if ($this->_ob_file->IsImage() && $this->_ob_file->GetSize() < $max_size) {
$img_src = $this->_ob_file->GetImgSrc(array('url_template' => $url_template));
CUtil::InitJSCore(array("viewer"));
self::$_counter++;
$divId = 'lists-image-' . self::$_counter;
$html .= '<div id="' . $divId . '">';
$html .= $this->_ob_file->GetImgHtml(array('url_template' => $url_template, 'max_width' => $max_width, 'max_height' => $max_height, 'html_attributes' => array('border' => '0', 'data-bx-image' => $img_src)));
$html .= '</div><script>BX.ready(function(){BX.viewElementBind("' . $divId . '");});</script>';
}
$html .= $this->_ob_file->GetLinkHtml(array('url_template' => $url_template, 'download_text' => $params['download_text']));
return $html;
}
示例5: elseif
}
if (!empty($arParams['ELEMENT_NAME']) && ($arResult['ELEMENT'] = CWiki::GetElementByName($arParams['ELEMENT_NAME'], $arFilter, $arParams)) != false) {
$arParams['ELEMENT_ID'] = $arResult['ELEMENT']['ID'];
if ($arResult['WIKI_oper'] != 'delete') {
if ($arResult['ELEMENT']['ACTIVE'] == 'N') {
$arResult['WIKI_oper'] = 'add';
} else {
if ($arResult['WIKI_oper'] == 'add') {
$bNotPage = false;
}
}
}
} elseif ($arResult['WIKI_oper'] != 'delete') {
$arResult['WIKI_oper'] = 'add';
}
CUtil::InitJSCore(array('window', 'ajax'));
if ((empty($arResult['ELEMENT']) || !$bNotPage) && $arResult['WIKI_oper'] != "delete" && $arResult['WIKI_oper'] != "rename" && $arResult['WIKI_oper'] != "rename_it") {
if ($arResult['WIKI_oper'] == 'add') {
// Check name
if (!$bNotPage) {
$i = 2;
$strName = $arParams['ELEMENT_NAME'] . " ({$i})";
while (CWiki::GetElementByName($strName, $arFilter) !== false) {
$i++;
$strName = $arParams['ELEMENT_NAME'] . " ({$i})";
}
$arParams['ELEMENT_NAME'] = $strName;
$sPageName .= " ({$i})";
}
// Create a temporary item
$sPageDecoded = CWikiUtils::htmlspecialcharsback(htmlspecialcharsbx($sPageName), false);
示例6: foreach
<?php
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
die;
}
if (!$this->__component->__parent || empty($this->__component->__parent->__name) || $this->__component->__parent->__name != "bitrix:blog") {
$GLOBALS['APPLICATION']->SetAdditionalCSS('/bitrix/components/bitrix/blog/templates/.default/style.css');
$GLOBALS['APPLICATION']->SetAdditionalCSS('/bitrix/components/bitrix/blog/templates/.default/themes/blue/style.css');
}
CUtil::InitJSCore(array("image"));
?>
<div id="blog-moderation-content">
<?php
if (!empty($arResult["OK_MESSAGE"])) {
?>
<div class="blog-notes">
<div class="blog-note-text">
<ul>
<?php
foreach ($arResult["OK_MESSAGE"] as $v) {
?>
<li><?php
echo $v;
?>
</li>
<?php
}
?>
</ul>
</div>
</div>
示例7: htmlspecialcharsbx
<?php
if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) {
die;
}
global $APPLICATION;
CUtil::InitJSCore(array("amcharts", "amcharts_funnel", "amcharts_serial"));
$quid = $arResult['GUID'];
$prefix = strtolower($quid);
$settings = $arResult['SETTINGS'];
$height = $arResult['HEIGHT'];
$layout = $arResult['LAYOUT'];
$containerID = "{$prefix}_container";
?>
<div class="crm-widget-container" id="<?php
echo htmlspecialcharsbx($containerID);
?>
"></div>
<script type="text/javascript">
BX.ready(
function()
{
BX.CrmWidget.messages =
{
"legend" : "<?php
echo GetMessageJS("CRM_WGT_RATING_LEGEND");
?>
",
"nomineeRatingPosition" : "<?php
echo GetMessageJS("CRM_WGT_RATING_NOMINEE_POSITION");
?>
示例8: GetMessageJS
',
SGMSubscribeButtonHintOff: '<?php
echo GetMessageJS("SONET_SGM_T_NOTIFY_HINT_OFF");
?>
',
SGMSubscribeButtonTitleOn: '<?php
echo GetMessageJS("SONET_SGM_T_NOTIFY_TITLE_ON");
?>
',
SGMSubscribeButtonTitleOff: '<?php
echo GetMessageJS("SONET_SGM_T_NOTIFY_TITLE_OFF");
?>
'
});
</script><?php
CUtil::InitJSCore(array("ajax", "popup"));
$GLOBALS["APPLICATION"]->AddHeadScript("/bitrix/components/bitrix/socialnetwork.group_menu/templates/.default/script.js");
$GLOBALS["APPLICATION"]->SetAdditionalCSS("/bitrix/components/bitrix/socialnetwork.group_menu/templates/.default/style.css");
if (strpos(SITE_TEMPLATE_ID, "stretchy") === 0 || strpos(SITE_TEMPLATE_ID, "taby") === 0) {
$this->SetViewTarget("sidebar", 5);
?>
<style>
#sidebar { position: relative; }
#sidebar .content-title { padding-right: 23px; }
</style>
<a id="group_menu_subscribe_button" class="profile-menu-notify-btn<?php
echo $arReturnGroupMenu["IS_SUBSCRIBED"] ? " profile-menu-notify-btn-active" : "";
?>
" title="<?php
echo GetMessage("SONET_SGM_T_NOTIFY_TITLE_" . ($arReturnGroupMenu["IS_SUBSCRIBED"] ? "ON" : "OFF"));
?>
示例9: unset
$arGadget["USERDATA"] = $arUserOptions["GADGETS"][$gdid]["USERDATA"];
}
$arGadget["CONTENT"] = BXGadget::GetGadgetContent($arGadget, $arParams);
$arResult["GADGETS"][$gadgetUserSettings["COLUMN"]][$gadgetUserSettings["ROW"]] = $arGadget;
if ($arGadget["FORCE_REDIRECT"]) {
$bForceRedirect = true;
}
} else {
unset($arUserOptions["GADGETS"][$gdid]);
}
}
}
for ($i = 0; $i < $arResult["COLS"]; $i++) {
ksort($arResult["GADGETS"][$i], SORT_NUMERIC);
}
$arResult["GADGETS_LIST"] = array_unique($arResult["GADGETS_LIST"]);
if ($bForceRedirect) {
if ($arParams["MULTIPLE"] == "Y") {
$arUserOptionsTmp[$arParams["DESKTOP_PAGE"]] = $arUserOptions;
$arUserOptions = $arUserOptionsTmp;
}
CUserOptions::SetOption("intranet", "~gadgets_" . $arParams["ID"], $arUserOptions, false, $user_option_id);
LocalRedirect($APPLICATION->GetCurPageParam($arParams["MULTIPLE"] == "Y" ? "dt_page=" . $arParams["DESKTOP_PAGE"] : "", array("dt_page")));
}
}
$APPLICATION->AddHeadScript('/bitrix/js/main/utils.js');
$APPLICATION->AddHeadScript('/bitrix/js/main/popup_menu.js');
$APPLICATION->AddHeadScript('/bitrix/js/main/ajax.js');
$APPLICATION->SetAdditionalCSS('/bitrix/themes/.default/pubstyles.css');
CUtil::InitJSCore(array("ajax"));
$this->IncludeComponentTemplate();
示例10: GetPagePath
<?php
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
die;
}
CUtil::InitJSCore(array('ajax'));
// ************************* Input params***************************************************************
$tplID = 'COMMENT_' . $arParams["ENTITY_TYPE"] . '_';
if (LANGUAGE_ID == 'ru') {
$path = str_replace(array("\\", "//"), "/", __DIR__ . "/ru/script.php");
include $path;
}
?>
<div class="feed-wrap">
<div class="feed-comments-block">
<a name="comments"></a>
<?php
// *************************/Input params***************************************************************
if (!empty($arResult["MESSAGES"])) {
$arResult["NAV_STRING"] = GetPagePath(false, false);
if ($arResult["NAV_RESULT"]) {
$strNavQueryString = htmlspecialcharsbx(DeleteParam(array("PAGEN_" . $arResult["NAV_RESULT"]->NavNum, "SIZEN_" . $arResult["NAV_RESULT"]->NavNum, "SHOWALL_" . $arResult["NAV_RESULT"]->NavNum, "MID", "result", "PHPSESSID", "clear_cache")));
if (!!$strNavQueryString) {
$arResult["NAV_STRING"] .= "?" . $strNavQueryString;
}
}
foreach ($arResult["MESSAGES"] as $res) {
foreach (GetModuleEvents('forum', 'OnCommentDisplay', true) as $arEvent) {
$arExt = ExecuteModuleEventEx($arEvent, array($res));
if ($arExt !== null) {
foreach ($arExt as $arTpl) {
示例11: LocalRedirect
LocalRedirect($arParams["LIST_URL"]);
} else {
echo GetMessage("BCLMME_NO_DATA");
return;
}
}
if (!CModule::IncludeModule('bitrixcloud')) {
ShowError(GetMessage("BCLMME_BC_NOT_INSTALLED"));
return;
}
if (!CModule::IncludeModule('mobileapp')) {
ShowError(GetMessage("BCLMME_MA_NOT_INSTALLED"));
return;
}
CJSCore::Init('ajax');
CUtil::InitJSCore(array("mobile_monitoring"));
$monitoring = CBitrixCloudMonitoring::getInstance();
if (isset($arResult["ACTION"])) {
switch ($arResult["ACTION"]) {
case 'add':
$arResult["DOMAIN_PARAMS"] = array("DOMAIN" => $arResult["DOMAIN"], "IS_HTTPS" => "N", "LANG" => LANGUAGE_ID, "EMAILS" => array(COption::GetOptionString("main", "email_from", "")), "TESTS" => array("test_lic", "test_domain_registration", "test_http_response_time"));
break;
case 'update':
try {
$result = $monitoring->startMonitoring($arResult["DOMAIN"], $_REQUEST["IS_HTTPS"] === "Y", $_REQUEST["LANG"], $_REQUEST["EMAILS"], $_REQUEST["TESTS"]);
if ($result != "") {
ShowError($result);
return;
}
LocalRedirect($arParams["LIST_URL"]);
} catch (Exception $e) {
示例12: foreach
?>
</form>
<?php
$tabControl->Begin();
foreach ($aTabs as $aTab) {
$tabControl->BeginNextTab();
echo '<tr><td class="ignore_edit_table">';
$aTables[$aTab['DIV']]->DisplayList();
echo '</td></tr>';
}
$tabControl->End();
?>
</div>
<?CUtil::InitJSCore(array('window'));?>
<script type="text/javascript">
if( typeof jQuery !== 'undefined' ){
jQuery('table.edit-form').removeClass('edit-form');
jQuery('table.edit-table').removeClass('edit-table');
jQuery('.edit-tab').removeClass('edit-tab');
$('.gem_action').not('input[name=upload]').live( 'click', function(){
$('<form method="post" action=""></form>')
.append($(this).parents('.gem_form').find('input'))
.append( '<input type="hidden" name="'+$(this).attr('name')+'" />' )
.appendTo('body')
.submit();
return false;
} )
$('form input[name=upload]').live( 'click', function(){
var Dialog = new BX.CDialog({
示例13: ShowError
if (empty($arIBLOCK['BIZPROC']) || $arIBLOCK['BIZPROC'] != 'Y') {
ShowError(GetMessage('WIKI_NOT_CHANGE_BIZPROC'));
return;
}
//converts the old type of document to a new
if (COption::GetOptionString('wiki', 'convert_history_' . $arParams['IBLOCK_ID'], 'N') == 'N') {
$arFilter = array('IBLOCK_ID' => $arParams['IBLOCK_ID'], 'CHECK_PERMISSIONS' => 'N', 'ACTIVE' => 'Y');
$rsElement = CIBlockElement::GetList(array(), $arFilter, false, false, array());
while ($arElement = $rsElement->GetNext()) {
CBPHistoryService::MergeHistory(array('iblock', 'CWikiDocument', $arElement['ID']), array('iblock', 'CIBlockDocument', $arElement['ID']));
}
COption::SetOptionString('wiki', 'convert_history_' . $arParams['IBLOCK_ID'], 'Y');
LocalRedirect(CHTTP::urlAddParams(CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_HISTORY'], array('wiki_name' => $arParams['ELEMENT_NAME'], 'group_id' => CWikiSocnet::$iSocNetId)), $arParams['IN_COMPLEX'] == 'Y' && $arParams['SEF_MODE'] == 'N' ? array($arParams['OPER_VAR'] => 'history') : array()));
return;
}
CUtil::InitJSCore(array("ajax", "tooltip"));
//http://jabber.bx/view.php?id=30695
if ($this->StartResultCache(false, array($USER->GetGroups(), $arNavigation, $arCache), false)) {
$arResult['USE_REVIEW'] = $arParams['USE_REVIEW'];
$arResult['ELEMENT'] = array();
$arParams['ELEMENT_NAME'] = urldecode($arParams['ELEMENT_NAME']);
$arFilter = array('IBLOCK_ID' => $arParams['IBLOCK_ID'], 'CHECK_PERMISSIONS' => 'N', 'ACTIVE' => 'Y');
if (empty($arParams['ELEMENT_NAME'])) {
$arParams['ELEMENT_NAME'] = CWiki::GetDefaultPage($arParams['IBLOCK_ID']);
}
if (!empty($arParams['ELEMENT_NAME']) && ($arResult['ELEMENT'] = CWiki::GetElementByName($arParams['ELEMENT_NAME'], $arFilter)) != false) {
$arParams['ELEMENT_ID'] = $arResult['ELEMENT']['ID'];
} else {
$this->AbortResultCache();
return;
}
示例14: trim
<?
if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
CUtil::InitJSCore(array('popup'));
CPageOption::SetOptionString("main", "nav_page_in_session", "N");
/*************************************************************************
Processing of received parameters
*************************************************************************/
if(!isset($arParams["CACHE_TIME"]))
$arParams["CACHE_TIME"] = 36000000;
$arParams["IBLOCK_TYPE"] = trim($arParams["IBLOCK_TYPE"]);
/** experemental, need test **/
if( $arParams["MODE"] != 'MULTI' )
$arParams["IBLOCK_ID"] = intval($arParams["IBLOCK_ID"]);
$arParams["SECTION_ID"] = intval($arParams["~SECTION_ID"]);
if($arParams["SECTION_ID"] > 0 && $arParams["SECTION_ID"]."" != $arParams["~SECTION_ID"])
{
ShowError(GetMessage("CATALOG_SECTION_NOT_FOUND"));
@define("ERROR_404", "Y");
if($arParams["SET_STATUS_404"]==="Y")
CHTTP::SetStatus("404 Not Found");
return;
}
if (!in_array($arParams["INCLUDE_SUBSECTIONS"], array('Y', 'A', 'N')))
$arParams["INCLUDE_SUBSECTIONS"] = 'Y';
$arParams["SHOW_ALL_WO_SECTION"] = $arParams["SHOW_ALL_WO_SECTION"]==="Y";
示例15: IsIE
*/
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_before.php";
CModule::IncludeModule("mobileapp");
\Bitrix\Main\Localization\Loc::loadMessages(__FILE__);
$APPLICATION->SetTitle(GetMessage("MOBILEAPP_APP_DESIGNER_TITLE"));
if (!$USER->isAdmin()) {
$APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));
}
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
$ieVersion = IsIE();
if (IsIE() !== false && IsIE() < 9) {
CAdminMessage::ShowMessage(array("TYPE" => "ERROR", "MESSAGE" => GetMessage("MOBILEAPP_WRONG_BROWSER"), "DETAILS" => GetMessage("MOBILEAPP_WRONG_BROWSER_DETAIL"), "HTML" => true));
require $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/include/epilog_admin.php";
return;
}
CUtil::InitJSCore(array('ajax', 'window', "popup", "mdesigner"));
$action = $_REQUEST["action"];
$templates = $_REQUEST["action"];
function __DSGetInitData()
{
$map = new \Bitrix\MobileApp\Designer\ConfigMap();
$params = $map->getParamsByGroups();
$groups = array_keys($params);
$tmpLangs = array_change_key_case($map->getLangMessages(), CASE_LOWER);
$langs = array();
foreach ($tmpLangs as $k => $v) {
$langs[str_replace("_", "/", $k)] = $v;
}
$result = \Bitrix\Mobileapp\Designer\AppTable::getList(array("select" => array("CODE", "FOLDER", "DESCRIPTION", "SHORT_NAME", "NAME", "CONFIG.PLATFORM", "CONFIG.PARAMS")));
$fetchedApps = $result->fetchAll();
$apps = array();