• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP CFileMan类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getDirStructure

 public static function getDirStructure($bLogical, $site, $path)
 {
     global $USER;
     $arDirContent = array();
     if ($USER->CanDoFileOperation('fm_view_listing', array($site, $path))) {
         \Bitrix\Main\Loader::includeModule('fileman');
         $arDirs = array();
         $arFiles = array();
         \CFileMan::GetDirList(array($site, $path), $arDirs, $arFiles, array(), array("NAME" => "asc"), "DF", $bLogical, true);
         $arDirContent_t = array_merge($arDirs, $arFiles);
         for ($i = 0, $l = count($arDirContent_t); $i < $l; $i++) {
             $file = $arDirContent_t[$i];
             $arPath = array($site, $file['ABS_PATH']);
             if ($file["TYPE"] == "F" && !$USER->CanDoFileOperation('fm_view_file', $arPath) || $file["TYPE"] == "D" && !$USER->CanDoFileOperation('fm_view_listing', $arPath) || $file["TYPE"] == "F" && $file["NAME"] == ".section.php") {
                 continue;
             }
             $f = $file['TYPE'] == 'F' ? new \Bitrix\Main\IO\File($file['PATH'], $site) : new \Bitrix\Main\IO\Directory($file['PATH'], $site);
             $p = $f->getName();
             if ($f->isSystem() || $file['TYPE'] == 'F' && in_array($p, array("urlrewrite.php")) || $file['TYPE'] == 'D' && preg_match("/\\/(bitrix|" . \COption::getOptionString("main", "upload_dir", "upload") . ")\\//", "/" . $p . "/")) {
                 continue;
             }
             $arFileData = array('NAME' => $bLogical ? $file['LOGIC_NAME'] : $p, 'FILE' => $p, 'TYPE' => $file['TYPE'], 'DATA' => $file);
             if (strlen($arFileData['NAME']) <= 0) {
                 $arFileData['NAME'] = GetMessage('SEO_DIR_LOGICAL_NO_NAME');
             }
             $arDirContent[] = $arFileData;
         }
         unset($arDirContent_t);
     }
     return $arDirContent;
 }
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:seo_utils.php


示例2: genEditHTML

 protected function genEditHTML()
 {
     if (\CModule::IncludeModule("fileman")) {
         ob_start();
         $codeType = $this->code . '_TEXT_TYPE';
         /** @var string $className Имя класса без неймспейса */
         $className = $this->getEntityShortName();
         $entityClass = $this->entityName;
         $modelPk = $entityClass::getEntity()->getPrimary();
         $id = isset($this->data[$modelPk]) ? $this->data[$modelPk] : false;
         $bxCode = $this->code . '_' . $className;
         $bxCodeType = $codeType . '_' . $className;
         if ($this->forceMultiple) {
             if ($id) {
                 $bxCode .= '_' . $id;
                 $bxCodeType .= '_' . $id;
             } else {
                 $bxCode .= '_new_';
                 $bxCodeType .= '_new_';
             }
         }
         // TODO Избавиться от данного костыля
         if ($_REQUEST[$bxCode]) {
             $this->data[$this->code] = $_REQUEST[$bxCode];
         }
         \CFileMan::AddHTMLEditorFrame($bxCode, $this->data[$this->code], $bxCodeType, $this->data[$codeType], array('width' => $this->getSettings('WIDTH'), 'height' => $this->getSettings('HEIGHT')));
         $defaultEditors = array("text" => "text", "html" => "html", "editor" => "editor");
         $editors = $this->getSettings('EDITORS');
         $defaultEditor = strtolower($this->getSettings('DEFAULT_EDITOR'));
         $contentType = $this->data[$codeType];
         $defaultEditor = isset($contentType) && $contentType == "text" ? "text" : $defaultEditor;
         $defaultEditor = isset($contentType) && $contentType == "html" ? "editor" : $defaultEditor;
         if (count($editors) > 1) {
             foreach ($editors as &$editor) {
                 $editor = strtolower($editor);
                 if (isset($defaultEditors[$editor])) {
                     unset($defaultEditors[$editor]);
                 }
             }
         }
         $script = '<script type="text/javascript">';
         $script .= '$(document).ready(function() {';
         foreach ($defaultEditors as $editor) {
             $script .= '$("#bxed_' . $bxCode . '_' . $editor . '").parent().hide();';
         }
         $script .= '$("#bxed_' . $bxCode . '_' . $defaultEditor . '").click();';
         $script .= 'setTimeout(function() {$("#bxed_' . $bxCode . '_' . $defaultEditor . '").click(); }, 500);';
         $script .= "});";
         $script .= '</script>';
         echo $script;
         $html = ob_get_clean();
         return $html;
     } else {
         return parent::genEditHTML();
     }
 }
