[ Index ]
 

Code source de Joomla 1.0.13

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/administrator/modules/ -> mod_latest.php (source)

   1  <?php
   2  /**
   3  * @version $Id: mod_latest.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.id, a.sectionid, a.title, a.created, u.name, a.created_by_alias, a.created_by"
  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 created DESC"
  22  ;
  23  $database->setQuery( $query, 0, 10 );
  24  $rows = $database->loadObjectList();
  25  ?>
  26  
  27  <table class="adminlist">
  28  <tr>
  29      <th colspan="3">
  30      Most Recently Added Content
  31      </th>
  32  </tr>
  33  <?php
  34  foreach ($rows as $row) {
  35      if ( $row->sectionid == 0 ) {
  36          $link = 'index2.php?option=com_typedcontent&amp;task=edit&amp;hidemainmenu=1&amp;id='. $row->id;
  37      } else {
  38          $link = 'index2.php?option=com_content&amp;task=edit&amp;hidemainmenu=1&amp;id='. $row->id;
  39      }
  40  
  41      if ( $acl->acl_check( 'administration', 'manage', 'users', $my->usertype, 'components', 'com_users' ) ) {
  42          if ( $row->created_by_alias ) {
  43              $author = $row->created_by_alias;
  44          } else {
  45              $linkA     = 'index2.php?option=com_users&task=editA&amp;hidemainmenu=1&id='. $row->created_by;
  46              $author = '<a href="'. $linkA .'" title="Edit User">'. htmlspecialchars( $row->name, ENT_QUOTES ) .'</a>';
  47          }
  48      } else {
  49          if ( $row->created_by_alias ) {
  50              $author = $row->created_by_alias;
  51          } else {
  52              $author = htmlspecialchars( $row->name, ENT_QUOTES );
  53          }
  54      }
  55      ?>
  56      <tr>
  57          <td>
  58          <a href="<?php echo $link; ?>">
  59          <?php echo htmlspecialchars($row->title, ENT_QUOTES);?>
  60          </a>
  61          </td>
  62          <td>
  63          <?php echo $row->created;?>
  64          </td>
  65          <td>
  66          <?php echo $author;?>
  67          </td>
  68      </tr>
  69      <?php
  70  }
  71  ?>
  72  <tr>
  73      <th colspan="3">
  74      </th>
  75  </tr>
  76  </table>


Généré le : Wed Nov 21 14:43:32 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics