} //check template name $sTemplateName = ""; foreach ($arComponentTemplates as $templ) { if ($templ["NAME"] == $_POST["NEW_COMPONENT_TEMPLATE"]) { $sTemplateName = $templ["NAME"]; break; } } $code = ($arComponent["DATA"]["VARIABLE"] ? $arComponent["DATA"]["VARIABLE"] . "=" : "") . "\$APPLICATION->IncludeComponent(\"" . $arComponent["DATA"]["COMPONENT_NAME"] . "\", " . "\"" . $sTemplateName . "\", " . "array(\n\t" . PHPParser::ReturnPHPStr2($aPostValues) . "\n\t)" . ",\n\t" . (strlen($arComponent["DATA"]["PARENT_COMP"]) > 0 ? $arComponent["DATA"]["PARENT_COMP"] : "false") . (!empty($arComponent["DATA"]["FUNCTION_PARAMS"]) ? ",\n\t" . "array(\n\t" . PHPParser::ReturnPHPStr2($arComponent["DATA"]["FUNCTION_PARAMS"]) . "\n\t)" : "") . "\n);"; $filesrc_for_save = substr($filesrc, 0, $arComponent["START"]) . $code . substr($filesrc, $arComponent["END"]); $f = $io->GetFile($abs_path); $arUndoParams = array('module' => 'fileman', 'undoType' => 'edit_component_props', 'undoHandler' => 'CFileman::UndoEditFile', 'arContent' => array('absPath' => $abs_path, 'content' => $f->GetContents())); if ($APPLICATION->SaveFileContent($abs_path, $filesrc_for_save)) { CUndo::ShowUndoMessage(CUndo::Add($arUndoParams)); $obJSPopup->Close(); } else { $strWarning .= GetMessage("comp_prop_err_save") . "<br>"; } } } } $componentPath = CComponentEngine::MakeComponentPath($_GET["component_name"]); $arComponentDescription["ICON"] = ltrim($arComponentDescription["ICON"], "/"); $localPath = getLocalPath("components" . $componentPath); if ($localPath !== false && $arComponentDescription["ICON"] != "" && $io->FileExists($io->RelativeToAbsolutePath($localPath . "/" . $arComponentDescription["ICON"]))) { $sIcon = $localPath . "/" . $arComponentDescription["ICON"]; } else { $sIcon = "/bitrix/images/fileman/htmledit2/component.gif"; } $obJSPopup->StartDescription($sIcon);
&edit_new_file_undo=<?php echo $ID; ?> ", height: 470, width: 780, resizable: true, min_width: 780, min_height: 400 })).Show(); </script> <?php } else { if ($_GET['subdialog'] == 'Y') { echo "<script>structReload('" . urlencode($pathToEdit) . "');</script>"; $popupWindow->Close(false); } else { $popupWindow->Close(true, $relativePath); } } die; } } //Properties from fileman settings $arFilemanProperties = array(); if (CModule::IncludeModule("fileman") && is_callable(array("CFileMan", "GetPropstypes"))) { $arFilemanProperties = CFileMan::GetPropstypes($site); } //Properties from page $arDirProperties = array(); if ($strWarning != "" && isset($_POST["PROPERTY"]) && is_array($_POST["PROPERTY"])) {
$_REQUEST["UF_USE_BP"] = $_REQUEST["UF_USE_BP"] == "Y" ? "Y" : "N"; $_REQUEST["UF_USE_EXT_SERVICES"] = CWebDavIblock::resolveDefaultUseExtServices($_REQUEST["UF_USE_EXT_SERVICES"]); if ($_REQUEST["UF_USE_BP"] != $arLibrary["UF_USE_BP"] || $_REQUEST["UF_USE_EXT_SERVICES"] != $arLibrary['UF_USE_EXT_SERVICES']) { if (!isset($arLibrary["~UF_USE_BP"])) { __wd_check_uf_use_bp_property($arParams["IBLOCK_ID"]); } if (!isset($arLibrary["~UF_USE_EXT_SERVICES"])) { CWebDavIblock::checkUfUseExtServices((int) $arParams["IBLOCK_ID"]); } $arFields = array("IBLOCK_ID" => $arParams["IBLOCK_ID"], "UF_USE_BP" => $_REQUEST["UF_USE_BP"], "UF_USE_EXT_SERVICES" => $_REQUEST["UF_USE_EXT_SERVICES"]); $GLOBALS["UF_USE_BP"] = $arFields["UF_USE_BP"]; $GLOBALS["USER_FIELD_MANAGER"]->EditFormAddFields("IBLOCK_" . $arParams["IBLOCK_ID"] . "_SECTION", $arFields); $bs = new CIBlockSection(); $res = $bs->Update($arLibrary["ID"], $arFields); } $popupWindow->Close($bReload = true, $_REQUEST["back_url"]); die; } //HTML output $popupWindow->ShowTitlebar(GetMessage("SN_TITLE")); $popupWindow->StartDescription("bx-access-folder"); if (isset($strWarning) && $strWarning != "") { $popupWindow->ShowValidationError($strWarning); } ?> <p><b><?php echo GetMessage("SN_TITLE_TITLE"); ?> </b></p>
$permLetter = "T_".$taskID; $arSavePermission[$groupID] = $permLetter; } } $APPLICATION->SetFileAccessPermission(array($site, $path), $arSavePermission); if ($e = $APPLICATION->GetException()) $strWarning = $e->msg; } //Close window if ($strWarning == "") { $popupWindow->Close($bReload=($_GET['subdialog'] <> 'Y'), $back_url); die(); } } echo CJSCore::Init(array('access'), true); //HTML output if ($isFolder) $popupWindow->ShowTitlebar(GetMessage("EDIT_ACCESS_TO_FOLDER")); else $popupWindow->ShowTitlebar(GetMessage("EDIT_ACCESS_TO_FILE")); $popupWindow->StartDescription($isFolder ? "bx-access-folder" : "bx-access-page"); if ($strWarning != "")
if (($arTask = $obTask->Fetch()) && $arTask["LETTER"] && $arTask["SYS"] == "Y") { $permLetter = $arTask["LETTER"]; } else { $permLetter = "T_" . $taskID; } $arSavePermission[$groupID] = $permLetter; } } $APPLICATION->SetFileAccessPermission(array($site, $path), $arSavePermission); if ($e = $APPLICATION->GetException()) { $strWarning = $e->msg; } } //Close window if ($strWarning == "") { $popupWindow->Close($bReload = $_GET['subdialog'] != 'Y', $back_url); die; } } echo CJSCore::Init(array('access'), true); //HTML output if ($isFolder) { $popupWindow->ShowTitlebar(GetMessage("EDIT_ACCESS_TO_FOLDER")); } else { $popupWindow->ShowTitlebar(GetMessage("EDIT_ACCESS_TO_FILE")); } $popupWindow->StartDescription($isFolder ? "bx-access-folder" : "bx-access-page"); if ($strWarning != "") { $popupWindow->ShowValidationError($strWarning); } ?>
if (empty($aMsg)) { $path = $arParams["CONVERT"] && $_REQUEST["AJAX_CALL"] != "Y" && SITE_CHARSET != "UTF-8" && $_REQUEST["popupWindow"] != "Y" ? $APPLICATION->ConvertCharset($path, SITE_CHARSET, "UTF-8") : $path; $url = str_replace("//", "", CComponentEngine::MakePathFromTemplate($arParams["~SECTION_EDIT_URL"], array("PATH" => $path, "ACTION" => "EDIT"))); if (empty($_REQUEST["apply"])) { $arNavChain = explode("/", $path); array_pop($arNavChain); $url = CComponentEngine::MakePathFromTemplate($arParams["~SECTIONS_URL"], array("PATH" => implode("/", $arNavChain))); if ($arParams['ACTION'] == "DROP") { $url = WDAddPageParams($url, array("result" => $arParams["SECTION_ID"] == $ob->GetMetaID('TRASH') ? "empty_trash" : "section_deleted")); } } if ($_REQUEST["popupWindow"] == "Y") { $GLOBALS['APPLICATION']->RestartBuffer(); require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_before.php"; $popupWindow = new CJSPopup('', ''); $popupWindow->Close($bReload = true, !empty($_REQUEST["back_url"]) ? $_REQUEST["back_url"] : $url); die; } elseif ($_REQUEST["AJAX_CALL"] != "Y" || !empty($_REQUEST["bxajaxid"])) { LocalRedirect($url); } else { $APPLICATION->RestartBuffer(); echo CUtil::PhpToJSObject(array("result" => strToLower($arParams["ACTION"] . "ed"), "url" => $url)); die; } } else { $bVarsFromForm = true; $e = new CAdminException($aMsg); $GLOBALS["APPLICATION"]->ThrowException($e); $oError = $GLOBALS["APPLICATION"]->GetException(); if ($oError) { $arResult["ERROR_MESSAGE"] = $oError->GetString();
$obJSPopup->StartDescription('bx-core-edit-menu'); $obJSPopup->StartContent(); $form = new \Hotpin\Lang\Form(); $arLangsFiles = $form->getRequestLangFiles(); $arIncLang = $form->getIncMessages(); $arRequestLang = $form->getRequestLang(); if (is_array($arRequestLang) && !empty($arRequestLang)) { $form->prepareRequestLang(); $arError = $form->getError(); if (!count($arError)) { $obJSPopup->Close(true, ""); die(); } else { $obJSPopup->ShowValidationError(implode("<br>", $arError)); } } if (count($arIncLang)) { ?> <table class="bx-width100" id="bx_folder_properties"> <input type="hidden" name="arLangFiles" value='<?php echo addslashes(serialize($arLangsFiles)); ?>