开发者ID:Reprezo,项目名称:digitalwand.admin_helper,代码行数:56,代码来源:VisualEditorWidget.php


示例3: DEMO_Sale_AddMenuItem

 function DEMO_Sale_AddMenuItem($menuFile, $menuItem)
 {
     if (CModule::IncludeModule('fileman')) {
         $arResult = CFileMan::GetMenuArray($_SERVER["DOCUMENT_ROOT"] . $menuFile);
         $arMenuItems = $arResult["aMenuLinks"];
         $menuTemplate = $arResult["sMenuTemplate"];
         $bFound = false;
         foreach ($arMenuItems as $item) {
             if ($item[1] == $menuItem[1]) {
                 $bFound = true;
             }
         }
         if (!$bFound) {
             $arMenuItems[] = $menuItem;
             CFileMan::SaveMenu(array($arParams["site_id"], $menuFile), $arMenuItems, $menuTemplate);
         }
     }
 }
开发者ID:Satariall,项目名称:izurit,代码行数:18,代码来源:step2.php


示例4: GetMessage

echo GetMessage("FLOW_TITLE");
?>
</td>
		<td><input type="text" name="TITLE" maxlength="255" value="<?php 
echo $str_TITLE;
?>
" style="width:60%"></td>
	</tr>
	<?php 
if (COption::GetOptionString("workflow", "USE_HTML_EDIT", "Y") == "Y" && CModule::IncludeModule("fileman")) {
    ?>
	<tr>
		<td colspan="2" align="center"><?php 
    $limit_php_access = $USER->CanDoFileOperation('fm_lpa', array($str_SITE_ID, $str_FILENAME)) && !$USER->CanDoOperation('edit_php');
    $bWithoutPHP = !$USER->CanDoOperation('edit_php') && !$limit_php_access;
    CFileMan::AddHTMLEditorFrame("BODY", $str_BODY, "BODY_TYPE", $str_BODY_TYPE, 400, "Y", $ID, GetDirPath($str_FILENAME), "", false, $bWithoutPHP, false, array('limit_php_access' => $limit_php_access));
    ?>
</td>
	</tr>
	<?php 
} else {
    ?>
	<tr>
		<td colspan="2" align="center"><?php 
    echo InputType("radio", "BODY_TYPE", "text", $str_BODY_TYPE, false);
    ?>
&nbsp;<?php 
    echo GetMessage("FLOW_TEXT");
    ?>
/&nbsp;<?php 
    echo InputType("radio", "BODY_TYPE", "html", $str_BODY_TYPE, false);
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:workflow_edit.php


示例5: array

none<?php 
}
?>
;">
		<td align="center" colspan="2">
			<table width="95%" cellspacing="0" border="0" cellpadding="0">
			<?php 
