当前位置: 首页>>代码示例>>PHP>>正文


PHP CUtil::PHPToJSObject方法代码示例

本文整理汇总了PHP中CUtil::PHPToJSObject方法的典型用法代码示例。如果您正苦于以下问题:PHP CUtil::PHPToJSObject方法的具体用法?PHP CUtil::PHPToJSObject怎么用?PHP CUtil::PHPToJSObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CUtil的用法示例。


在下文中一共展示了CUtil::PHPToJSObject方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: trim

    if (strlen($mess) <= 0) {
        $mess = trim(CSecurityRedirect::GetDefaultMessage($ar["LID"]));
    }
    echo htmlspecialcharsbx($mess);
    $arLangs[] = $ar["LID"];
    ?>
</textarea></td>
			</tr>
		<?php 
}
?>
		<tr>
			<td>
				<script>
					var arLangs = <?php 
echo CUtil::PHPToJSObject($arLangs);
?>
;
				</script>
				<?php 
echo GetMessage("SEC_REDIRECT_TIMEOUT");
?>
			</td>
			<td>
				<input type="text" name="redirect_message_timeout" id="redirect_message_timeout" value="<?php 
echo COption::GetOptionInt("security", "redirect_message_timeout");
?>
" size="4" <?php 
if (COption::GetOptionString("security", "redirect_action") == "force_url") {
    echo "disabled";
}
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:security_redirect.php

示例2: unset

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
$APPLICATION->RestartBuffer();
echo "<!--JSON-->";
unset($arResult["COMBO"]);
echo str_replace("'", '"', CUtil::PHPToJSObject($arResult, true));
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:9,代码来源:ajax.php

示例3: trim

				<td><textarea name="redirect_message_warning_<?echo $ar["LID"]?>" id="redirect_message_warning_<?echo $ar["LID"]?>" cols=40 rows=5 <?if($disabled) echo "disabled";?>
				><?
				$mess = trim(COption::GetOptionString("security", "redirect_message_warning_".$ar["LID"]));
				if(strlen($mess) <= 0)
					$mess = trim(COption::GetOptionString("security", "redirect_message_warning"));
				if(strlen($mess) <= 0)
					$mess = trim(CSecurityRedirect::GetDefaultMessage($ar["LID"]));
				echo htmlspecialcharsbx($mess);
				$arLangs[] = $ar["LID"];
				?></textarea></td>
			</tr>
		<?endwhile?>
		<tr>
			<td>
				<script>
					var arLangs = <?echo CUtil::PHPToJSObject($arLangs);?>;
				</script>
				<?echo GetMessage("SEC_REDIRECT_TIMEOUT")?>
			</td>
			<td>
				<input type="text" name="redirect_message_timeout" id="redirect_message_timeout" value="<?echo COption::GetOptionInt("security", "redirect_message_timeout")?>" size="4" <?if(COption::GetOptionString("security", "redirect_action") == "force_url") echo "disabled";?>><?echo GetMessage("SEC_REDIRECT_TIMEOUT_SEC")?>
			</td>
		</tr>
		</table>
		<label><input type="radio" name="redirect_action" id="redirect_force_url" value="force_url" <?if(COption::GetOptionString("security", "redirect_action") == "force_url") echo "checked";?> onClick="Toggle(this);"><?echo GetMessage("SEC_REDIRECT_ACTION_REDIRECT")?></label><br>
		<table style="margin-left:24px">
		<tr><td>
		<?echo GetMessage("SEC_REDIRECT_ACTION_REDIRECT_URL")?></td><td><input type="text" name="redirect_url" id="redirect_url" value="<?echo htmlspecialcharsbx(COption::GetOptionString("security", "redirect_url"))?>" size="45" <?if(COption::GetOptionString("security", "redirect_action") == "show_message") echo "disabled";?>>
		</td></tr>
		</table>
	</td>
开发者ID:ASDAFF,项目名称:bitrix-5,代码行数:31,代码来源:security_redirect.php

