public function exec() { try { if ($this->request->isPost()) { \CUtil::jSPostUnescape(); $this->request->addFilter(new PostDecodeFilter()); } $this->resolveAction(); $this->checkAction(); $this->checkRequiredModules(); if (!$this->prepareParams()) { $this->sendJsonErrorResponse(); } //todo create Event! if ($this->processBeforeAction($this->getAction()) !== false) { $this->runAction(); } } catch (\Exception $e) { $this->runProcessingException($e); } }
define('NO_AGENT_CHECK', true); define('DisableEventsCheck', true); define('FX_SECURITY_SHOW_MESSAGE', true); define("PUBLIC_AJAX_MODE", true); define("NOT_CHECK_PERMISSIONS", true); require_once($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/main/include/prolog_before.php"); require_once($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/iblock/admin_tools.php"); IncludeModuleLangFile(__FILE__); header('Content-Type: application/x-javascript; charset='.LANG_CHARSET); if(!CModule::includeModule("iblock") || !CModule::includeModule('fileman')) { die(); } CUtil::jSPostUnescape(); if (check_freetrix_sessid()) { if ($_REQUEST["ENTITY_TYPE"] === "B") { $ipropTemplates = new \Freetrix\Iblock\InheritedProperty\IblockTemplates($_REQUEST["ENTITY_ID"]); $arFields = array( "NAME" => $_POST["NAME"], "CODE" => $_POST["CODE"], "DESCRIPTION" => $_POST["DESCRIPTION"], ); } elseif ($_REQUEST["ENTITY_TYPE"] === "S") { $ipropTemplates = new \Freetrix\Iblock\InheritedProperty\SectionTemplates($_REQUEST["IBLOCK_ID"], $_REQUEST["ENTITY_ID"]); $arFields = array(