/** * This public static function is used for the view of sendReady for manual sending */ public static function sendReady($mailingId, $listId, $listType) { ?> <div id="manualsend"></div> <?php JHTML::_('behavior.modal'); $formLink3 = jNews_Tools::completeLink('option=' . JNEWS_OPTION . '&act=mailing&task=send', true, false, true); ?> <form class="modal" action="<?php echo $formLink3; ?> " method="post" name="adminForm" autocomplete="off" id="adminForm"> <div> <fieldset class="adminform"> <legend> <?php echo 'Sending Status'; ?> </legend> <?php $doc = JFactory::getDocument(); $doc->addStyleSheet(JNEWS_URL_ADMIN . 'cssadmin/jnews.css'); if (empty($mailingId) || $mailingId == 0) { $warning = 'Please select a newsletter to be sent.'; jnews::displayInfo($warning, 'warning'); return; } $queueCount = jNews_Queue::getQueueCount($mailingId); $new = false; $mailing = jNews_Mailing::getOneMailing('', $mailingId, '', $new); if (empty($queueCount)) { if (empty($listId)) { $listIds = jNews_Mailing::getMailingList($mailingId); } if (!empty($listIds)) { ?> <br/> <fieldset class="adminform"> <legend> <?php echo $mailing->subject . ' will be sent to '; ?> </legend> <br/> <table class="adminlist" cellspacing="1" align="center"> <tbody> <?php $listNames = jNews_Mailing::getMailingListName($listIds); foreach ($listNames as $key => $listName) { if (isset($listIds[$key])) { ?> <tr><td><?php echo $listName . ' ( ' . jNews_Subscribers::getSubscribersCount($listIds[$key], true, true, true) . ' subscribers ) '; ?> </td></tr> <?php } } ?> </tbody> </table> <br/> </fieldset> <?php } else { $warning = $mailing->subject . ' will be sent to none of the created Lists.'; jnews::displayInfo($warning, 'warning'); } } else { $info = 'There are ' . $queueCount . ' in the queue for the Newsletter ' . $mailing->subject . ' <br/>Do you want to continue sending this newsletter?'; jnews::displayInfo($info, 'info'); ?> <input type="hidden" name="totalsend" value="<?php echo $queueCount; ?> " /> <?php } ?> <br/> <input type="submit" value="<?php echo empty($queueCount) ? _JNEWS_MENU_SEND : _JNEWS_MENU_CONTINUE; ?> "> <input type="hidden" name="mailingid" value="<?php echo $mailingId; ?> " /> <input type="hidden" name="option" value="<?php echo JNEWS_OPTION; ?> " /> <input type="hidden" name="task" value="<?php echo empty($queueCount) ? 'send' : 'continuesend'; ?> " /> <input type="hidden" name="act" value="mailing" /> <?php if (version_compare(JVERSION, '3.0.0', '<')) { echo JHTML::_('form.token'); } else { echo JHtml::_('form.token'); } ?> </div> </form> <?php }