GetGroupRight($module_id); if ($bizprocPerms>="R") : CModule::IncludeModule("bizproc"); IncludeModuleLangFile($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/options.php"); IncludeModuleLangFile(__FILE__); $dbSites = CSite::GetList("", "", Array("ACTIVE" => "Y")); $arSites = array(); $aSubTabs = array(); while ($site = $dbSites->Fetch()) { $site["ID"] = htmlspecialcharsbx($site["ID"]); $site["NAME"] = htmlspecialcharsbx($site["NAME"]); $arSites[] = $site; $aSubTabs[] = array("DIV" => "opt_site_".$site["ID"], "TAB" => "(".$site["ID"].") ".$site["NAME"], 'TITLE' => ''); } $subTabControl = new CAdminViewTabControl("subTabControl", $aSubTabs); if ($REQUEST_METHOD == "GET" && !empty($RestoreDefaults) && $bizprocPerms == "W" && check_bitrix_sessid()) { COption::RemoveOption("bizproc"); } $arAllOptions = array( array("log_cleanup_days", GetMessage("BIZPROC_LOG_CLEANUP_DAYS"), "90", Array("text", 3)), array("log_skip_types", GetMessage("BIZPROC_LOG_SKIP_TYPES"), "1,2", Array("checkboxlist", array( 1 => GetMessage("BIZPROC_LOG_SKIP_TYPES_1_1"), 2 => GetMessage("BIZPROC_LOG_SKIP_TYPES_2_1"), ))), array("limit_simultaneous_processes", GetMessage("BIZPROC_LIMIT_SIMULTANEOUS_PROCESSES"), "", Array("text", 3)), array("employee_compatible_mode", GetMessage("BIZPROC_EMPLOYEE_COMPATIBLE_MODE"), "N", Array("checkbox")), // array("name_template", GetMessage("BIZPROC_NAME_TEMPLATE"), "", Array("select", 35)) ); $strWarning = ""; if ($REQUEST_METHOD == "POST" && $Update <> '' && $bizprocPerms == "W" && check_bitrix_sessid()) { COption::SetOptionString("bizproc", "log_cleanup_days", $log_cleanup_days); if ($log_cleanup_days > 0) CAgent::AddAgent("CBPTrackingService::ClearOldAgent();", "bizproc", "N", 86400); else CAgent::RemoveAgent("CBPTrackingService::ClearOldAgent();", "bizproc"); COption::SetOptionString("bizproc", "employee_compatible_mode", $employee_compatible_mode == "Y" ? "Y" : "N"); COption::SetOptionString("bizproc", "limit_simultaneous_processes", $limit_simultaneous_processes ? $limit_simultaneous_processes : 0); COption::SetOptionString("bizproc", "log_skip_types", $log_skip_types ? implode(',', $log_skip_types) : ""); \Bitrix\Main\Config\Option::set("bizproc", "use_gzip_compression", $_REQUEST["use_gzip_compression"]); \Bitrix\Main\Config\Option::set("bizproc", "locked_wi_path", $_REQUEST["locked_wi_path"]); CBPSchedulerService::setDelayMinLimit($_REQUEST["delay_min_limit"], $_REQUEST['delay_min_limit_type']); foreach($arSites as $site) { if (isset($_POST["name_template_".$site["LID"]])) { if (empty($_POST["name_template_".$site["LID"]])) COption::RemoveOption("bizproc", "name_template", $site["LID"]); else COption::SetOptionString("bizproc", "name_template", $_POST["name_template_".$site["LID"]], false, $site["LID"]); } } } if ($strWarning <> '') CAdminMessage::ShowMessage($strWarning); $aTabs = array( array("DIV" => "edit1", "TAB" => GetMessage("BIZPROC_TAB_SET"), "ICON" => "", "TITLE" => GetMessage("BIZPROC_TAB_SET_ALT")), ); $tabControl = new CAdminTabControl("tabControl", $aTabs); $tabControl->Begin(); ?>