本文整理汇总了PHP中CFileman类的典型用法代码示例。如果您正苦于以下问题:PHP CFileman类的具体用法?PHP CFileman怎么用?PHP CFileman使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CFileman类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: BXDeleteFromMenuFile
function BXDeleteFromMenuFile($menuFile, $documentRoot, $site, $path)
{
$aMenuLinks = array();
$arMenu = CFileman::GetMenuArray($documentRoot . $menuFile);
if (empty($arMenu["aMenuLinks"])) {
return false;
}
$arFound = false;
foreach ($arMenu["aMenuLinks"] as $menuIndex => $arItem) {
if (!isset($arItem[1])) {
continue;
}
$menuLink = $arItem[1];
$position = strpos($menuLink, "?");
if ($position !== false) {
$menuLink = substr($menuLink, 0, $position);
}
if ($menuLink != "/") {
$menuLink = rtrim($menuLink, "/");
}
$filename = basename($path);
$dirName = str_replace("\\", "/", dirname($path));
if ($menuLink == $path || $filename == "index.php" && $menuLink == $dirName) {
$arFound = array('menuFile' => $menuFile, 'menuIndex' => $menuIndex, 'menuItem' => $arItem);
unset($arMenu["aMenuLinks"][$menuIndex]);
}
}
if ($arFound) {
CFileMan::SaveMenu(array($site, $menuFile), $arMenu["aMenuLinks"], $arMenu["sMenuTemplate"]);
if (COption::GetOptionString($module_id, "log_page", "Y") == "Y") {
$res_log = array();
$mt = COption::GetOptionString("fileman", "menutypes", $default_value, $site);
$mt = unserialize(str_replace("\\", "", $mt));
$res_log['menu_name'] = $mt[$menuType];
$res_log['path'] = substr($dirName, 1);
CEventLog::Log("content", "MENU_EDIT", "main", "", serialize($res_log));
}
}
return $arFound;
}
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:40,代码来源:file_delete.php
示例2: GetMessage
"SUB_DETAIL_TEXT",
$str_DETAIL_TEXT,
"SUB_DETAIL_TEXT_TYPE",
$str_DETAIL_TEXT_TYPE,
array(
'height' => 450,
'width' => '100%'
),
"N",
0,
"",
"",
$arIBlock["LID"],
true,
false,
array('toolbarConfig' => CFileman::GetEditorToolbarConfig("iblock_".(defined('BX_SUB_SETTINGS') && BX_SUB_SETTINGS == true ? 'admin' : 'public')), 'saveEditorKey' => $IBLOCK_ID)
);
?></td>
</tr>
<?else:?>
<tr id="tr_SUB_DETAIL_TEXT_TYPE">
<td><?echo GetMessage("IBLOCK_DESC_TYPE")?></td>
<td><input type="radio" name="SUB_DETAIL_TEXT_TYPE" id="SUB_DETAIL_TEXT_TYPE_text" value="text"<?if($str_DETAIL_TEXT_TYPE!="html")echo " checked"?>> <label for="SUB_DETAIL_TEXT_TYPE_text"><?echo GetMessage("IBLOCK_DESC_TYPE_TEXT")?></label> / <input type="radio" name="SUB_DETAIL_TEXT_TYPE" id="SUB_DETAIL_TEXT_TYPE_html" value="html"<?if($str_DETAIL_TEXT_TYPE=="html")echo " checked"?>> <label for="SUB_DETAIL_TEXT_TYPE_html"><?echo GetMessage("IBLOCK_DESC_TYPE_HTML")?></label></td>
</tr>
<tr id="tr_SUB_DETAIL_TEXT">
<td colspan="2" align="center">
<textarea cols="60" rows="20" name="SUB_DETAIL_TEXT" style="width:100%"><?echo $str_DETAIL_TEXT?></textarea>
</td>
</tr>
<?endif?>
<?
开发者ID:akniyev,项目名称:arteva.ru,代码行数:31,代码来源:iblock_subelement_edit.php
示例3: AddEventHandler
tmpArray = arGlobalToolbar.slice(0, cutID).concat([arButtons['BlogCUT']]);
arGlobalToolbar = tmpArray.concat(arGlobalToolbar.slice(cutID));
}
//-->
</script>
<?php
}
AddEventHandler("fileman", "OnIncludeHTMLEditorScript", "CustomizeEditorForBlog");
?>
<script>
jsUtils.addCustomEvent('EditorLoadFinish_POST_MESSAGE_HTML', BXBlogSetEditorContent);
</script>
<?php
CFileman::ShowHTMLEditControl("POST_MESSAGE_HTML", $arResult["PostToShow"]["~DETAIL_TEXT"], array("site" => SITE_ID, "templateID" => "", "bUseOnlyDefinedStyles" => "N", "bWithoutPHP" => true, "arToolbars" => array("manage", "standart", "style", "formating", "source", "table"), "arTaskbars" => array("BXPropertiesTaskbar"), "sBackUrl" => "", "fullscreen" => false, "path" => "", "limit_php_access" => true, 'height' => '490', 'width' => '100%', 'light_mode' => true));
} else {
ShowError(GetMessage("FILEMAN_MODULE_NOT_INSTALL"));
}
die;
} else {
include $_SERVER["DOCUMENT_ROOT"] . $templateFolder . "/script.php";
if ($arResult["preview"] == "Y" && !empty($arResult["PostToShow"]) > 0) {
echo "<span class=\"blogtext\"><b>" . GetMessage("BLOG_PREVIEW_TITLE") . "</b></span>";
?>
<table class="blog-table-post">
<tr>
<th nowrap width="100%">
<table width="100%" cellspacing="0" cellpadding="0" border="0" class="blog-table-post-table">
<tr>
<td align="left">
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:template.php
示例4: CheckFileExtention
public static function CheckFileExtention($strPath = '', $arExt = false)
{
if (!$arExt) {
$arExt = CMedialib::GetMediaExtentions(false);
}
$ext = strtolower(CFileman::GetFileExtension($strPath));
return in_array($ext, $arExt);
}
开发者ID:andy-profi,项目名称:bxApiDocs,代码行数:8,代码来源:medialib.php
示例5: is_array
?>
;">
<?php
$site = is_array($arSITE) ? $arSITE[0] : LANG;
$arTplList = CSite::GetTemplateList($site);
$tpl = "";
while ($ar = $arTplList->Fetch()) {
if (strlen($tpl) == 0) {
$tpl = $ar["TEMPLATE"];
}
if (strlen(trim($ar["CONDITION"])) == 0) {
$tpl = $ar["TEMPLATE"];
break;
}
}
CFileMan::ShowHTMLEditControl("FORM_TEMPLATE", htmlspecialcharsback($str_FORM_TEMPLATE), array("site" => $arSITE[0], "templateID" => $tpl, "bUseOnlyDefinedStyles" => COption::GetOptionString("fileman", "show_untitled_styles", "N") != "Y", "bWithoutPHP" => false, "arToolbars" => array("standart", "style", "formating", "source", "template", "table"), "arTaskbars" => array("BXFormElementsTaskbar", "BXPropertiesTaskbar"), "toolbarConfig" => CFileman::GetEditorToolbarConfig("form_edit" . (defined('BX_PUBLIC_MODE') && BX_PUBLIC_MODE == 1 ? "_public" : "")), "sBackUrl" => "", "fullscreen" => false, 'width' => '100%', 'height' => '500', 'use_editor_3' => 'N'));
?>
<script>
oBXEditorUtils.addPHPParser(oForm.PHPParser);
oBXEditorUtils.addTaskBar('BXFormElementsTaskbar', 2, "<?php
echo GetMessageJS('FORM_TASKBARSET_TITLE');
?>
", []);
if (window.arButtons['Optimize'])
arButtons['Optimize'][1].hideCondition = function(pMainObj){return pMainObj.name == "FORM_TEMPLATE";}
</script>
</div></td>
</tr>
<?php
} else {
?>
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:form_edit.php
示例6: CheckFields
function CheckFields()
{
global $DB, $strError, $FILENAME, $APPLICATION, $ID, $BODY, $USER, $SITE_ID, $STATUS_ID, $DOC_ROOT;
$str = "";
$arMsg = array();
$SCRIPT_FILE_TYPE = GetFileType($FILENAME);
$FILENAME = trim($FILENAME);
$FILENAME = "/" . ltrim(_normalizePath($FILENAME), "/");
$io = CBXVirtualIo::GetInstance();
if (strlen($FILENAME) <= 0) {
$arMsg[] = array("id" => "FILENAME", "text" => GetMessage("FLOW_FORGOT_FILENAME"));
} elseif (!$io->ValidatePathString($FILENAME)) {
$arMsg[] = array("id" => "FILENAME", "text" => GetMessage("FLOW_FILE_NAME_NOT_VALID"));
} elseif ($SCRIPT_FILE_TYPE != "SOURCE") {
$arMsg[] = array("id" => "FILENAME", "text" => GetMessage("FLOW_INCORRECT_FILETYPE"));
} else {
$SITE_ID = CWorkflow::__CheckSite($SITE_ID);
if (!$SITE_ID) {
$SITE_ID = CSite::GetSiteByFullPath($_SERVER['DOCUMENT_ROOT'] . $FILENAME);
}
if (!$USER->CanDoFileOperation('fm_edit_in_workflow', array($SITE_ID, $FILENAME))) {
$s = str_replace("#FILENAME#", "{$FILENAME}", GetMessage("FLOW_ACCESS_DENIED"));
$arMsg[] = array("id" => "FILENAME", "text" => $s . ": " . GetMessage("FLOW_MIN_RIGHTS"));
} elseif ($STATUS_ID == 1 && !($USER->CanDoFileOperation('fm_edit_existent_file', array($SITE_ID, $FILENAME)) && $USER->CanDoFileOperation('fm_create_new_file', array($SITE_ID, $FILENAME)))) {
$arMsg[] = array("id" => "FILENAME", "text" => GetMessage("FLOW_ACCESS_DENIED_FOR_FILE_WRITE", array("#FILENAME#" => $FILENAME)));
} else {
$z = CWorkflow::GetByFilename($FILENAME, $SITE_ID);
if ($zr = $z->Fetch()) {
if ($zr["ID"] != $ID && $zr["STATUS_ID"] != 1) {
$arMsg[] = array("id" => "FILENAME", "text" => str_replace("#FILENAME#", $FILENAME, GetMessage("FLOW_FILENAME_EXIST")));
}
}
}
}
if (!CWorkflow::IsAdmin()) {
$arGroups = $USER->GetUserGroupArray();
if (!is_array($arGroups)) {
$arGroups = array(2);
}
$arFilter = array("GROUP_ID" => $arGroups, "PERMISSION_TYPE_1" => 1, "ID_EXACT_MATCH" => "Y", "ID" => $STATUS_ID);
$rsStatuses = CWorkflowStatus::GetList($by = "s_c_sort", $strOrder, $arFilter, $is_filtered, array("ID"));
if (!$rsStatuses->Fetch()) {
$arMsg[] = array("id" => "STATUS_ID", "text" => GetMessage("FLOW_ERROR_WRONG_STATUS"));
}
}
$bIsPhp = IsPHP($BODY);
if ($bIsPhp) {
if ($USER->CanDoFileOperation('fm_lpa', array($SITE_ID, $FILENAME)) && !$USER->CanDoOperation('edit_php')) {
if (CModule::IncludeModule("fileman")) {
$old_res = CFileman::ParseFileContent($APPLICATION->GetFileContent($DOC_ROOT . $FILENAME), true);
$old_BODY = $old_res["CONTENT"];
$BODY = CMain::ProcessLPA($BODY, $old_BODY);
} else {
$arMsg[] = array("id" => "BODY", "text" => "Error! Fileman is not included!");
}
} else {
if (!$USER->CanDoOperation('edit_php')) {
$arMsg[] = array("id" => "BODY", "text" => GetMessage("FLOW_PHP_IS_NOT_AVAILABLE"));
}
}
}
if (!empty($arMsg)) {
$e = new CAdminException($arMsg);
$GLOBALS["APPLICATION"]->ThrowException($e);
return false;
}
return true;
}
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:68,代码来源:workflow_edit.php
示例7: Init
public static function Init($Params)
{
global $USER;
$arWarnings = array();
if (!$USER->CanDoOperation('fileman_admin_files') && !$USER->CanDoOperation('fileman_admin_folders')) {
$arWarnings[] = GetMessage('FM_UTIL_ACCESS_DENIED');
}
$io = CBXVirtualIo::GetInstance();
if (count($arWarnings) == 0) {
$pathTo = trim($Params['copyTo'], " /");
$site = CFileMan::__CheckSite($_GET['site']);
$siteTo = $Params['siteTo'] ? $Params['siteTo'] : $site;
$pathTo = $pathTo == "" ? "/" : "/" . $pathTo . "/";
$absPathTo = CSite::GetSiteDocRoot($siteTo) . $pathTo;
$docRootFrom = CSite::GetSiteDocRoot($site);
if (!$io->DirectoryExists($absPathTo)) {
// Create destination directory
$bAccess = $USER->CanDoOperation('fileman_admin_folders') && $USER->CanDoFileOperation('fm_create_new_folder', $pathTo);
if ($Params['createCopyTo']) {
if ($bAccess) {
CFileMan::CreateDir(array($siteTo, $pathTo));
}
} else {
?>
<script>window.BXFM_NoCopyToDir = "<?php
echo $bAccess ? "ask_user" : "access_denied";
?>
";</script><?php
return;
}
}
foreach ($Params['arFiles'] as $file) {
$filePath = $file['path'];
$caseOption = $Params['caseOption'];
if ($Params["userCaseLastPath"]) {
if ($Params["userCaseLastPath"] != $filePath) {
continue;
}
$caseOption = $Params['userCaseAnswer'];
if ($Params["userCaseToAll"]) {
$Params['caseOption'] = $caseOption;
}
$Params["userCaseLastPath"] = false;
}
$arPath_i = array($site, $filePath);
$absPath_i = $docRootFrom . $filePath;
$bDir_i = $io->DirectoryExists($absPath_i);
$name_i = CFileman::GetFileName($filePath);
$strWarn = "";
// Check if file already exists in destination folder
if ($io->FileExists($absPathTo . $name_i) || $bDir_i == $io->DirectoryExists($absPathTo . $name_i) && $bDir_i) {
$fTmp = $io->GetFile($absPathTo . $name_i);
$fTmp1 = $io->GetFile($absPath_i);
$altName = CFilemanCopy::GetAltFileName($absPathTo, $name_i, $bDir_i);
if ($caseOption == 'ask') {
?>
<script>
window.BXFM_fileExist = {
fileOld: {
name: "<?php
echo CUtil::JSEscape($name_i);
?>
",
path: "<?php
echo CUtil::JSEscape($pathTo . $name_i);
?>
",
site: "<?php
echo CUtil::JSEscape($siteTo);
?>
",
bDir: <?php
echo $bDir_i ? "true" : "false";
?>
,
size: "<?php
echo $bDir_i ? '-' : CFile::FormatSize($fTmp->GetFileSize());
?>
",
date: "<?php
echo date(CDatabase::DateFormatToPHP(CLang::GetDateFormat("FULL")), CFilemanUtils::GetModifyTime($absPathTo . $name_i) + CTimeZone::GetOffset());
?>
"
},
fileNew: {
alt_name: "<?php
echo CUtil::JSEscape($altName);
?>
",
name: "<?php
echo CUtil::JSEscape($name_i);
?>
",
path: "<?php
echo CUtil::JSEscape($filePath);
?>
",
site: "<?php
echo CUtil::JSEscape($site);
?>
//.........这里部分代码省略.........
开发者ID:andy-profi,项目名称:bxApiDocs,代码行数:101,代码来源:fileman_utils.php
示例8: IncludeModuleLangFile
IncludeModuleLangFile(__FILE__);
$strWarning = "";
$site = CFileMan::__CheckSite($site);
$DOC_ROOT = CSite::GetSiteDocRoot($site);
$io = CBXVirtualIo::GetInstance();
$path = $GLOBALS["APPLICATION"]->ConvertCharset($path, "UTF-8", LANG_CHARSET);
$arFile = CFile::MakeFileArray($io->GetPhysicalName($path));
$arFile["tmp_name"] = CBXVirtualIoFileSystem::ConvertCharset($arFile["tmp_name"], CBXVirtualIoFileSystem::directionDecode);
$path = $io->CombinePath("/", $path);
$arPath = array($site, $path);
if (!$USER->CanDoFileOperation('fm_download_file', $arPath)) {
$strWarning = GetMessage("ACCESS_DENIED");
} else {
if (!$io->FileExists($arFile["tmp_name"])) {
$strWarning = GetMessage("FILEMAN_FILENOT_FOUND") . " ";
} elseif (!$USER->CanDoOperation('edit_php') && (HasScriptExtension($path) || substr(CFileman::GetFileName($path), 0, 1) == ".")) {
$strWarning .= GetMessage("FILEMAN_FILE_DOWNLOAD_PHPERROR") . "\n";
}
}
if (strlen($strWarning) <= 0) {
$flTmp = $io->GetFile($arFile["tmp_name"]);
$fsize = $flTmp->GetFileSize();
$bufSize = 4194304;
//4M
session_write_close();
set_time_limit(0);
header("Content-Type: application/force-download; name=\"" . $arFile["name"] . "\"");
header("Content-Transfer-Encoding: binary");
header("Content-Length: " . $fsize);
header("Content-Disposition: attachment; filename=\"" . $arFile["name"] . "\"");
header("Expires: 0");
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:fileman_file_download.php
示例9: 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;
}
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:11,代码来源:html_editor.php
示例10: GetMessage
$str_DETAIL_TEXT,
"DETAIL_TEXT_TYPE",
$str_DETAIL_TEXT_TYPE,
array(
'height' => 450,
'width' => '100%'
),
"N",
0,
"",
"",
$arIBlock["LID"],
true,
false,
array(
'toolbarConfig' => CFileman::GetEditorToolbarConfig("iblock_".(defined('BX_PUBLIC_MODE') && BX_PUBLIC_MODE == 1 ? 'public' : 'admin')),
'saveEditorKey' => $IBLOCK_ID,
'hideTypeSelector' => $arIBlock["FIELDS"]["DETAIL_TEXT_TYPE_ALLOW_CHANGE"]["DEFAULT_VALUE"] === "N",
)
);
?></td>
</tr>
<?else:?>
<tr id="tr_DETAIL_TEXT_TYPE">
<td><?echo GetMessage("IBLOCK_DESC_TYPE")?></td>
<td><input type="radio" name="DETAIL_TEXT_TYPE" id="DETAIL_TEXT_TYPE_text" value="text"<?if($str_DETAIL_TEXT_TYPE!="html")echo " checked"?>> <label for="DETAIL_TEXT_TYPE_text"><?echo GetMessage("IBLOCK_DESC_TYPE_TEXT")?></label> / <input type="radio" name="DETAIL_TEXT_TYPE" id="DETAIL_TEXT_TYPE_html" value="html"<?if($str_DETAIL_TEXT_TYPE=="html")echo " checked"?>> <label for="DETAIL_TEXT_TYPE_html"><?echo GetMessage("IBLOCK_DESC_TYPE_HTML")?></label></td>
</tr>
<tr id="tr_DETAIL_TEXT">
<td colspan="2" align="center">
<textarea cols="60" rows="20" name="DETAIL_TEXT" style="width:100%"><?echo $str_DETAIL_TEXT?></textarea>
</td>
开发者ID:nycmic,项目名称:bittest,代码行数:31,代码来源:iblock_element_edit.php
示例11: Array
'name' => 'filesrc',
'id' => 'filesrc',
'width' => '100%',
'height' => '650',
'content' => $filesrc,
'bAllowPhp' => $USER->CanDoOperation('edit_php'),
"limitPhpAccess" => $limit_php_access
));
?>
<?else:?>
<? CFileman::ShowHTMLEditControl("filesrc", $filesrc, Array(
"site"=>$site,
"templateID"=>$templateID,
"bUseOnlyDefinedStyles"=>COption::GetOptionString("fileman", "show_untitled_styles", "N")!="Y",
"bWithoutPHP"=>(!$USER->CanDoOperation('edit_php')),
"toolbarConfig" => CFileman::GetEditorToolbarConfig("filesrc"),
"arToolbars"=>Array("manage", "standart", "style", "formating", "source", "template"),
"arTaskbars"=>Array("BXComponentsTaskbar", "BXComponents2Taskbar", "BXPropertiesTaskbar", "BXSnippetsTaskbar"),
"sBackUrl"=>$url,
"fullscreen"=>($bFullScreen=='Y'),
"path" => $path,
'width' => '100%',
'height' => '650px',
"limit_php_access" => $limit_php_access
)
);?>
<?endif;?>
</td></tr>
<?if($bEditProps):?>
<?$tabControl->BeginNextTab();?>
<tr>
开发者ID:ASDAFF,项目名称:open_bx,代码行数:31,代码来源:fileman_html_edit.php
示例12: Copyright
# Copyright (c) 2002-2006 Bitrix #
# http://www.bitrixsoft.com #
# mailto:[email protected] #
##############################################
*/
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";
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:fileman_editor_action.php
示例13: getDiff
<tr id="tr_DETAIL_TEXT_DIFF">
<td colspan="2">
<div style="width:95%;background-color:white;border:1px solid black;padding:5px">
<?php
echo getDiff($prev_arElement["DETAIL_TEXT"], $arElement["DETAIL_TEXT"]);
?>
</div>
</td>
</tr>
<?php
} elseif (COption::GetOptionString("iblock", "use_htmledit", "Y") == "Y" && $bFileman) {
?>
<tr id="tr_DETAIL_TEXT_EDITOR">
<td colspan="2" align="center">
<?php
CFileMan::AddHTMLEditorFrame("DETAIL_TEXT", $str_DETAIL_TEXT, "DETAIL_TEXT_TYPE", $str_DETAIL_TEXT_TYPE, array('height' => 450, 'width' => '100%'), "N", 0, "", "", $arIBlock["LID"], true, false, array('toolbarConfig' => CFileman::GetEditorToolbarConfig("iblock_" . (defined('BX_PUBLIC_MODE') && BX_PUBLIC_MODE == 1 ? 'public' : 'admin')), 'saveEditorKey' => $IBLOCK_ID));
?>
</td>
</tr>
<?php
} else {
?>
<tr id="tr_DETAIL_TEXT_TYPE">
<td><?php
echo GetMessage("IBLOCK_DESC_TYPE");
?>
</td>
<td><input type="radio" name="DETAIL_TEXT_TYPE" id="DETAIL_TEXT_TYPE_text" value="text"<?php
if ($str_DETAIL_TEXT_TYPE != "html") {
echo " checked";
}
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:iblock_element_edit.php
示例14: Array
Array("height"=>600, "width"=>'100%'),
"N", //CONVERT_FOR_WORKFLOW
0, //WORKFLOW_DOCUMENT_ID
"", //NEW_DOCUMENT_PATH
"", //textarea_field
false, //site
false, //bWithoutPHP
Array("BXPropertiesTaskbar","BXComponentsTaskbar", "BXComponents2Taskbar","BXSnippetsTaskbar"), //arTaskbars
Array //arAdditionalParams
(
"additionalCSS" => Array($template_styles_path),
"saveEditorState" => false,
//"dontusecookie" => true,
"limit_php_access" => ($lpa || $lpa_view),
"dontshowta" => true,
'toolbarConfig' => CFileman::GetEditorToolbarConfig("template_edit")
)
);
else:?>
<textarea rows="28" cols="60" style="width:100%" id="bxed_CONTENT" name="CONTENT" wrap="off"><?echo htmlspecialcharsbx(htmlspecialcharsback($str_CONTENT))?></textarea>
<?endif;?>
</td>
</tr>
<script type="text/javascript" src="/bitrix/js/main/template_edit.js?v=<?php
echo @filemtime($_SERVER['DOCUMENT_ROOT'] . '/bitrix/js/main/template_edit.js');
?>
"></script>
<script>
var messErrorWA = '<?echo CUtil::JSEscape(GetMessage("templ_edit_error_wa"))?>';
开发者ID:nProfessor,项目名称:Mytb,代码行数:31,代码来源:template_edit.php
示例15: onEditorUnregister
editorDialog.DenyClose();
editor.GetDialog('ConfirmExit').Show();
}
}
function onEditorUnregister()
{
editor.Destroy();
}
})();
</script>
<?php
/* ************* END |HTML EDITOR 3.0| END ************* */
} else {
/* ************* OLD HTML EDITOR ************* */
CFileman::ShowHTMLEditControl($editor_name, $filesrc, array("site" => $site, "templateID" => $_REQUEST['templateID'], "bUseOnlyDefinedStyles" => COption::GetOptionString("fileman", "show_untitled_styles", "N") != "Y", "bWithoutPHP" => !$USER->CanDoOperation('edit_php'), "toolbarConfig" => CFileman::GetEditorToolbarConfig($editor_name), "arTaskbars" => array("BXComponentsTaskbar", "BXComponents2Taskbar", "BXPropertiesTaskbar", "BXSnippetsTaskbar"), "sBackUrl" => $back_url, "path" => $path, "limit_php_access" => $limit_php_access, 'height' => '490', 'width' => '100%', 'light_mode' => true));
?>
<script>
var _bEdit = true;
arEditorFastDialogs['asksave'] = function(pObj)
{
return {
title: BX_MESS.EDITOR,
innerHTML : "<div style='margin-bottom: 20px; padding: 5px;'>" + BX_MESS.DIALOG_EXIT_ACHTUNG + "</div>",
width: 700,
height: 130,
OnLoad: function()
{
window.oBXEditorDialog.SetButtons([
new BX.CWindowButton(
{
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:file_edit.php
示例16: GetMessage
if (!$io->FileExists($abs_path) && !$io->DirectoryExists($abs_path)) {
$strWarning .= GetMessage("FILEMAN_FILEORFOLDER_NOT_FOUND");
} else {
if ($REQUEST_METHOD == "POST" && strlen($save) > 0 && check_bitrix_sessid()) {
$pathTmp = $path;
foreach ($arFiles as $ind => $file) {
$newfilename = $filename[$ind];
if (strlen($newfilename) <= 0) {
$strWarning .= GetMessage("FILEMAN_RENAME_NEW_NAME") . " \"" . $file . "\"!\n";
} elseif (($mess = CFileMan::CheckFileName($newfilename)) !== true) {
$strWarning = $mess;
} else {
$pathto = Rel2Abs($path, $newfilename);
if (!$USER->CanDoFileOperation('fm_create_new_file', array($site, $pathto))) {
$strWarning .= GetMessage("FILEMAN_RENAME_ACCESS_ERROR") . "\n";
} elseif (!$USER->CanDoOperation('edit_php') && (substr(CFileman::GetFileName($file), 0, 1) == "." || substr(CFileman::GetFileName($pathto), 0, 1) == "." || !HasScriptExtension($file) && HasScriptExtension($pathto))) {
// if not admin and renaming from non PHP to PHP
$strWarning .= GetMessage("FILEMAN_RENAME_TOPHPFILE_ERROR") . "\n";
} elseif (!$USER->CanDoOperation('edit_php') && HasScriptExtension($file) && !HasScriptExtension($pathto)) {
// if not admin and renaming from PHP to non PHP
$strWarning .= GetMessage("FILEMAN_RENAME_FROMPHPFILE_ERROR") . "\n";
} else {
$pathparsedtmp = CFileMan::ParsePath(array($site, $pathto), false, false, "", $logical == "Y");
$strWarningTmp = CFileMan::CreateDir($pathparsedtmp["PREV"]);
if (strlen($strWarningTmp) > 0) {
$strWarning .= $strWarningTmp;
} else {
if (!$io->FileExists($DOC_ROOT . $path . "/" . $file)) {
$strWarning .= GetMessage("FILEMAN_RENAME_FILE") . " \"" . $path . "/" . $file . "\" " . GetMessage("FILEMAN_RENAME_NOT_FOUND") . "!\n";
} elseif (!$io->Rename($DOC_ROOT . $path . "/" . $file, $DOC_ROOT . $pathto)) {
$strWarning .= GetMessage("FILEMAN_RENAME_ERROR") . " \"" . $path . "/" . $file . "\" " . GetMessage("FILEMAN_RENAME_IN") . " \"" . $pathto . "\"!\n";
开发者ID:spas-viktor,项目名称:books,代码行数:31,代码来源:fileman_rename.php
示例17: isset
for($i = 0; $i<$numpropsvals; $i++)
{
if(strlen(Trim($_POST["CODE_".$i]))>0 && strlen(Trim($_POST["VALUE_".$i]))>0)
{
if($bNeedComma) $strDirProperties .= ",\n";
$strDirProperties .= " \"".CFileMan::EscapePHPString(Trim($_POST["CODE_".$i]))."\" => \"".CFileMan::EscapePHPString(Trim($_POST["VALUE_".$i]))."\"";
$bNeedComma = True;
$bNeedSectionFile = True;
}
}
$strDirProperties .= "\n);\n";
if($bNeedSectionFile)
$APPLICATION->SaveFileContent($DOC_ROOT.$path."/.section.php", "<"."?\n".$strSectionName.$strDirProperties."?".">");
else
CFileman::DeleteFile(Array($site, $path."/.section.php"));
if($USER->CanDoFileOperation('fm_edit_permission',$arPath))
{
$arPermissions=Array();
$db_groups = CGroup::GetList($order="sort", $by="asc");
while($arGroup = $db_groups->Fetch())
{
$gperm = isset($_POST["g_".$arGroup["ID"]]) ? $_POST["g_".$arGroup["ID"]] : '';
if (!isset($gperm))
{
if($path=="")
$gperm = $CUR_PERM["/"][$arGroup['ID']];
else
$gperm = $CUR_PERM[$arParsedPath["LAST"]][$arGroup['ID']];
}
开发者ID:ASDAFF,项目名称:open_bx,代码行数:31,代码来源:fileman_folder.php
示例18: array
$path = $io->CombinePath("/", $path);
$arParsedPath = CFileMan::ParsePath(array($site, $path), true);
$abs_path = $DOC_ROOT . $path;
$arPath = array($site, $path);
$bUploaded = false;
$file_name = "";
$strWarning = "";
if ($REQUEST_METHOD == "POST" && strlen($saveimg) > 0 && check_bitrix_sessid()) {
if (!$USER->CanDoOperation('fileman_edit_existent_files') || !$USER->CanDoFileOperation('fm_edit_existent_file', $arPath)) {
$strWarning = GetMessage('FILEMAN_CAN_NOT_WRITE') . "<br>";
} else {
$file_name = CFileman::GetFileName($newfilename);
if (strlen($file_name) <= 0 || $file_name == "none") {
continue;
}
if (!$USER->IsAdmin() && (in_array(CFileman::GetFileExtension($file_name), CFileMan::GetScriptFileExt()) || $file_name[0] == ".")) {
$strWarning .= GetMessage("FILEMAN_UPLOAD_BAD_TYPE") . "\n";
} elseif ($io->FileExists($abs_path . "/" . $file_name)) {
$strWarning = GetMessage("FILEMAN_FILE_EXIST") . "<br>";
} else {
if ($io->Copy($_FILES["imagefile"]["tmp_name"], $abs_path . "/" . $file_name)) {
$bUploaded = true;
$f = $io->GetFile($abs_path . "/" . $file_name);
$f->MarkWritable();
}
}
}
}
if ($bUploaded) {
?>
<script>
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:fileman_fck_browser.php
示例19: 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("fi
|
请发表评论