public static function PREVIEWMAILING($task) { $mailingid = JRequest::getVar('mailingid', '0'); $mailingid = $mailingid == 0 ? jNews_Mailing::getLastMailingId() : $mailingid; if ($GLOBALS[JNEWS . 'level'] > 1 && !jnews::isLocal()) { $bar = JToolBar::getInstance('toolbar'); $linkSpam = jNews_Tools::completeLink('option=' . JNEWS_OPTION . '&act=mailing&task=testspam&mailingid=' . $mailingid . '&tmpl=component', true, false, true); $html = '<a class="modal btn btn-small" href="' . $linkSpam . '" rel="{handler: \'iframe\', size: {x: 1050, y: 800}}" ><span style="float:left;"><img width=16 height=16 src="' . JNEWS_PATH_ADMIN_IMAGES2 . 'toolbar/block.png"></span><span style="float:left; margin-left:8px;">' . _JNEWS_MENU_SEND_TESTSPAM . '</span></a>'; $bar->appendButton('Custom', $html); JToolBarHelper::spacer(); } JToolBarHelper::custom('preview', 'mail.png', 'mail.png', _JNEWS_MENU_SEND_TEST, false); JToolBarHelper::spacer(); $listype = JRequest::getInt('listype', 0, 'request'); if ($listype == 1) { $bar = JToolBar::getInstance('toolbar'); $linkViewOnline = jNews_Tools::completeLink('option=' . JNEWS_OPTION . '&act=mailing&task=view&mailingid=' . $mailingid . '&format=raw', true, false, true); $bar->appendButton('Popup', 'preview', _JNEWS_VIEW_BROWSER, $linkViewOnline); JToolBarHelper::spacer(); $bar = JToolBar::getInstance('toolbar'); $linkBut = jNews_Tools::completeLink('option=' . JNEWS_OPTION . '&act=mailing&task=sendready&mailingid=' . $mailingid, true, false, true); $bar->appendButton('Popup', 'sendT', _JNEWS_MENU_SEND, $linkBut); JToolBarHelper::spacer(); } jNews_Menu::_editMailingPrev(); JToolBarHelper::spacer(); JToolBarHelper::custom('show', 'cancel.png', 'cancel.png', _JNEWS_MENU_CANCEL, false); JToolBarHelper::divider(); // jNews_Menu::_wizardBtn(); jNews_Menu::_cPanelBtn(); }