本文整理汇总了PHP中CUtil::JSescape方法的典型用法代码示例。如果您正苦于以下问题:PHP CUtil::JSescape方法的具体用法?PHP CUtil::JSescape怎么用?PHP CUtil::JSescape使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CUtil
的用法示例。
在下文中一共展示了CUtil::JSescape方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: function
<div id='bx-disk-group-div' style="display:none;" class="bx-disk-aggregator-group-div"></div>
<div id='bx-disk-user-div' style="display:none;" class="bx-disk-aggregator-group-div"></div>
<div class="bx-disk-aggregator-description-div">
<p><?php
echo Loc::getMessage("DISK_AGGREGATOR_DESCRIPTION");
?>
</p>
<p><?php
echo Loc::getMessage("DISK_AGGREGATOR_NETWORK_DRIVE");
?>
</p>
</div>
<?php
$linkOnNetworkDrive = CUtil::JSescape($arResult["NETWORK_DRIVE_LINK"]);
?>
<script>
BX(function () {
BX.Disk['AggregatorClass_<?php
echo $component->getComponentId();
?>
'] = new BX.Disk.AggregatorClass({});
BX.bind(BX('bx-disk-aggregator-user-link'), 'click', function()
{
BX.hide(BX('bx-disk-group-div'));
BX.Disk['AggregatorClass_<?php
echo $component->getComponentId();
?>
'].getListStorage('getListStorage', 'user');
示例2: if
<? if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) die(); ?>
<?php
echo $arResult['STYLES'];
?>
<? if (!$GLOBALS['ASD_FAV_SHOWED']): ?>
<script type="text/javascript">
var sTitleAddFav = '<?php
echo CUtil::JSescape(GetMessage('ASD_TPL_ADD_' . $arParams['BUTTON_TYPE_UPP']));
?>
';
var sTitleDelFav = '<?php
echo CUtil::JSescape(GetMessage('ASD_TPL_DEL_' . $arParams['BUTTON_TYPE_UPP']));
?>
';
var sMessDeniedGuest = '<?php
echo CUtil::JSescape(GetMessage('ASD_TPL_DENIED_GUEST'));
?>
';
var sType = '<?php
echo $arParams['FAV_TYPE'];
?>
';
var sButton = '<?php
echo $arParams['BUTTON_TYPE'];
?>
';
<? if ($arParams['GET_COUNT_AFTER_LOAD'] != 'Y'): ?>
var sSessId = '<?php
echo bitrix_sessid();
?>
';
示例3: array
<?if(!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED!==true)die();?>
<script type="text/javascript">
var sCurPage = '<?php
echo CUtil::JSescape($APPLICATION->GetCurPageParam('a', array('a', 'sessid', 'move', 'moveto', 'del')));
?>
&'+'<?php
echo bitrix_sessid_get();
?>
';
var sMessConfirmDel = '<?php
echo CUtil::JSescape(GetMessage('ASD_TPL_FAV_DEL_CONF'));
?>
';
</script>
<?if (!empty($arResult['CURRENT_FOLDER'])):?>
<h3><?php
echo $arResult['CURRENT_FOLDER']['NAME'];
?>
</h3>
<?endif;?>
<?if (!empty($arResult['FAVS'])):?>
<?
$moveOptions = '';
foreach ($arResult['FOLDERS'] as $ID => $arFolder)
{
if ($arFolder['ID'] != $arParams['FOLDER_ID'])
$moveOptions .= '<option value="'.$ID.'">'.$arFolder['NAME'].'</option>'."\n";
}
示例4: array
use Bitrix\Main\Localization\Loc;
?>
<?php
CJSCore::Init(array('viewer', 'disk', 'socnetlogdest', 'access'));
$jsSettingsDropdown = $jsDropdown = array();
if (!empty($arResult['STORAGE']['CAN_CHANGE_RIGHTS_ON_STORAGE'])) {
$jsSettingsDropdown[] = array('text' => Loc::getMessage('DISK_FOLDER_LIST_PAGE_TITLE_CHANGE_RIGHTS'), 'title' => Loc::getMessage('DISK_FOLDER_LIST_PAGE_TITLE_CHANGE_RIGHTS'), 'href' => "javascript:BX.Disk['FolderListClass_{$component->getComponentId()}'].showRightsOnStorage();");
}
if (!empty($arResult['STORAGE']['CAN_CHANGE_SETTINGS_ON_STORAGE']) && $arResult['STORAGE']['CAN_CHANGE_SETTINGS_ON_BIZPROC_EXCEPT_USER']) {
$jsSettingsDropdown[] = array('text' => Loc::getMessage('DISK_FOLDER_LIST_PAGE_TITLE_BIZPROC_SETTINGS'), 'title' => Loc::getMessage('DISK_FOLDER_LIST_PAGE_TITLE_BIZPROC_SETTINGS'), 'href' => "javascript:BX.Disk['FolderListClass_{$component->getComponentId()}'].showSettingsOnBizproc();");
}
if (!empty($arResult['STORAGE']['CAN_CHANGE_SETTINGS_ON_BIZPROC']) && $arResult['STORAGE']['CAN_CHANGE_SETTINGS_ON_BIZPROC_EXCEPT_USER'] && $arResult['STORAGE']['SHOW_BIZPROC']) {
$jsSettingsDropdown[] = array('text' => Loc::getMessage('DISK_FOLDER_LIST_PAGE_TITLE_BIZPROC'), 'title' => Loc::getMessage('DISK_FOLDER_LIST_PAGE_TITLE_BIZPROC'), 'href' => $arParams["PATH_TO_DISK_BIZPROC_WORKFLOW_ADMIN"]);
}
$linkOnNetworkDrive = CUtil::JSescape($arResult['STORAGE']['NETWORK_DRIVE_LINK']);
$jsSettingsDropdown[] = array('text' => Loc::getMessage('DISK_FOLDER_LIST_PAGE_TITLE_NETWORK_DRIVE'), 'title' => Loc::getMessage('DISK_FOLDER_LIST_PAGE_TITLE_NETWORK_DRIVE'), 'href' => "javascript:BX.Disk['FolderListClass_{$component->getComponentId()}'].showNetworkDriveConnect({\n\t\tlink: '{$linkOnNetworkDrive}'\n\t});");
$jsSettingsDropdown[] = array('text' => Loc::getMessage('DISK_FOLDER_LIST_PAGE_TITLE_SETTINGS_DOCS'), 'title' => Loc::getMessage('DISK_FOLDER_LIST_PAGE_TITLE_SETTINGS_DOCS'), 'href' => "javascript:BX.Disk['FolderListClass_{$component->getComponentId()}'].openWindowForSelectDocumentService({});");
$currentPage = $APPLICATION->GetCurPageParam('', array($arResult['GRID']["SORT_VARS"]["order"], $arResult['GRID']["SORT_VARS"]["by"]));
foreach ($arResult['GRID']['COLUMN_FOR_SORTING'] as $name => $column) {
$jsDropdown[] = array('text' => $column['LABEL'], 'title' => $column['LABEL'], 'href' => CHTTP::urlAddParams($currentPage, array($arResult['GRID']["SORT_VARS"]["by"] => $name, $arResult['GRID']["SORT_VARS"]["order"] => 'DESC')));
}
unset($column, $name);
$byColumn = key($arResult['GRID']['SORT']);
$direction = $arResult['GRID']['SORT'][$byColumn];
$inverseDirection = strtolower($direction) == 'desc' ? 'asc' : 'desc';
$label = $arResult['GRID']['COLUMN_FOR_SORTING'][$byColumn]['LABEL'];
if ($jsDropdown) {
$isDescDirection = $inverseDirection == 'desc';
$jsDropdown[] = array('delimiter' => true);
$jsDropdown[] = array('className' => $isDescDirection ? '' : 'menu-popup-item-accept', 'text' => Loc::getMessage('DISK_FOLDER_LIST_LABEL_SORT_INVERSE_DIRECTION'), 'title' => Loc::getMessage('DISK_FOLDER_LIST_LABEL_SORT_INVERSE_DIRECTION'), 'href' => CHTTP::urlAddParams($currentPage, array($arResult['GRID']["SORT_VARS"]["by"] => $byColumn, $arResult['GRID']["SORT_VARS"]["order"] => $inverseDirection)));