($_GET['subdialog'] == 'Y'? 'subdialog':''))); if (IsModuleInstalled("fileman")) { if (!$USER->CanDoOperation('fileman_edit_existent_folders') && !$USER->CanDoOperation('fileman_admin_folders')) $popupWindow->ShowError(GetMessage("FOLDER_EDIT_ACCESS_DENIED")); } //Site ID $site = SITE_ID; if (isset($_REQUEST["site"]) && $_REQUEST["site"] <> '') { $obSite = CSite::GetByID($_REQUEST["site"]); if ($arSite = $obSite->Fetch()) $site = $_REQUEST["site"]; } $io = CBXVirtualIo::GetInstance(); //Folder path $path = ""; $documentRoot = CSite::GetSiteDocRoot($site); if (isset($_REQUEST["path"]) && $_REQUEST["path"] <> '') { $path = $io->CombinePath("/", $_REQUEST["path"]); //Find real folder while($path != "/" && !$io->DirectoryExists($documentRoot.$path)) { $position = mb_strrpos($path, "/"); if ($position === false) break; $path = mb_substr($path, 0, $position); } //Cut / from the end $path = rtrim($path, "/"); } if ($path == '' || !$io->DirectoryExists($documentRoot.$path)) $path = "/"; //Absolute path $absolutePath = $documentRoot.($path != "/" ? $path : ""); //Lang if (!isset($_REQUEST["lang"]) || $_REQUEST["lang"] == '') $lang = LANGUAGE_ID; //BackUrl $back_url = ($_REQUEST["back_url"] ?? ""); //Check permissions if(!$USER->CanDoFileOperation('fm_edit_existent_folder',Array($site, $path))) $popupWindow->ShowError(GetMessage("FOLDER_EDIT_ACCESS_DENIED")); $strWarning = ""; //Save folder settings if ($_SERVER["REQUEST_METHOD"] == "POST" && !check_bitrix_sessid()) { CUtil::JSPostUnescape(); $strWarning = GetMessage("MAIN_SESSION_EXPIRED"); } elseif ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_REQUEST["save"])) { CUtil::JSPostUnescape(); $bNeedSectionFile = false; $strSectionName = ""; if (isset($_POST["sSectionName"]) && $_POST["sSectionName"] <> '') { $strSectionName = "\$sSectionName = \"".EscapePHPString($_POST["sSectionName"])."\";\n"; $bNeedSectionFile = true; } $strDirProperties = "\$arDirProperties = Array(\n"; if (isset($_POST["PROPERTY"]) && is_array($_POST["PROPERTY"])) { $bNeedComma = false; foreach ($_POST["PROPERTY"] as $arProperty) { $arProperty["CODE"] = (isset($arProperty["CODE"]) ? trim($arProperty["CODE"]) : ""); $arProperty["VALUE"] = (isset($arProperty["VALUE"]) ? trim($arProperty["VALUE"]) : ""); if ($arProperty["VALUE"] <> '' && preg_match("/[a-zA-Z_-~]+/i", $arProperty["CODE"]) ) { if($bNeedComma) $strDirProperties .= ",\n"; $strDirProperties .= " \"".EscapePHPString($arProperty["CODE"])."\" => \"".EscapePHPString($arProperty["VALUE"])."\""; $bNeedComma = true; $bNeedSectionFile = true; } } } $strDirProperties .= "\n);\n"; $f = $io->GetFile($documentRoot.$path."/.section.php"); $arUndoParams = array( 'module' => 'fileman', 'undoType' => 'edit_section', 'undoHandler' => 'CFileman::UndoEditFile', 'arContent' => array( 'absPath' => $documentRoot.$path."/.section.php", 'content' => $f->GetContents() ) ); //Save or delete data file if($bNeedSectionFile) { $APPLICATION->SaveFileContent($absolutePath."/.section.php", "<"."?\n".$strSectionName.$strDirProperties."?".">"); $module_id = "fileman"; if(COption::GetOptionString($module_id, "log_page", "Y")=="Y") { $res_log['path'] = mb_substr($path, 1); CEventLog::Log( "content", "SECTION_EDIT", "main", "", serialize($res_log) ); } } else $io->Delete($documentRoot.$path."/.section.php"); if ($e = $APPLICATION->GetException()) { $strWarning = $e->msg; } else { CUndo::ShowUndoMessage(CUndo::Add($arUndoParams)); if (isset($_GET['subdialog']) && $_GET['subdialog'] == 'Y') echo ""; $popupWindow->Close($bReload=($_GET['subdialog'] <> 'Y'), $back_url); die(); } } //Properties from fileman settings $arFilemanProperties = Array(); if (CModule::IncludeModule("fileman") && is_callable(Array("CFileMan", "GetPropstypes"))) $arFilemanProperties = CFileMan::GetPropstypes($site); //Properties from current .section.php $arDirProperties = Array(); if ($strWarning != "") { //Restore post values if error occured $sSectionName = (isset($_POST["sSectionName"]) && $_POST["sSectionName"] <> '' ? $_POST["sSectionName"] : ""); if (isset($_POST["PROPERTY"]) && is_array($_POST["PROPERTY"])) { foreach ($_POST["PROPERTY"] as $arProperty) { if (isset($arProperty["VALUE"]) && $arProperty["VALUE"] <> '') $arDirProperties[$arProperty["CODE"]] = $arProperty["VALUE"]; } } } else { $sSectionName = ""; if($io->FileExists($absolutePath."/.section.php")) include($io->GetPhysicalName($absolutePath."/.section.php")); } $arInheritProperties = $APPLICATION->GetDirPropertyList(Array($site, $path)); //All properties for folder. Includes properties from root folders if ($arInheritProperties === false) $arInheritProperties = Array(); $arGlobalProperties = Array(); foreach ($arFilemanProperties as $propertyCode => $propertyDesc) { if (array_key_exists($propertyCode, $arDirProperties)) $arGlobalProperties[$propertyCode] = $arDirProperties[$propertyCode]; else $arGlobalProperties[$propertyCode] = ""; unset($arDirProperties[$propertyCode]); unset($arInheritProperties[mb_strtoupper($propertyCode)]); } foreach ($arDirProperties as $propertyCode => $propertyValue) unset($arInheritProperties[mb_strtoupper($propertyCode)]); $popupWindow->ShowTitlebar(GetMessage('FOLDER_EDIT_WINDOW_TITLE')); $popupWindow->StartDescription("bx-property-folder"); if($strWarning != "") $popupWindow->ShowValidationError($strWarning); ?>


Fatal error: Uncaught Error: Call to undefined function GetMessage() in D:\ktt\ttepla.com\public_html\bitrix\modules\main\public\folder_edit.php:210 Stack trace: #0 {main} thrown in D:\ktt\ttepla.com\public_html\bitrix\modules\main\public\folder_edit.php on line 210