| [ Index ] |
PHP Cross Reference of Joomla 1.5.26 DE |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @version $Id: mod_popular.php 14401 2010-01-26 14:10:00Z louis $ 4 * @package Joomla 5 * @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved. 6 * @license GNU/GPL, see LICENSE.php 7 * Joomla! is free software. This version may have been modified pursuant 8 * to the GNU General Public License, and as distributed it includes or 9 * is derivative of works licensed under the GNU General Public License or 10 * other free or open source software licenses. 11 * See COPYRIGHT.php for copyright notices and details. 12 */ 13 14 // no direct access 15 defined( '_JEXEC' ) or die( 'Restricted access' ); 16 17 $db =& JFactory::getDBO(); 18 $query = 'SELECT a.hits, a.id, a.sectionid, a.title, a.created, u.name' 19 . ' FROM #__content AS a' 20 . ' LEFT JOIN #__users AS u ON u.id=a.created_by' 21 . ' WHERE a.state <> -2' 22 . ' ORDER BY hits DESC' 23 ; 24 $db->setQuery( $query, 0, 10 ); 25 $rows = $db->loadObjectList(); 26 ?> 27 28 <table class="adminlist"> 29 <tr> 30 <td class="title"> 31 <strong><?php echo JText::_( 'Most Popular Items' ); ?></strong> 32 </td> 33 <td class="title"> 34 <strong><?php echo JText::_( 'Created' ); ?></strong> 35 </td> 36 <td class="title"> 37 <strong><?php echo JText::_( 'Hits' ); ?></strong> 38 </td> 39 </tr> 40 <?php 41 foreach ($rows as $row) 42 { 43 $link = 'index.php?option=com_content&task=edit&id='. $row->id; 44 ?> 45 <tr> 46 <td> 47 <a href="<?php echo $link; ?>"> 48 <?php echo htmlspecialchars($row->title, ENT_QUOTES, 'UTF-8');?></a> 49 </td> 50 <td> 51 <?php echo JHTML::_('date', $row->created, '%Y-%m-%d %H:%M:%S'); ?> 52 </td> 53 <td> 54 <?php echo $row->hits;?> 55 </td> 56 </tr> 57 <?php 58 } 59 ?> 60 </table>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Mar 28 15:54:07 2012 | Cross-referenced by PHPXref 0.7.1 |