Exemplo n.º 1
0
    ?>
</b>
								<br>
								<br>
								%SENDER_LETTER_TEMPLATE_MESSAGE%
							</td>
						</tr>
					</table>
				</div>
			</div>
		</div>
	</div>
	<?php 
    return ob_get_clean();
}
$personalizeList = \Bitrix\Sender\MailingTable::getChainPersonalizeList($ID);
if ($_REQUEST["action"] == "get_vr" && check_bitrix_sessid()) {
    $letterTemplate = array('BODY' => getSenderItemContainer($ID), 'FIELDS' => array('MESSAGE' => \Bitrix\Sender\TemplateTable::initEditor(array('FIELD_NAME' => 'SENDER_LETTER_TEMPLATE_MESSAGE', 'FIELD_VALUE' => '', 'HAVE_USER_ACCESS' => !$isUserHavePhpAccess, 'SHOW_SAVE_TEMPLATE' => false, 'PERSONALIZE_LIST' => $personalizeList))));
    echo CUtil::PhpToJSObject($letterTemplate);
    exit;
}
if (!is_array($CHAIN)) {
    $CHAIN = array();
}
$mailingDb = \Bitrix\Sender\MailingTable::getList(array('select' => array('ID', 'NAME', 'EMAIL_FROM', 'ACTIVE', 'TRIGGER_FIELDS'), 'filter' => array('=IS_TRIGGER' => 'Y', '=ID' => $ID)));
if (!($mailing = $mailingDb->fetch())) {
    require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
    ShowError(\Bitrix\Main\Localization\Loc::getMessage("SENDER_MAILING_TRIG_ERROR_NOT_FOUND"));
    require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin.php";
    exit;
}