if ($isEditMode) {
    if (COption::GetOptionString("advertising", "USE_HTML_EDIT", "Y") == "Y" && CModule::IncludeModule("fileman")) {
        ?>
				<tr valign="top">
					<td align="center" colspan="2"><?php 
        if (defined('BX_PUBLIC_MODE') && BX_PUBLIC_MODE == 1) {
            CFileMan::AddHTMLEditorFrame("CODE", $str_CODE, "CODE_TYPE", $str_CODE_TYPE, array('height' => 450, 'width' => '100%'), "N", 0, "", "onfocus=\"t=this\"");
        } else {
            CFileMan::AddHTMLEditorFrame("CODE", $str_CODE, "CODE_TYPE", $str_CODE_TYPE, 300, "N", 0, "", "onfocus=\"t=this\"");
        }
        ?>
</td>
				</tr>
				<?php 
    } else {
        ?>
					<tr valign="top">
						<td align="center" colspan="2"><?php 
        echo InputType("radio", "CODE_TYPE", "text", $str_CODE_TYPE, false);
        echo GetMessage("AD_TEXT");
        ?>
/&nbsp;<?php 
        echo InputType("radio", "CODE_TYPE", "html", $str_CODE_TYPE, false);
        ?>
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:adv_banner_edit.php


示例6: GetMessage

	</tr>
<?php 
    $tabControl->EndCustomField("ANSWERS");
    ?>

<?php 
    $tabControl->BeginNextFormTab();
    $tabControl->BeginCustomField("DESCRIPTION", GetMessage("LEARNING_DESCRIPTION"), false);
    ?>
	<?php 
    if (COption::GetOptionString("learning", "use_htmledit", "Y") == "Y" && CModule::IncludeModule("fileman")) {
        ?>
	<tr>
		<td colspan="2" align="center">
			<?php 
        CFileMan::AddHTMLEditorFrame("DESCRIPTION", $str_DESCRIPTION, "DESCRIPTION_TYPE", $str_DESCRIPTION_TYPE, array('width' => '100%', 'height' => '500'), "N", 0, "", "", false, true, false, array('toolbarConfig' => CFileman::GetEditorToolbarConfig("learning_" . (defined('BX_PUBLIC_MODE') && BX_PUBLIC_MODE == 1 ? 'public' : 'admin'))));
        ?>
		</td>
	</tr>
	<?php 
    } else {
        ?>
	<tr>
		<td align="center"><?php 
        echo GetMessage("LEARNING_DESC_TYPE");
        ?>
:</td>
		<td>
			<input type="radio" name="DESCRIPTION_TYPE" value="text"<?php 
        if ($str_DESCRIPTION_TYPE != "html") {
            echo " checked";
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:learn_question_edit.php


示例7: RequestAction


//.........这里部分代码省略.........
			case "snippet_add_category":
				if (!$USER->CanDoOperation('fileman_view_file_structure'))
					break;
				CUtil::JSPostUnEscape();
				$template = $_REQUEST['site_template'];
				$res = CSnippets::CreateCategory(array(
					'template' => $template,
					'name' => $_REQUEST['category_name'],
					'parent' => $_REQUEST['category_parent']
				));

				if ($res)
				{
					$result = array(
						'result' => true,
						'snippets' => array($template => self::GetSnippets($template))
					);
				}
				else
				{
					$result = array('result' => false);
				}
				break;
			case "snippet_remove_category":
				if (!$USER->CanDoOperation('fileman_view_file_structure'))
					break;
				CUtil::JSPostUnEscape();
				$template = $_REQUEST['site_template'];
				$res = CSnippets::RemoveCategory(array(
					'template' => $template,
					'path' => $_REQUEST['category_path']
				));

				if ($res)
				{
					$result = array(
						'result' => true,
						'snippets' => array($template => self::GetSnippets($template))
					);
				}
				else
				{
					$result = array('result' => false);
				}
				break;
			case "snippet_rename_category":
				if (!$USER->CanDoOperation('fileman_view_file_structure'))
					break;
				CUtil::JSPostUnEscape();
				$template = $_REQUEST['site_template'];
				$res = CSnippets::RenameCategory(array(
					'template' => $template,
					'path' => $_REQUEST['category_path'],
					'new_name' => $_REQUEST['category_new_name']
				));

				if ($res)
				{
					$result = array(
						'result' => true,
						'snippets' => array($template => self::GetSnippets($template))
					);
				}
				else
				{
					$result = array('result' => false);
				}
				break;
			// END *** Snippets actions

			// spellcheck
			case "spellcheck_words":
			case "spellcheck_add_word":
				CUtil::JSPostUnEscape();
				$spellChecker = new CSpellchecker(array(
					"lang" => $_REQUEST['lang'],
					"skip_length" => 2,
					"use_pspell" => $_REQUEST['use_pspell'] !== "N",
					"use_custom_spell" => $_REQUEST['use_custom_spell'] !== "N",
					"mode" => PSPELL_FAST
				));

				if ($action == "spellcheck_words")
				{
					$words = (isset($_REQUEST['words']) && is_array($_REQUEST['words'])) ? $_REQUEST['words'] : array();
					$result = array(
						'words' => $spellChecker->checkWords($words)
					);
				}
				else // Add word
				{
					$word = CFileMan::SecurePathVar($_REQUEST['word']);
					$spellChecker->addWord($word);
				}
				break;
			// END *** spellcheck
		}

		self::ShowResponse(intVal($_REQUEST['reqId']), $result);
	}
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:101,代码来源:html_editor.php


示例8: bitrix_sessid_post

        echo bitrix_sessid_post();
        ?>

<?php 
        $aTabs = array(array("DIV" => "edit1", "TAB" => GetMessage("FILEMAN_TAB1"), "ICON" => "fileman", "TITLE" => GetMessage("FILEMAN_TAB1_ALT")));
        $tabControl = new CAdminTabControl("tabControl", $aTabs);
        $tabControl->Begin();
        ?>

<?php 
        $tabControl->BeginNextTab();
        ?>

	<?php 
        if ($bEdit && strlen($strWarning) <= 0) {
            $res = CFileMan::GetMenuArray($abs_path);
            $aMenuLinksTmp = $res["aMenuLinks"];
            $sMenuTemplateTmp = $res["sMenuTemplate"];
        }
        if (!is_array($aMenuLinksTmp)) {
            $aMenuLinksTmp = array();
        }
        ?>

	<tr>
		<td><?php 
        echo GetMessage("FILEMAN_MENU_EDIT_TYPE");
        ?>
</td>
		<td>
			<script>
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:fileman_menu_edit.php


示例9: BaseConvertToDB

 function BaseConvertToDB($value)
 {
     $io = CBXVirtualIo::GetInstance();
     $arRes = array("path" => "");
     if (!is_array($value)) {
         $value = array();
     }
     //In case of DB value just serialize it
     if (implode("|", array_keys($value)) === 'path|width|height|title|duration|author|date|desc') {
         return serialize($value);
     }
     if ($value["B_NEW_FILE"] != "N") {
         if (strlen($value["CUR_PATH"]) > 0 && $value["DEL_CUR_FILE"] == "Y" && CIBlockPropertyVideo::CheckFileInUploadDir($value["CUR_PATH"])) {
             // del current file
             $cur_path_ = $_SERVER["DOCUMENT_ROOT"] . Rel2Abs("/", $value["CUR_PATH"]);
             $flTmp = $io->GetFile($cur_path_);
             $flSzTmp = $flTmp->GetFileSize();
             if ($io->Delete($cur_path_)) {
                 // Quota
                 if (COption::GetOptionInt("main", "disk_space") > 0) {
                     CDiskQuota::updateDiskQuota("file", $flSzTmp, "delete");
                 }
             }
         }
         // Get video
         if (strlen($value["PATH"]) > 0) {
             $arRes["path"] = $value["PATH"];
         } else {
             if (isset($value["FILE"]) && strlen($value["FILE"]["tmp_name"]) > 0) {
                 $pathToDir = CIBlockPropertyVideo::GetUploadDirPath();
                 if (!$io->DirectoryExists($_SERVER["DOCUMENT_ROOT"] . $pathToDir)) {
                     CFileMan::CreateDir($pathToDir);
                 }
                 // 1. Convert name
                 $name = preg_replace("/[^a-zA-Z0-9_:\\.]/is", "_", $value["FILE"]["name"]);
                 $baseNamePart = substr($name, 0, strpos($name, '.'));
                 $ext = GetFileExtension($name);
                 if (strlen($ext) > 0 && !HasScriptExtension($name) && !substr($name, 0, 1) != ".") {
                     $ind = 0;
                     // 2. Check if file already exists
                     while ($io->FileExists($_SERVER["DOCUMENT_ROOT"] . Rel2Abs($pathToDir, $name))) {
                         $name = $baseNamePart . "_(" . ++$ind . ")." . $ext;
                     }
                     // 3. Rename
                     $pathto = Rel2Abs($pathToDir, $name);
                     if (is_uploaded_file($value["FILE"]["tmp_name"]) && $io->Copy($value["FILE"]["tmp_name"], $_SERVER["DOCUMENT_ROOT"] . $pathto)) {
                         $arRes["path"] = Rel2Abs("/", $pathto);
                         // Quota
                         if (COption::GetOptionInt("main", "disk_space") > 0) {
                             CDiskQuota::updateDiskQuota("file", $value["FILE"]["size"], "add");
                         }
                     }
                 }
             }
         }
     } elseif (strlen($value["CUR_PATH"]) > 0) {
         if (preg_match("/^(http|https):\\/\\//", $value["CUR_PATH"])) {
             $arRes["path"] = $value["CUR_PATH"];
         } else {
             $arRes["path"] = Rel2Abs("/", $value["CUR_PATH"]);
         }
     }
     // Width  & height
     $arRes["width"] = intVal($value["WIDTH"]);
     $arRes["height"] = intVal($value["HEIGHT"]);
     if ($arRes["width"] < 0) {
         $arRes["width"] = 400;
     }
     if ($arRes["height"] < 0) {
         $arRes["height"] = 300;
     }
     // Video info
     $arRes["title"] = $value["TITLE"];
     $arRes["duration"] = $value["DURATION"];
     $arRes["author"] = $value["AUTHOR"];
     $arRes["date"] = $value["DATE"];
     $arRes["desc"] = $value["DESC"];
     $strRes = serialize($arRes);
     if ($arRes["path"] == "" && $arRes["title"] == "" && $arRes["author"] == "") {
         return "";
     }
     return $strRes;
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:83,代码来源:properties.php


示例10: 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


示例11: substr

                                $arParsedPathTmp = CFileMan::ParsePath(array($site, $pathto), false, false, "", $logical == "Y");
                                $arFiles[$ind] = $arParsedPathTmp["LAST"];
                                $pathTmp = $arParsedPathTmp["PREV"];
                            }
                        }
                    }
                }
            }
            if (strlen($strWarning) <= 0) {
                $module_id = "fileman";
                if (COption::GetOptionString($module_id, "log_page", "Y") == "Y") {
                    $res_log['path'] = substr($pathto, 1);
                    CEventLog::Log("content", "FILE_RENAME", "fileman", "", serialize($res_log));
                }
                $path = $pathTmp;
                $arParsedPath = CFileMan::ParsePath(array($site, $path), false, false, "", $logical == "Y");
                $abs_path = $DOC_ROOT . $path;
                LocalRedirect("/bitrix/admin/fileman_admin.php?" . $addUrl . "&site=" . $site . "&path=" . UrlEncode($path));
            }
        }
    }
}
$APPLICATION->SetTitle(GetMessage("FILEMAN_RENAME_TITLE"));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
ShowError($strWarning);
if (count($arFiles) > 0) {
    ?>
<form action="fileman_rename.php?lang=<?php 
    echo LANG;
    ?>
&path=<?php 
开发者ID:spas-viktor,项目名称:books,代码行数:31,代码来源:fileman_rename.php


示例12: strtolower

		BX.focus(BX('bx-filesrc'));
	});


	return BX.PreventDefault(e || window.event);
}

