public static function showMailingQueue($mailingq = null, $lists = null, $form, $start, $limit, $mailingsearch, $setLimit = null, $setSort = null) { $listId = null; ?> <script language="javascript" type="text/javascript"> <!-- function jnewsselectall(){ var i = 0; allcheck = document.getElementById("selectallcheck"); if(allcheck.checked) checkedvalue = 1; else checkedvalue = 0; while(myelement = document.getElementById("cid["+i+"]")){ myelement.checked = checkedvalue; i++; } if(checkedvalue){ document.getElementById("boxcount").value = i; }else{ document.getElementById("boxcount").value = 0; } } //--> </script> <?php if (empty($mailingq)) { echo '<center>' . jnews::printYN(true, _JNEWS_Q_M1, _JNEWS_ERROR) . '</center>'; } if ($listId == 0) { $message = _JNEWS_MESSAGE_QUEUE; } else { $lt_name = jNews_Lists::getLists($listId, 0, null, '', false, false, true, false, false, ''); $message = _JNEWS_SUSCRIB_LIST_UNIQUE . "<span style='color: rgb(51, 51, 51);'>" . @$lt_name[0]->list_name . "</span>"; } if (!isset($action)) { $action = JRequest::getVar('act', '', '', 'WORD'); } $mySepList = array(); $mySepList[0] = new stdClass(); $mySepList[0]->subject = 'All Mailings'; $mySepList[0]->id = 0; $myMailingQueA = jNews_Mailing::getMailingsForQueue(); if (empty($myMailingQueA) || !is_array($myMailingQueA)) { $myMailingQueA = array(); } $lt = array_merge($mySepList, $myMailingQueA); $mailingId = JREquest::getVar('mailingid', ''); $dropDown = jnews::HTML_GenericList($lt, 'mailingid', '' . 'class="inputbox" size="1" onchange="document.adminForm.submit();"', 'id', 'subject', $mailingId); $filter = _JNEWS_FILTER_MAILING . $dropDown; $hidden = '<input type="hidden" name="option" value="' . JNEWS_OPTION . '" />'; $hidden .= '<input type="hidden" name="act" value="' . $action . '" />'; $hidden .= '<input type="hidden" name="limit" value="' . $limit . '" />'; ?> <?php echo $form['main']; if ($form['main'] !== "") { $form['select'] = ""; } // top portion before the table list // for search $toSearch = new stdClass(); $toSearch->forms = $form['select']; $toSearch->hidden = $hidden; $toSearch->listsearch = $mailingsearch; $toSearch->id = 'mailingsearch'; echo jnews::setTop($toSearch, $message, $setLimit, $filter); ?> <table class="<?php echo jnews::myTheme(); ?> "> <thead><tr> <th width="2%" class="title">#</th> <th width="2%" class="title"><input type="checkbox" id="selectallcheck" name="allchecked" onclick="jnewsselectall();"></th> <th width="22%" class="title"><?php echo jnews::HTML_GridSort(_JNEWS_QUEUE_SUBJECT, 'm.subject', $setSort->orderDir, $setSort->orderValue); ?> </th> <th width="22%" class="title"><?php echo jnews::HTML_GridSort(_JNEWS_QUEUE_EMAIL, 's.email', $setSort->orderDir, $setSort->orderValue); ?> </th> <th width="22%" class="title"><?php echo jnews::HTML_GridSort(_JNEWS_SENDDATE, 'q.send_date', $setSort->orderDir, $setSort->orderValue); ?> </th> <th width="3%" class="title"><center><?php echo jnews::HTML_GridSort(_JNEWS_QUEUE_PRIOR, 'q.priority', $setSort->orderDir, $setSort->orderValue); ?> </center></th> <th width="2%" class="title"><center><?php echo jnews::HTML_GridSort(_JNEWS_QUEUE_ATT, 'q.attempt', $setSort->orderDir, $setSort->orderValue); ?> </center></th> <th width="3%" class="title"><?php echo jnews::HTML_GridSort('Suspend', 'q.suspend', $setSort->orderDir, $setSort->orderValue); ?> </th> <th width="3%" class="title"><?php echo jnews::HTML_GridSort('Blocked', 'q.block', $setSort->orderDir, $setSort->orderValue); ?> </th> <th width="3%" class="title"><?php echo jnews::HTML_GridSort('ID', 'q.qid', $setSort->orderDir, $setSort->orderValue); ?> </th> </thead></tr> <?php $i = $start; jNews_QueueHTML::_displayQueue($mailingq, $i); ?> </table> <?php echo '<br />'; echo jnews::setLegend(); }