function banners(&$rows, &$pageNav, &$lists) { BannersViewBanner::setBannersToolbar(); $user =& JFactory::getUser(); $ordering = $lists['order'] == 'b.ordering'; JHTML::_('behavior.tooltip'); ?> <form action="index.php?option=com_banners" method="post" name="adminForm"> <table> <tr> <td align="left" width="100%"> <?php echo JText::_('Filter'); ?> : <input type="text" name="search" id="search" value="<?php echo $lists['search']; ?> " class="text_area" onchange="document.adminForm.submit();" /> <button onclick="this.form.submit();"><?php echo JText::_('Go'); ?> </button> <button onclick="document.getElementById('search').value='';this.form.getElementById('filter_catid').value='0';this.form.getElementById('filter_state').value='';this.form.submit();"><?php echo JText::_('Filter Reset'); ?> </button> </td> <td nowrap="nowrap"> <?php echo $lists['catid']; echo $lists['state']; ?> </td> </tr> </table> <table class="adminlist"> <thead> <tr> <th width="20"> <?php echo JText::_('Num'); ?> </th> <th width="20"> <input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($rows); ?> );" /> </th> <th nowrap="nowrap" class="title"> <?php echo JHTML::_('grid.sort', 'Name', 'b.name', @$lists['order_Dir'], @$lists['order']); ?> </th> <th width="10%" nowrap="nowrap"> <?php echo JHTML::_('grid.sort', 'Client', 'c.name', @$lists['order_Dir'], @$lists['order']); ?> </th> <th width="10%" nowrap="nowrap"> <?php echo JHTML::_('grid.sort', 'Category', 'cc.title', @$lists['order_Dir'], @$lists['order']); ?> </th> <th width="5%" nowrap="nowrap"> <?php echo JHTML::_('grid.sort', 'Published', 'b.showBanner', @$lists['order_Dir'], @$lists['order']); ?> </th> <th width="8%" nowrap="nowrap"> <?php echo JHTML::_('grid.sort', 'Order', 'b.ordering', @$lists['order_Dir'], @$lists['order']); ?> <?php if ($ordering) { echo JHTML::_('grid.order', $rows); } ?> </th> <th width="5%" nowrap="nowrap"> <?php echo JHTML::_('grid.sort', 'Sticky', 'b.Sticky', @$lists['order_Dir'], @$lists['order']); ?> </th> <th width="5%" nowrap="nowrap"> <?php echo JHTML::_('grid.sort', 'Impressions', 'b.impmade', @$lists['order_Dir'], @$lists['order']); ?> </th> <th width="80"> <?php echo JHTML::_('grid.sort', 'Clicks', 'b.clicks', @$lists['order_Dir'], @$lists['order']); ?> </th> <th width="5%" nowrap="nowrap"> <?php echo JText::_('Tags'); ?> </th> <th width="1%" nowrap="nowrap"> <?php echo JHTML::_('grid.sort', 'ID', 'b.bid', @$lists['order_Dir'], @$lists['order']); ?> </th> </tr> </thead> <tfoot> <tr> <td colspan="13"> <?php echo $pageNav->getListFooter(); ?> </td> </tr> </tfoot> <tbody> <?php $k = 0; for ($i = 0, $n = count($rows); $i < $n; $i++) { $row =& $rows[$i]; $row->id = $row->bid; $link = JRoute::_('index.php?option=com_banners&task=edit&cid[]=' . $row->id); if ($row->imptotal <= 0) { $row->imptotal = JText::_('unlimited'); } if ($row->impmade != 0) { $percentClicks = 100 * $row->clicks / $row->impmade; } else { $percentClicks = 0; } $row->published = $row->showBanner; $published = JHTML::_('grid.published', $row, $i); $checked = JHTML::_('grid.checkedout', $row, $i); ?> <tr class="<?php echo "row{$k}"; ?> "> <td align="center"> <?php echo $pageNav->getRowOffset($i); ?> </td> <td align="center"> <?php echo $checked; ?> </td> <td> <span class="editlinktip hasTip" title="<?php echo JText::_('Edit'); ?> ::<?php echo $row->name; ?> "> <?php if (JTable::isCheckedOut($user->get('id'), $row->checked_out)) { echo $row->name; } else { ?> <a href="<?php echo $link; ?> "> <?php echo $row->name; ?> </a> <?php } ?> </span> </td> <td align="center"> <?php echo $row->client_name; ?> </td> <td align="center"> <?php echo $row->category_name; ?> </td> <td align="center"> <?php echo $published; ?> </td> <td class="order"> <?php $disabled = $ordering ? '' : 'disabled="disabled"'; ?> <input type="text" name="order[]" size="5" value="<?php echo $row->ordering; ?> " <?php echo $disabled; ?> class="text_area" style="text-align: center" /> </td> <td align="center"> <?php echo $row->sticky ? JText::_('Yes') : JText::_('No'); ?> </td> <td align="center"> <?php echo $row->impmade . ' ' . JText::_('of') . ' ' . $row->imptotal; ?> </td> <td align="center"> <?php echo $row->clicks; ?> - <?php echo sprintf('%.2f%%', $percentClicks); ?> </td> <td> <?php echo $row->tags; ?> </td> <td align="center"> <?php echo $row->id; ?> </td> </tr> <?php $k = 1 - $k; } ?> </tbody> </table> <input type="hidden" name="c" value="banner" /> <input type="hidden" name="option" value="com_banners" /> <input type="hidden" name="task" value="" /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="filter_order" value="<?php echo $lists['order']; ?> " /> <input type="hidden" name="filter_order_Dir" value="<?php echo $lists['order_Dir']; ?> " /> <?php echo JHTML::_('form.token'); ?> </form> <?php }