示例4: array

    }
    $obStorage = $obRights->_storage_object();
    $arOverwrited = array();
    if (isset($_REQUEST["added"]) && is_array($_REQUEST["added"])) {
        foreach ($_REQUEST["added"] as $provider => $arCodes) {
            if (is_array($arCodes)) {
                foreach ($arCodes as $id => $arCode) {
                    $arOverwrited[$id] = $obStorage->CountOverWrited($id);
                }
            }
        }
    }
    if (isset($_REQUEST["info"]) && $_REQUEST["info"] > 0) {
        $arOverwrited = $obRights->GetUserOperations($_GET["id"], $_REQUEST["info"]);
    }
    echo CUtil::PHPToJSObject($arOverwrited);
    require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin_js.php";
}
function IBlockShowRights($entity_type, $iblock_id, $id, $section_title, $variable_name, $arPossibleRights, $arActualRights, $bDefault = false, $bForceInherited = false, $arSelected = array(), $arHighLight = array())
{
    $js_var_name = preg_replace("/[^a-zA-Z0-9_]/", "_", $variable_name);
    $html_var_name = htmlspecialcharsbx($variable_name);
    $sSelect = '<select name="' . $html_var_name . '[][TASK_ID]" style="vertical-align:middle">';
    foreach ($arPossibleRights as $value => $title) {
        $sSelect .= '<option value="' . htmlspecialcharsbx($value) . '">' . htmlspecialcharsex($title) . '</option>';
    }
    $sSelect .= '</select>';
    if ($bForceInherited != true) {
        foreach ($arActualRights as $RIGHT_ID => $arRightSet) {
            if ($arRightSet["IS_INHERITED"] != "Y") {
                $arSelected[$arRightSet["GROUP_CODE"]] = true;
开发者ID:rasuldev,项目名称:torino,代码行数:31,代码来源:admin_tools.php

示例5: DisplayControl

    private static function DisplayControl($inputs = array())
    {
        self::$menuNew = array();
        self::$menuExist = array();
        if ($inputs['upload']) {
            self::$menuNew[] = array("ID" => "upload", "GLOBAL_ICON" => "adm-menu-upload-pc", "TEXT" => GetMessage("ADM_FILE_UPLOAD"), "CLOSE_ON_CLICK" => false);
            self::$menuExist[] = array("ID" => "upload", "GLOBAL_ICON" => "adm-menu-upload-pc", "TEXT" => GetMessage("ADM_FILE_NEW_UPLOAD"), "CLOSE_ON_CLICK" => false);
        }
        if ($inputs['medialib']) {
            self::$menuNew[] = array("TEXT" => GetMessage("ADM_FILE_MEDIALIB"), "GLOBAL_ICON" => "adm-menu-upload-medialib", "ONCLICK" => "OpenMedialibDialog" . self::$jsId . "()");
            self::$menuExist[] = array("TEXT" => GetMessage("ADM_FILE_NEW_MEDIALIB"), "GLOBAL_ICON" => "adm-menu-upload-medialib", "ONCLICK" => "OpenMedialibDialog" . self::$jsId . "()");
        }
        if ($inputs['file_dialog']) {
            self::$menuNew[] = array("TEXT" => GetMessage("ADM_FILE_SITE"), "GLOBAL_ICON" => "adm-menu-upload-site", "ONCLICK" => "OpenFileDialog" . self::$jsId . "()");
            self::$menuExist[] = array("TEXT" => GetMessage("ADM_FILE_NEW_SITE"), "GLOBAL_ICON" => "adm-menu-upload-site", "ONCLICK" => "OpenFileDialog" . self::$jsId . "()");
        }
        if ($inputs['cloud']) {
            self::$menuNew[] = array("TEXT" => GetMessage("ADM_FILE_CLOUD"), "GLOBAL_ICON" => "adm-menu-upload-cloud", "ONCLICK" => "OpenCloudDialog" . self::$jsId . "()");
            self::$menuExist[] = array("TEXT" => GetMessage("ADM_FILE_NEW_CLOUD"), "GLOBAL_ICON" => "adm-menu-upload-cloud", "ONCLICK" => "OpenCloudDialog" . self::$jsId . "()");
        }
        $arConfig = array('id' => self::$jsId, 'fileExists' => self::$bFileExists, 'files' => self::$curFiles, 'menuNew' => self::$menuNew, 'menuExist' => self::$menuExist, 'multiple' => self::$bMultiple, 'useUpload' => self::$bUseUpload, 'useMedialib' => self::$bUseMedialib, 'useFileDialog' => self::$bUseFileDialog, 'useCloud' => self::$bUseCloud, 'delName' => self::$delInputName, 'descName' => self::$descInputName, 'inputSize' => self::$inputSize, 'minPreviewHeight' => self::$minPreviewHeight, 'minPreviewWidth' => self::$minPreviewWidth, 'showDesc' => self::$bShowDescInput, 'showDel' => self::$bShowDelInput, 'maxCount' => self::$maxCount, 'viewMode' => self::$bViewMode);
        if (self::$bMultiple) {
            $arConfig['inputNameTemplate'] = self::$inputNameTemplate;
        } else {
            $arConfig['inputs'] = self::$arInputs;
        }
        if (self::$bUseCloud) {
            $arConfig['cloudDialogPath'] = '/bitrix/admin/clouds_file_search.php?lang=' . LANGUAGE_ID . '&n=';
        }
        //Base container
        ?>
<div class="adm-input-file-control" id="<?php 
        echo self::$jsId . '_cont';
        ?>
"><?php 
        if (!self::$bViewMode) {
            self::DisplayDialogs();
        }
        if (self::$bFileExists) {
            foreach (self::$curFiles as $ind => $arFile) {
                self::DisplayFile($arFile, $ind);
            }
        }
        ?>
		<script type="text/javascript">new top.BX.file_input(<?php 
        echo CUtil::PHPToJSObject($arConfig);
        ?>
);</script>
		</div>
		<?php 
        /* Used to refresh form content - workaround for IE bug (mantis:37969) */
        ?>
	<div id="<?php 
        echo self::$jsId . '_ie_bogus_container';
        ?>
"><input type="hidden" value="" /></div>
	<?php 
    }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:58,代码来源:file_input.php

示例6: unset

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
$APPLICATION->RestartBuffer();
unset($arResult["COMBO"]);
echo CUtil::PHPToJSObject($arResult, true);
开发者ID:Satariall,项目名称:izurit,代码行数:8,代码来源:ajax.php

示例7: unset

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
$APPLICATION->RestartBuffer();
unset($arResult["COMBO"]);
echo CUtil::PHPToJSObject($arResult);
开发者ID:Satariall,项目名称:izurit,代码行数:8,代码来源:ajax.php


注:本文中的CUtil::PHPToJSObject方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。