BX.ready(function() {
	BX.bind(document.forms.ffilemanedit.apply, 'click', AjaxApply);
});
</script>

<?php 
    if (COption::GetOptionString('fileman', "use_code_editor", "Y") == "Y") {
        $forceSyntax = false;
        $ext = strtolower(CFileMan::GetFileExtension($path));
        if ($ext == 'sql') {
            $forceSyntax = 'sql';
        } elseif ($ext == 'js') {
            $forceSyntax = 'js';
        }
        CCodeEditor::Show(array('textareaId' => 'bx-filesrc', 'height' => 500, 'forceSyntax' => $forceSyntax));
    }
    // $hkInst = CHotKeys::getInstance();
    // $arExecs = $hkInst->GetCodeByClassName("admin_file_edit_apply");
    // echo $hkInst->PrintJSExecs($arExecs);
    ?>

<?php 
}
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin.php";
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:fileman_file_edit.php


示例13: AddMenuItem

 private function AddMenuItem()
 {
     //Add menu Item
     $MenuFolderPath = $this->IO->CombinePath("/", '/services/');
     $MenuFilePath = $this->IO->CombinePath($MenuFolderPath, ".left.menu.php");
     $AbsMenuFilePath = $this->IO->CombinePath($this->DOCUMENT_ROOT, $MenuFilePath);
     if ($this->IO->FileExists($AbsMenuFilePath)) {
         $MenuResource = CFileMan::GetMenuArray($AbsMenuFilePath);
         $arMenuItems = $MenuResource["aMenuLinks"];
         $bAddMenuItem = true;
         foreach ($arMenuItems as $MenuItem) {
             if (in_array($MenuItem[1], array($this->PublicDir, $this->PublicDir . "index.php"))) {
                 $bAddMenuItem = false;
                 break;
             }
         }
         if ($bAddMenuItem) {
             $arMenuItems[] = array(GetMessage("IDEA_PUBLIC_FILE_MENU_TITLE"), $this->PublicDir, array(), array(), "CBXFeatures::IsFeatureEnabled('Idea')");
             CFileMan::SaveMenu(array($this->SITE_ID, $MenuFilePath), $arMenuItems, "");
         }
     }
 }
