$user =& JFactory::getUser(); if (!$user->gid && !in_array($task, array("getcategories", "getcontents", "getimages"))) { $mainframe->redirect('index.php', JText::_('ALERTNOTAUTH')); exit; } $id = JRequest::getVar('id', 0, '', 'int'); if ($task == "getimages") { HTML_FPSlideShow::showHeaderIM($option, $task); } switch ($task) { // HELPERS case 'getcategories': getcategories(); break; case 'getcontents': getcontents(); break; case 'getimages': getimages(); break; // DEFAULT // DEFAULT default: showNothing($option); break; } if ($task == "getimages") { HTML_FPSlideShow::showFooter(); } function showNothing($option) {
if ($FIELD['col_mobile'] == 1) { $f .= '<td id="mobile">' . htmlspecialchars($mobile) . '</td>'; } if ($FIELD['dis_pend'] == 1) { $f .= '<td id="status">' . htmlspecialchars($status) . '</td>'; } } return $f; } if ($FIELD['dis_pend'] == 1) { $lists = dbAll('select * from mailing_list'); } else { $lists = dbAll('select * from mailing_list where status="activated"'); } echo '<h3>Email List</h3>'; if (isset($deleted)) { echo '<em>' . $deleted . '</em>'; } echo '<table class="tablesorter">'; if (count($lists) == 0) { echo '<tr><td colspan="4">No subscriptions yet!</td></tr>'; } else { echo '<thead><tr><th>Num</th><th>Email</th>' . getcontents('headers') . '<th>Delete</th></tr></thead>'; } echo '<tbody>'; $num = ''; foreach ($lists as $list) { $num++; echo '<tr><td id="num">' . $num . '</td><td id="email">' . htmlspecialchars($list['email']) . '</td>' . getcontents('columns', $list['status'], $list['name'], $list['mobile']) . '<td id="delete"><a href="' . $_url . '&mailing_list=delete&id=!' . htmlspecialchars($list['id']) . '">[x]</a></td></tr>'; } echo '</tbody></table>';