define("ADMIN_MODULE_NAME", "sender"); require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_before.php"); if(!\Bitrix\Main\Loader::includeModule("sender")) ShowError(\Bitrix\Main\Localization\Loc::getMessage("MAIN_MODULE_NOT_INSTALLED")); IncludeModuleLangFile(__FILE__); $POST_RIGHT = $APPLICATION->GetGroupRight("sender"); if($POST_RIGHT=="D") $APPLICATION->AuthForm(GetMessage("ACCESS_DENIED")); $isUserHavePhpAccess = $USER->CanDoOperation('edit_php'); $aTabs = array( array("DIV" => "edit1", "TAB" => GetMessage("sender_chain_edit_tab_main"), "ICON"=>"main_user_edit", "TITLE"=>GetMessage("sender_chain_edit_tab_main_title")), array("DIV" => "edit2", "TAB" => GetMessage("sender_chain_edit_tab_message"), "ICON"=>"main_user_edit", "TITLE"=>GetMessage("sender_chain_edit_tab_message_title")), ); $tabControl = new CAdminTabControl("tabControl", $aTabs); $ID = intval($_REQUEST['ID']); // Id of the edited record $message = null; $bVarsFromForm = false; function getSenderItemContainer($id, array $chain = array()) { $i = '%SENDER_LETTER_TEMPLATE_BODY_NUM%'; ob_start(); ?>