} return true; } //2 wizards: create page and create section $createNewFolder = isset($_REQUEST["newFolder"]) && $_REQUEST["newFolder"] == "Y"; if ($createNewFolder) { IncludeModuleLangFile($_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/public/folder_new.php"); } else { IncludeModuleLangFile(__FILE__); } $popupWindow = new CJSPopup(GetMessage("PAGE_NEW_WINDOW_TITLE"), array("SUFFIX" => $_GET['subdialog'] == 'Y' ? 'subdialog' : '')); //Check fileman permissions $canEditNewPage = true; if (IsModuleInstalled("fileman")) { if ($createNewFolder && (!$USER->CanDoOperation("fileman_admin_folders") || !$USER->CanDoOperation("fileman_admin_files"))) { $popupWindow->ShowError(GetMessage("PAGE_NEW_ACCESS_DENIED")); } elseif (!$USER->CanDoOperation("fileman_admin_files")) { $popupWindow->ShowError(GetMessage("PAGE_NEW_ACCESS_DENIED")); } if (!$USER->CanDoOperation("fileman_edit_existent_files")) { $canEditNewPage = false; } } $io = CBXVirtualIo::GetInstance(); //Page path $path = "/"; if (isset($_REQUEST["path"]) && strlen($_REQUEST["path"]) > 0) { $path = $io->CombinePath("/", $_REQUEST["path"]); } $documentRoot = CSite::GetSiteDocRoot($site); //Site ID
} require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php"; require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/interface/admin_lib.php"; $dir = str_replace(array("\\", "//"), "/", dirname(__FILE__)); $dirs = explode("/", $dir); array_pop($dirs); $file = trim(implode("/", $dirs) . "/lang/" . LANGUAGE_ID . "/include/webdav_settings.php"); __IncludeLang($file); $documentType = explode("_", $_REQUEST["DOCUMENT_ID"]); $arParams = array(); $arParams["IBLOCK_ID"] = $IBLOCK_ID = intval($documentType[1]); $object = trim($documentType[2]); $object_id = intval($documentType[3]); $popupWindow = new CJSPopup('', ''); if (!CModule::IncludeModule("iblock")) { $popupWindow->ShowError(GetMessage("SONET_IB_MODULE_IS_NOT_INSTALLED")); } elseif (!CModule::IncludeModule("webdav")) { $popupWindow->ShowError(GetMessage("SONET_WD_MODULE_IS_NOT_INSTALLED")); } elseif ($IBLOCK_ID <= 0) { $popupWindow->ShowError(GetMessage("SONET_IBLOCK_ID_EMPTY")); } elseif ($object_id <= 0 && ($object != "user" && $object != "group")) { $popupWindow->ShowError(GetMessage("SONET_GROUP_NOT_EXISTS")); } $res = CIBlockWebdavSocnet::GetUserMaxPermission($object, $object_id, $USER->GetID(), $IBLOCK_ID); $arParams["PERMISSION"] = $res["PERMISSION"]; $arParams["CHECK_CREATOR"] = $res["CHECK_CREATOR"]; if ($arParams["PERMISSION"] < "W" || $arParams["CHECK_CREATOR"] == "Y") { $popupWindow->ShowError(GetMessage("SONET_ACCESS_DENIED")); } $arFilter = array("IBLOCK_ID" => $arParams["IBLOCK_ID"], "SOCNET_GROUP_ID" => false, "CHECK_PERMISSIONS" => "N", "SECTION_ID" => 0); if ($object == "user") {
} require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php"; require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/interface/admin_lib.php"; $dir = str_replace(array("\\", "//"), "/", dirname(__FILE__)); $dirs = explode("/", $dir); array_pop($dirs); $file = trim(implode("/", $dirs) . "/lang/" . LANGUAGE_ID . "/include/webdav_settings.php"); __IncludeLang($file); $documentType = explode("_", $_REQUEST["DOCUMENT_ID"]); $arParams = array(); $arParams["IBLOCK_ID"] = $IBLOCK_ID = intval($documentType[1]); $object = trim($documentType[2]); $object_id = intval($documentType[3]); $popupWindow = new CJSPopup('', ''); if (!CModule::IncludeModule("iblock")) { $popupWindow->ShowError(GetMessage("SONET_IB_MODULE_IS_NOT_INSTALLED")); } elseif (!CModule::IncludeModule("webdav")) { $popupWindow->ShowError(GetMessage("SONET_WD_MODULE_IS_NOT_INSTALLED")); } elseif ($IBLOCK_ID <= 0) { $popupWindow->ShowError(GetMessage("SONET_IBLOCK_ID_EMPTY")); } elseif ($object_id <= 0 && ($object != "user" && $object != "group")) { $popupWindow->ShowError(GetMessage("SONET_GROUP_NOT_EXISTS")); } $res = CIBlockWebdavSocnet::GetUserMaxPermission($object, $object_id, $USER->GetID(), $IBLOCK_ID); $arParams["PERMISSION"] = $res["PERMISSION"]; $arParams["CHECK_CREATOR"] = $res["CHECK_CREATOR"]; if ($arParams["PERMISSION"] < "W" || $arParams["CHECK_CREATOR"] == "Y") { $popupWindow->ShowError($object == "user" ? GetMessage("SONET_USER_FILES_ACCESS_DENIED") : GetMessage("SONET_GROUP_FILES_ACCESS_DENIED")); } $arFilter = array("IBLOCK_ID" => $arParams["IBLOCK_ID"], "SOCNET_GROUP_ID" => false, "CHECK_PERMISSIONS" => "N", "SECTION_ID" => 0); if ($object == "user") {
<? require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_before.php"); require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_js.php"); IncludeModuleLangFile($_SERVER["DOCUMENT_ROOT"].BX_ROOT."/modules/main/admin/task_description.php"); IncludeModuleLangFile(__FILE__); $popupWindow = new CJSPopup('', array("SUFFIX"=>($_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")); } $io = CBXVirtualIo::GetInstance(); //Folder path $path = "/"; if (isset($_REQUEST["path"]) && strlen($_REQUEST["path"]) > 0) $path = $io->CombinePath("/", $_REQUEST["path"]); //Site ID $site = SITE_ID; if (isset($_REQUEST["site"]) && strlen($_REQUEST["site"]) > 0) { $obSite = CSite::GetByID($_REQUEST["site"]); if ($arSite = $obSite->Fetch()) $site = $_REQUEST["site"]; }
} return $ar; } else { return $item; } } $_POST = BPasDecodeArrayKeys($_POST); } $activityName = $_REQUEST['id']; $activityType = $_REQUEST['activity']; $document_type = $_POST['document_type']; $currentSiteId = $_REQUEST['current_site_id']; $popupWindow->StartDescription("bx-edit-settings"); $canWrite = CBPDocument::CanUserOperateDocumentType(CBPCanUserOperateOperation::CreateWorkflow, $GLOBALS["USER"]->GetID(), array(MODULE_ID, ENTITY, $document_type)); if (!$canWrite) { $popupWindow->ShowError(GetMessage("ACCESS_DENIED")); die; } $runtime = CBPRuntime::GetRuntime(); $runtime->StartRuntime(); $arActivityDescription = $runtime->GetActivityDescription($activityType); if ($arActivityDescription == null) { die("Bad activity type!" . htmlspecialcharsbx($activityType)); } if ($arActivityDescription["DESCRIPTION"]) { echo htmlspecialcharsbx($arActivityDescription["DESCRIPTION"]); } else { echo GetMessage("BIZPROC_AS_DESC"); } $runtime->IncludeActivityFile($activityType); $popupWindow->EndDescription();
<? require($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/main/include/prolog_admin_before.php"); IncludeModuleLangFile(__FILE__); $popupWindow = new CJSPopup(GetMessage('FOLDER_EDIT_WINDOW_TITLE'), array("SUFFIX"=>($_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"]) && strlen($_REQUEST["site"]) > 0) { $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"]) && strlen($_REQUEST["path"]) > 0) { $path = $io->CombinePath("/", $_REQUEST["path"]);
* @global CUser $USER * @global CMain $APPLICATION */ require($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/main/include/prolog_admin_before.php"); require($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/main/include/prolog_admin_js.php"); if(CModule::IncludeModule("compression")) CCompress::Disable2048Spaces(); IncludeModuleLangFile(__FILE__); $obJSPopup = new CJSPopup(GetMessage("pub_struct_title")); if(!$USER->CanDoOperation('fileman_view_file_structure') || !$USER->CanDoFileOperation('fm_edit_existent_folder', array(SITE_ID, "/"))) $obJSPopup->ShowError(GetMessage("ACCESS_DENIED")); function __struct_file_sort($a, $b) { if($a["type"] == "D" && $b["type"] == "F") return -1; elseif($a["type"] == "F" && $b["type"] == "D") return 1; else { $name1 = ($a["name"] <> ''? $a["name"] : $a["file"]); $name2 = ($b["name"] <> ''? $b["name"] : $b["file"]); return strcmp(strtoupper($name1), strtoupper($name2)); } }
<?php #require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_before.php"); require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php"; require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/interface/admin_lib.php"; $file = trim(preg_replace("'[\\\\/]+'", "/", dirname(__FILE__) . "/lang/" . LANGUAGE_ID . "/iblock_settings.php")); __IncludeLang($file); $iblock_id = intval($_REQUEST["IBLOCK_ID"]); $popupWindow = new CJSPopup('', ''); if (!CModule::IncludeModule("iblock")) { return false; } elseif (!CModule::IncludeModule("webdav")) { return false; } elseif ($iblock_id <= 0) { $popupWindow->ShowError(GetMessage("WD_IBLOCK_ID_EMPTY")); } $ob = new CWebDavIblock($iblock_id, '/'); if ($ob->e_rights) { $permission = $ob->GetPermission('IBLOCK', $iblock_id); } else { $permission = CIBlock::GetPermission($iblock_id); } $arIBlock = CIBlock::GetArrayByID($iblock_id); if ($ob->CheckRight($permission, 'iblock_rights_edit') < "X" && !$GLOBALS['USER']->CanDoOperation('webdav_change_settings')) { $popupWindow->ShowError(GetMessage("WD_ACCESS_DENIED")); } $bWorkflow = CModule::IncludeModule("workflow"); $bBizproc = CModule::IncludeModule("bizproc"); /******************************************************************** Actions ********************************************************************/