开发者ID:webgksupport,项目名称:alpina,代码行数:22,代码来源:step1.php


示例14: GetMessage

						'absPath' => $abs_path,
						'content' => $f->GetContents()
					)
				);
			}

			if(!$APPLICATION->SaveFileContent($abs_path, $filesrc_for_save))
			{
				if($str_err = $APPLICATION->GetException())
				{
					if ($err = $str_err ->GetString())
						$strWarning = $err;

					$bVarsFromForm = true;
					$path = $io->CombinePath("/", $arParsedPath["PREV"]);
					$arParsedPath = CFileMan::ParsePath($path, true, false, "", $logical == "Y");
					$abs_path = $DOC_ROOT.$path;
				}

				if (empty($strWarning))
					$strWarning = GetMessage("FILEMAN_FILE_SAVE_ERROR")." ";
			}
			else
			{
				if(COption::GetOptionString("fileman", "log_page", "Y")=="Y")
				{
					$res_log['path'] = substr($path, 1);
					CEventLog::Log(
						"content",
						"PAGE_EDIT",
						"main",
开发者ID:ASDAFF,项目名称:open_bx,代码行数:31,代码来源:file_edit.php


示例15: str_replace

if ($io->CreateDirectory($absPath)) {
    $c = str_replace(array_keys($arReplace), array_values($arReplace), file_get_contents(dirname(__FILE__) . "/public/index.php"));
    if ($f = $io->GetFile($absFile)) {
        $f->PutContents($c);
        CUrlRewriter::Add(array('CONDITION' => '#^' . $meeting_folder . '/#', 'RULE' => '', 'ID' => 'bitrix:meetings', 'PATH' => $meeting_folder . '/' . $fileName));
    }
    if (CModule::IncludeModule('fileman')) {
        $absMenuFile = $absMenuPath . '/.left.menu.php';
        $menuFile = $menuFolder . '/.left.menu.php';
        $arResult = CFileMan::GetMenuArray($absMenuFile);
        $arMenuItems = $arResult["aMenuLinks"];
        $menuTemplate = $arResult["sMenuTemplate"];
        $menuItemPosition = 1;
        foreach ($arMenuItems as $item) {
            if ($item[0] == GetMessage('MEETING_MODULE_NAME') || $item[1] == $meeting_folder . '/') {
                $menuItemPosition = -1;
                break;
            }
        }
        if ($menuItemPosition > 0) {
            if ($menuItemPosition > count($arMenuItems)) {
                $menuItemPosition = 0;
            }
            for ($i = count($arMenuItems) - 1; $i >= $menuItemPosition; $i--) {
                $arMenuItems[$i + 1] = $arMenuItems[$i];
            }
            $arMenuItems[$menuItemPosition] = array(GetMessage('MEETING_MODULE_NAME'), $meeting_folder . '/', array(), array(), "CBXFeatures::IsFeatureEnabled('Meeting')");
            CFileMan::SaveMenu(array($site, $menuFile), $arMenuItems, $menuTemplate);
        }
    }
}
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:index_public.php


示例16: getDiff

	<tr id="tr_SUB_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_SUB_DETAIL_TEXT_EDITOR">
		<td colspan="2" align="center">
			<?php 
        CFileMan::AddHTMLEditorFrame("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, 'hideTypeSelector' => $arIBlock["FIELDS"]["DETAIL_TEXT_TYPE_ALLOW_CHANGE"]["DEFAULT_VALUE"] === "N"));
        ?>
</td>
	</tr>
	<?php 
    } else {
        ?>
	<tr id="tr_SUB_DETAIL_TEXT_TYPE">
		<td><?php 
        echo GetMessage("IBLOCK_DESC_TYPE");
        ?>
</td>
		<td><input type="radio" name="SUB_DETAIL_TEXT_TYPE" id="SUB_DETAIL_TEXT_TYPE_text" value="text"<?php 
        if ($str_DETAIL_TEXT_TYPE != "html") {
            echo " checked";
        }
开发者ID:vim84,项目名称:b-markt,代码行数:31,代码来源:iblock_subelement_edit.php


示例17: replacer

function replacer($str)
{
    $str = CFileMan::SecurePathVar($str);
    $str = preg_replace("/[^a-zA-Z0-9_\\.-\\+]/is", "_", $str);
    return $str;
}
开发者ID:ASDAFF,项目名称:open_bx,代码行数:6,代码来源:fileman_spell_addWord.php


示例18: htmlspecialcharsbx

		<td width="60%">
			<input type="text" name="sectionname" value="<?echo htmlspecialcharsbx($f_SECTIONNAME)?>" size="50" maxlength="255">
		</td>
	</tr>
	<tr class="heading">
		<td colspan="2"><?echo GetMessage("FILEMAN_FOLDER_FILEPROPS")?></td>
	</tr>
	<tr>
		<td align="center" colspan="2">
			<table border="0" cellspacing="1" cellpadding="3" class="internal">
				<tr class="heading">
					<td align="center"><?echo GetMessage("FILEMAN_FOLDER_PROPSCODE")?></td>
					<td align="center"><?echo GetMessage("FILEMAN_FOLDER_PROPSVAL")?></td>
				</tr>
				<?
				$arPropTypes = CFileMan::GetPropstypes($site);

				if(is_array($arDirProperties))
				{
					foreach ($arDirProperties as $f_CODE => $f_VALUE)
					{
						$ind++;
						$oldind++;
						if($bInitVars)
						{
							$f_CODE = $_POST["CODE_".$oldind];
							$f_VALUE = $_POST["VALUE_".$oldind];
						}

						$bPredefinedProperty = False;
						if(is_set($arPropTypes, $f_CODE))
开发者ID:ASDAFF,项目名称:open_bx,代码行数:31,代码来源:fileman_folder.php


示例19: GetMessage

	}

	if($REQUEST_METHOD=="POST" && strlen($save)>0)
	{
		if(!check_freetrix_sessid())
		{
			$strWarning = GetMessage("FILEMAN_SESSION_EXPIRED");
			$bVarsFromForm = true;
		}

		// lpa was denied earlier, so use file src as is
		$filesrc_for_save = $_POST['filesrc'];

		if(strlen($strWarning) <= 0)
		{
			if (!CFileMan::CheckOnAllowedComponents($filesrc_for_save))
			{
				$str_err = $APPLICATION->GetException();
				if($str_err && ($err = $str_err ->GetString()))
					$strWarning .= $err;
				$bVarsFromForm = true;
			}
		}

		if(strlen($strWarning) <= 0)
		{
			$f = $io->GetFile($abs_path);
			$arUndoParams = array(
				'module' => 'fileman',
				'undoType' => 'edit_file',
				'undoHandler' => 'CFileman::UndoEditFile',
开发者ID:ASDAFF,项目名称:open_bx,代码行数:31,代码来源:file_edit_src.php


示例20: array

     $arEdTypes[] = array("code" => "iblock_admin", "editors" => array("PREVIEW_TEXT", "DETAIL_TEXT"), "title" => GetMessage("FILEMAN_EDITOR_TYPE_IBLOCK_ADMIN"), "public" => false);
 }
 if (IsModuleInstalled("subscribe")) {
     $arEdTypes[] = array("code" => "subscribe", "editors" => array(), "title" => GetMessage("FILEMAN_EDITOR_TYPE_SUBSCRIBE"), "public" => false);
 }
 if (IsModuleInstalled("learning")) {
     $arEdTypes[] = array("code" => "learning_public", "editors" => array(), "title" => GetMessage("FILEMAN_EDITOR_TYPE_LEARNING_PUBLIC"), "public" => true);
     $arEdTypes[] = array("code" => "learning_admin", "editors" => array(), "title" => GetMessage("FILEMAN_EDITOR_TYPE_LEARNING_ADMIN"), "public" => false);
 }
 if (IsModuleInstalled("form")) {
     $arEdTypes[] = array("code" => "form_edit", "editors" => array("FORM_TEMPLATE"), "title" => GetMessage("FILEMAN_EDITOR_TYPE_FORM"), "public" => false);
     $arEdTypes[] = array("code" => "form_edit_public", "editors" => array("FORM_TEMPLATE"), "title" => GetMessage("FILEMAN_EDITOR_TYPE_FORM_PUBLIC"), "public" => false);
 }
 $arCurConfig = array();
 for ($i = 0, $l = count($arEdTypes); $i < $l; $i++) {
     $arCurConfig[$arEdTypes[$i]['code']] = CFileMan::GetEditorToolbarConfig($arEdTypes[$i]['code']);
     // for ($j = 0, $n = count($arEdTypes[$i]['editors']); $j < $n; $j++)
     // {
     // $arJS = Array();
     // $arCSS = Array();
     // $events = GetModuleEvents("fileman", "OnBeforeHTMLEditorScriptsGet");
     // while($arEvent = $events->Fetch())
     // {
     // $tmp = ExecuteModuleEventEx($arEvent, array($arEdTypes[$i]['editors'][$j], array()));
     // if (!is_array($tmp))
     // continue;
     // if (is_array($tmp['JS']))
     // $arJS = array_merge($arJS, $tmp['JS']);
     // if (is_array($tmp['CSS']))
     // $arCSS = array_merge($arCSS, $tmp['CSS']);
     // }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:options.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP CFileman类代码示例发布时间:2022-05-23
下一篇:
PHP CFileInput类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap