本文整理汇总了PHP中CUtil::PHPToJsObject方法的典型用法代码示例。如果您正苦于以下问题:PHP CUtil::PHPToJsObject方法的具体用法?PHP CUtil::PHPToJsObject怎么用?PHP CUtil::PHPToJsObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CUtil
的用法示例。
在下文中一共展示了CUtil::PHPToJsObject方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: function
echo $storeId;
?>
][AMOUNT]" id="PRODUCT[<?php
echo $val["ID"];
?>
][STORES][<?php
echo $storeId;
?>
][AMOUNT]" type="hidden" value="<?php
echo $arStore["AMOUNT"];
?>
">
</div>
<script type="text/javascript"> //store selector change
BX.bind(BX('<? echo $strSelectID; ?>'), 'change', function() {
return fChangeStoreSelector(this, '<? echo $val["ID"]; ?>', '<? echo $ind; ?>', '<? echo CUtil::JSEscape(CUtil::PHPToJsObject($arBasketItem[$val["ID"]]["STORES"])); ?>');
});
</script>
<?
if ($ind > 0)
{
?>
<script type="text/javascript"> //store delete button
BX.bind(BX('store_select_wrapper_<?php
echo $val["ID"];
?>
_<?php
echo $storeId;
?>
'), 'mouseover', function() {
BX.addClass(BX('store_select_delete_<?php
示例2: changeType
<script type="text/javascript">
<?php
if (strlen($str_COMMENTS) <= 0 && !$isEditMode) {
?>
tabControl.DisableTab("edit5");
<?php
}
?>
changeType('<?php
echo $str_AD_TYPE;
?>
', {params: <?php
echo CUtil::PHPToJsObject($arPropsTemplate);
?>
, val: <?php
echo CUtil::PHPToJsObject($arCurVal);
?>
});
</script>
<?php
if ($isEditMode && (!defined('BX_PUBLIC_MODE') || BX_PUBLIC_MODE != 1)) {
echo BeginNote();
?>
<span class="required"><sup>1</sup></span> <?php
echo GetMessage("AD_CONFIRMED_FIELDS");
?>
<br><br>
<span class="required"><sup>2</sup></span> <?php
echo GetMessage("AD_NOTE_2");
?>
<br><br>
示例3: array
?>
</option>
<?php
}
?>
</select>
<?php
if ($isEditMode) {
?>
<script>
var V_STAT_TYPE = <?php
echo CUtil::PHPToJsObject($str_STAT_TYPE);
?>
;
var V_STAT_TYPE_VALUES = <?php
echo CUtil::PHPToJsObject(array("COUNTRY" => array(), "REGION" => array(), "CITY" => array()));
?>
;
function stat_type_values_change()
{
var oSelect = document.getElementById('STAT_TYPE_VALUES[]');
if(oSelect)
{
var v = '';
var n = oSelect.length;
for(var i=0; i<n; i++)
if(v.length)
v += ','+oSelect[i].value;
else
v = oSelect[i].value;
示例4: function
<script type="text/javascript"> //store selector change
BX.bind(BX('PRODUCT[' + <?php
echo $val["ID"];
?>
+ '][STORES][' + <?php
echo $storeId;
?>
+ '][STORE_ID]'), 'change', function() {
return fChangeStoreSelector(this, '<?php
echo $val["ID"];
?>
', '<?php
echo $ind;
?>
', '<?php
echo CUtil::JSEscape(CUtil::PHPToJsObject($arBasketItem[$val["ID"]]["STORES"]));
?>
');
}
);
</script>
<?php
if ($ind > 0) {
?>
<script type="text/javascript"> //store delete button
BX.bind(BX('store_select_wrapper_<?php
echo $val["ID"];
?>
_<?php
echo $storeId;
?>
示例5: GetMessage
<td><?echo GetMessage("ADV_STAT_WHAT_QUESTION")?>:</td>
<td>
<label><input type="radio" name="STAT_TYPE" value="COUNTRY" OnClick="stat_type_changed(this);" <?echo $str_STAT_TYPE!=="CITY" && $str_STAT_TYPE!=="REGION"? "checked" : ""?><?if(!$isEditMode) echo ' disabled'?>><?echo GetMessage("ADV_STAT_WHAT_COUNTRY")?></label><br>
<label><input type="radio" name="STAT_TYPE" value="REGION" OnClick="stat_type_changed(this);" <?echo $str_STAT_TYPE==="REGION"? "checked" : ""?><?if(!$isEditMode) echo ' disabled'?>><?echo GetMessage("ADV_STAT_WHAT_REGION")?></label><br>
<label><input type="radio" name="STAT_TYPE" value="CITY" OnClick="stat_type_changed(this);" <?echo $str_STAT_TYPE==="CITY"? "checked" : ""?><?if(!$isEditMode) echo ' disabled'?>><?echo GetMessage("ADV_STAT_WHAT_CITY")?></label><br>
<select style="width:100%" size="10" id="STAT_TYPE_VALUES[]" name="STAT_TYPE_VALUES[]" multiple OnChange="stat_type_values_change()"<?if(!$isEditMode) echo ' disabled'?>>
<?foreach($arDisplay as $key => $value):?>
<option value="<?echo $key?>"><?echo $value?></option>
<?endforeach;?>
</select>
<?if($isEditMode):?>
<script>
var V_STAT_TYPE = <?echo CUtil::PHPToJsObject($str_STAT_TYPE);?>;
var V_STAT_TYPE_VALUES = <?echo CUtil::PHPToJsObject(array(
"COUNTRY"=>array(),
"REGION"=>array(),
"CITY"=>array(),
))?>;
function stat_type_values_change()
{
var oSelect = document.getElementById('STAT_TYPE_VALUES[]');
if(oSelect)
{
var v = '';
var n = oSelect.length;
for(var i=0; i<n; i++)
if(v.length)
v += ','+oSelect[i].value;
else
v = oSelect[i].value;