[ Index ] |
|
Code source de Joomla 1.0.13 |
1 <?php 2 /** 3 * @version $Id: mod_popular.php 5677 2006-11-07 23:12:11Z friesengeist $ 4 * @package Joomla 5 * @copyright Copyright (C) 2005 Open Source Matters. All rights reserved. 6 * @license http://www.gnu.org/copyleft/gpl.html 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( '_VALID_MOS' ) or die( 'Restricted access' ); 16 17 $query = "SELECT a.hits, a.id, a.sectionid, a.title, a.created, u.name" 18 . "\n FROM #__content AS a" 19 . "\n LEFT JOIN #__users AS u ON u.id=a.created_by" 20 . "\n WHERE a.state != -2" 21 . "\n ORDER BY hits DESC" 22 ; 23 $database->setQuery( $query, 0, 10 ); 24 $rows = $database->loadObjectList(); 25 ?> 26 27 <table class="adminlist"> 28 <tr> 29 <th class="title"> 30 Most Popular Items 31 </th> 32 <th class="title"> 33 Created 34 </th> 35 <th class="title"> 36 Hits 37 </th> 38 </tr> 39 <?php 40 foreach ($rows as $row) { 41 if ( $row->sectionid == 0 ) { 42 $link = 'index2.php?option=com_typedcontent&task=edit&hidemainmenu=1&id='. $row->id; 43 } else { 44 $link = 'index2.php?option=com_content&task=edit&hidemainmenu=1&id='. $row->id; 45 } 46 ?> 47 <tr> 48 <td> 49 <a href="<?php echo $link; ?>"> 50 <?php echo htmlspecialchars($row->title, ENT_QUOTES);?></a> 51 </td> 52 <td> 53 <?php echo $row->created;?> 54 </td> 55 <td> 56 <?php echo $row->hits;?> 57 </td> 58 </tr> 59 <?php 60 } 61 ?> 62 <tr> 63 <th colspan="3"> 64 </th> 65 </tr> 66 </table>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Wed Nov 21 14:43:32 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |