本文整理汇总了PHP中CFileman::GetAllTemplateParams方法的典型用法代码示例。如果您正苦于以下问题:PHP CFileman::GetAllTemplateParams方法的具体用法?PHP CFileman::GetAllTemplateParams怎么用?PHP CFileman::GetAllTemplateParams使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFileman
的用法示例。
在下文中一共展示了CFileman::GetAllTemplateParams方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetSiteTemplateParams
public static function GetSiteTemplateParams($templateId, $siteId)
{
return CFileman::GetAllTemplateParams($templateId, $siteId);
}
示例2: GetSiteTemplateParams
public static function GetSiteTemplateParams($templateId, $siteId)
{
$params = CFileman::GetAllTemplateParams($templateId, $siteId);
$params["STYLES"] = preg_replace("/(url\\(\"?)images\\//is", "\\1" . $params['SITE_TEMPLATE_PATH'] . '/images/', $params["STYLES"]);
if (is_array($params['EDITOR_STYLES'])) {
for ($i = 0, $l = count($params['EDITOR_STYLES']); $i < $l; $i++) {
$params['EDITOR_STYLES'][$i] = $params['EDITOR_STYLES'][$i] . '?' . @filemtime($_SERVER['DOCUMENT_ROOT'] . $params['EDITOR_STYLES'][$i]);
}
}
return $params;
}
示例3: ShowHTMLEditControl
function ShowHTMLEditControl($name, $content, $arParams = array())
{
global $USER;
// We have to avoid of showing HTML-editor with probably unsecure content when loosing the session [mantis:#0007986]
if ($_SERVER["REQUEST_METHOD"] == "POST" && !check_bitrix_sessid()) {
return;
}
CUtil::InitJSCore(array('window', 'ajax'));
$relPath = isset($arParams["path"]) ? $arParams["path"] : "/";
$site = isset($arParams["site"]) ? $arParams["site"] : "";
$__path = Rel2Abs("/", $relPath);
$site = CFileMan::__CheckSite($site);
$name = preg_replace("/[^a-zA-Z0-9_:\\.]/is", "", $name);
if (!isset($arParams["limit_php_access"])) {
$arParams["limit_php_access"] = false;
}
$arParams["light_mode"] = defined('BX_PUBLIC_MODE') && BX_PUBLIC_MODE == 1 || isset($arParams["light_mode"]) && $arParams["light_mode"] == 'Y';
$io = CBXVirtualIo::GetInstance();
$direction_rtl = false;
if ($site) {
$DOC_ROOT = CSite::GetSiteDocRoot($site);
$abs_path = $DOC_ROOT . $__path;
if ($io->FileExists($abs_path)) {
$relPath = substr($relPath, 0, strrpos($relPath, "/"));
if ($relPath == "") {
$relPath = "/";
}
}
}
static $bFirstUsed;
$template = $arParams["templateID"];
if (!isset($template) && defined('SITE_TEMPLATE_ID')) {
$template = SITE_TEMPLATE_ID;
}
if (!isset($template) && isset($_GET['siteTemplateId'])) {
$template = $_GET['siteTemplateId'];
}
if (!isset($template) && isset($site)) {
$dbSiteRes = CSite::GetTemplateList($site);
$SITE_TEMPLATE = array();
while ($arSiteRes = $dbSiteRes->Fetch()) {
if ($arSiteRes['CONDITION'] == "" || !isset($template)) {
$template = $arSiteRes['TEMPLATE'];
}
}
}
if (isset($arParams['use_editor_3'])) {
$useEditor3 = $arParams['use_editor_3'] == "Y";
} else {
$useEditor3 = COption::GetOptionString('fileman', "use_editor_3", "Y") == "Y";
}
if ($useEditor3) {
$Editor = new CHTMLEditor();
$Editor->Show(array('name' => $name, 'id' => $name, 'siteId' => $arParams["site"], 'width' => $arParams["width"], 'height' => $arParams["height"], 'content' => $content, 'bAllowPhp' => !$arParams["bWithoutPHP"] && $USER->CanDoOperation('edit_php'), "limitPhpAccess" => $arParams["limit_php_access"], "display" => $arParams['bDisplay'], "componentFilter" => isset($arParams['componentFilter']) ? $arParams['componentFilter'] : false, "setFocusAfterShow" => isset($arParams['setFocusAfterShow']) ? $arParams['setFocusAfterShow'] : true, "relPath" => $relPath, "templateId" => $template));
return;
}
//Taskbars
$arTaskbars = isset($arParams["arTaskbars"]) ? $arParams["arTaskbars"] : array();
//Toolbars
$arToolbars = isset($arParams["arToolbars"]) ? $arParams["arToolbars"] : false;
// Toolbar config
$arParams["toolbarConfig"] = is_array($arParams["toolbarConfig"]) ? $arParams["toolbarConfig"] : false;
$arParams["use_advanced_php_parser"] = COption::GetOptionString("fileman", "use_advanced_php_parser", "Y");
$arParams["ar_entities"] = COption::GetOptionString("fileman", "ar_entities", 'umlya,greek,other');
if ($arParams["ar_entities"] == 'none') {
$arParams["ar_entities"] = '';
}
if (!isset($arParams["usePspell"])) {
$arParams["usePspell"] = COption::GetOptionString("fileman", "use_pspell", "N");
}
if (!isset($arParams["useCustomSpell"])) {
$arParams["useCustomSpell"] = COption::GetOptionString("fileman", "use_custom_spell", "Y");
}
$arParams['allowRenderComp2'] = COption::GetOptionString('fileman', "allow_render_components", "N") == 'Y';
$arParams['renderComponents'] = $arParams['allowRenderComp2'] && CUserOptions::GetOption('fileman', "render_components", "Y") == 'Y';
$lca = COption::GetOptionString("fileman", "use_lca", "N");
$styleList_render_style = COption::GetOptionString("fileman", "render_styles_in_classlist", "Y") == 'Y' ? 'true' : 'false';
$arAdditionalParams = isset($arParams["arAdditionalParams"]) ? $arParams["arAdditionalParams"] : array();
$arResult = CFileman::GetAllTemplateParams($template, $site, $arParams["bWithoutPHP"] != true, $arAdditionalParams);
$arParams["TEMPLATE"] = $arResult;
if ($bUseOnlyDefinedStyles && !is_set($arResult, "STYLES_TITLE")) {
$bUseOnlyDefinedStyles = false;
}
$arParams["body_class"] = COption::GetOptionString("fileman", "editor_body_class", "");
$arParams["body_id"] = COption::GetOptionString("fileman", "editor_body_id", "");
?>
<script bxrunfirst="true">
var relPath = "<?php
echo CUtil::JSEscape($relPath);
?>
";
var <?php
echo 'ar_' . $name . '_taskbars';
?>
= {};
<?php
for ($k = 0, $l = count($arTaskbars); $k < $l; $k++) {
echo 'ar_' . $name . '_taskbars["' . $arTaskbars[$k] . '"] = true;';
}
if ($arToolbars !== false) {
//.........这里部分代码省略.........
示例4: Copyright
# Copyright (c) 2002-2006 Bitrix #
# http://www.bitrixsoft.com #
# mailto:admin@bitrixsoft.com #
##############################################
*/
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_before.php";
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/fileman/prolog.php";
if (!$USER->CanDoOperation('fileman_view_file_structure') || !$USER->CanDoOperation('fileman_edit_existent_files')) {
$APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));
}
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/fileman/include.php";
if (CModule::IncludeModule("compression")) {
CCompress::Disable2048Spaces();
}
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : false;
if (!check_bitrix_sessid()) {
die('<!--BX_EDITOR_DUBLICATE_ACTION_REQUEST' . bitrix_sessid() . '-->');
}
if ($action == 'sitetemplateparams') {
$templateID = $_GET['templateID'];
?>
<script>
window.bx_template_params = <?php
echo CUtil::PhpToJSObject(CFileman::GetAllTemplateParams($templateID, $site));
?>
;
</script>
<?php
}
define("ADMIN_AJAX_MODE", true);
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin_after.php";