Exemple #1
0
            LocalRedirect('sender_mailing_wizard.php?IS_TRIGGER=N&step=' . $step . '&MAILING_ID=' . $MAILING_ID . "&MAILING_CHAIN_ID=" . $MAILING_CHAIN_ID . "&lang=" . LANGUAGE_ID);
        } else {
            $DB->InitTableVarsForEdit("b_sender_mailing_chain", "", "str_");
        }
    } else {
    }
    $arMailngChainAttachment = array();
    if ($ID > 0) {
        $attachmentFileDb = \Bitrix\Sender\MailingAttachmentTable::getList(array('select' => array('FILE_ID'), 'filter' => array('CHAIN_ID' => $ID)));
        while ($ar = $attachmentFileDb->fetch()) {
            if ($arFileFetch = CFile::GetFileArray($ar['FILE_ID'])) {
                $arMailngChainAttachment[] = $arFileFetch;
            }
        }
    }
    \Bitrix\Sender\PostingRecipientTable::setPersonalizeList(\Bitrix\Sender\MailingTable::getPersonalizeList($MAILING_ID));
    $templateListHtml = \Bitrix\Sender\Preset\Template::getTemplateListHtml('tabControl_layout');
}
if ($step == 'chain_send_type') {
    $ID = $MAILING_CHAIN_ID;
    IncludeModuleLangFile(dirname(__FILE__) . "/mailing_chain_edit.php");
    $DAYS_OF_WEEK = empty($DAYS_OF_WEEK) ? '' : implode(',', $DAYS_OF_WEEK);
    if ($REQUEST_METHOD == "POST" && !$isPostedFormProcessed && check_bitrix_sessid()) {
        $arFields = array("REITERATE" => "N", "AUTO_SEND_TIME" => "", "DAYS_OF_WEEK" => "", "DAYS_OF_MONTH" => "", "TIMES_OF_DAY" => "");
        switch ($SEND_TYPE) {
            case 'MANUAL':
                break;
            case 'TIME':
                if (empty($AUTO_SEND_TIME)) {
                    $arError[] = GetMessage("sender_chain_edit_error_empty_time");
                }