Example #1
0
        echo $ID;
        ?>
&action=send_error&lang=<?php 
        echo LANGUAGE_ID;
        ?>
'"
								title="<?php 
        echo GetMessage("sender_chain_edit_btn_send_err_desc");
        ?>
" />
							<?php 
    }
}
if ($ID > 0) {
    if (in_array($str_STATUS, array(\Bitrix\Sender\MailingChainTable::STATUS_SEND, \Bitrix\Sender\MailingChainTable::STATUS_PAUSE))) {
        echo '<span class="sender-mailing-status-creator" style="margin-left: 30px;">(' . GetMessage("sender_chain_edit_btn_send_stat_prcnt") . ': ' . \Bitrix\Sender\PostingTable::getSendPercent($str_POSTING_ID) . '%)</span>';
    }
}
?>
				</span>
			</div>
		</td>
	</tr>
	<?php 
if ($ID > 0 || $ID <= 0) {
    ?>
	<tr class="adm-detail-required-field">
		<td colspan="2">
			<br>
			<?php 
    $arEmailFromList = \Bitrix\Sender\MailingChainTable::getEmailToMeList();
Example #2
0
    }
}
$groupListDb = \Bitrix\Sender\MailingChainTable::getList(array('select' => array('ID', 'MAILING_ID', 'POSTING_ID', 'CREATED_BY', 'STATUS', 'REITERATE', 'LAST_EXECUTED', 'EMAIL_FROM', 'AUTO_SEND_TIME', 'DAYS_OF_MONTH', 'DAYS_OF_WEEK', 'TIMES_OF_DAY', 'NAME' => 'SUBJECT'), 'filter' => $arFilter, 'order' => array($by => $order)));
$rsData = new CAdminResult($groupListDb, $sTableID);
$rsData->NavStart();
$lAdmin->NavText($rsData->GetNavPrint(GetMessage("sender_mailing_chain_adm_nav")));
$lAdmin->AddHeaders(array(array("id" => "ID", "content" => "ID", "sort" => "ID", "align" => "right", "default" => true), array("id" => "NAME", "content" => GetMessage("sender_mailing_chain_adm_field_name"), "sort" => "NAME", "default" => true), array("id" => "CREATED_BY", "content" => GetMessage("sender_mailing_chain_adm_field_created_by"), "sort" => "CREATED_BY", "default" => true), array("id" => "STATUS", "content" => GetMessage("sender_mailing_chain_adm_field_status"), "sort" => "STATUS", "default" => true), array("id" => "EMAIL_FROM", "content" => GetMessage("sender_mailing_chain_adm_field_email_from"), "sort" => "EMAIL_FROM", "default" => false), array("id" => "REITERATE", "content" => GetMessage("sender_mailing_chain_adm_field_reiterate"), "sort" => "REITERATE", "default" => false), array("id" => "AUTO_SEND_TIME", "content" => GetMessage("sender_mailing_chain_adm_field_auto_send_time"), "sort" => "AUTO_SEND_TIME", "default" => false)));
while ($arRes = $rsData->NavNext(true, "f_")) {
    $row =& $lAdmin->AddRow($f_ID, $arRes);
    $row->AddViewField("NAME", '<a href="/bitrix/admin/sender_mailing_chain_edit.php?MAILING_ID=' . $MAILING_ID . '&ID=' . $f_ID . '&amp;lang=' . LANG . '">' . $f_NAME . '</a>');
    $arUser = \Bitrix\Main\UserTable::getRowById(intval($f_CREATED_BY));
    $row->AddViewField("CREATED_BY", '<a href="/bitrix/admin/user_edit.php?lang=' . LANGUAGE_ID . '&ID=' . $f_CREATED_BY . '">' . htmlspecialcharsbx($arUser['NAME'] . " " . $arUser['LAST_NAME']) . "</a>");
    $arStatus = MailingChainTable::getStatusList();
    $statusPercent = '';
    if (in_array($f_STATUS, array(MailingChainTable::STATUS_SEND, MailingChainTable::STATUS_PAUSE))) {
        $statusPercent = '<br>' . '<span style="font-size: 12px; color: #C2C2C2;">' . GetMessage("sender_mailing_chain_adm_action_stat") . ': ' . PostingTable::getSendPercent($f_POSTING_ID) . '%' . '</span>';
    }
    $row->AddViewField("STATUS", $arStatus[$f_STATUS] . ' ' . $statusPercent);
    $row->AddViewField("REITERATE", $f_REITERATE == 'Y' ? GetMessage("MAIN_YES") : GetMessage("MAIN_NO"));
    $arActions = array();
    $arActions[] = array("ICON" => "edit", "DEFAULT" => true, "TEXT" => GetMessage("sender_mailing_chain_adm_action_edit"), "ACTION" => $lAdmin->ActionRedirect("sender_mailing_chain_edit.php?MAILING_ID=" . $MAILING_ID . "&ID=" . $f_ID));
    if ($POST_RIGHT >= "W") {
        $arActions[] = array("ICON" => "delete", "TEXT" => GetMessage("sender_mailing_chain_adm_action_delete"), "ACTION" => "if(confirm('" . GetMessage('sender_mailing_chain_adm_action_delete_confirm') . "')) " . $lAdmin->ActionDoGroup($f_ID, "delete", "MAILING_ID=" . $MAILING_ID));
    }
    $arActions[] = array("SEPARATOR" => true);
    switch ($f_STATUS) {
        case MailingChainTable::STATUS_NEW:
            if ($POST_RIGHT >= "W") {
                $arActions[] = array("ICON" => "", "DEFAULT" => false, "TEXT" => GetMessage("sender_mailing_chain_adm_action_send"), "ACTION" => $lAdmin->ActionRedirect("/bitrix/admin/sender_mailing_chain_admin.php?MAILING_ID=" . $MAILING_ID . "&ID=" . $f_ID . "&action=send&lang=" . LANGUAGE_ID));
            }
            break;