Source for file mod_latest.php

Documentation is available at mod_latest.php

  1. <?php
  2. /**
  3. @package Mambo
  4. @author Mambo Foundation Inc see README.php
  5. @copyright Mambo Foundation Inc.
  6. *  See COPYRIGHT.php for copyright notices and details.
  7. @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see
  8. *  LICENSE.php
  9. *  Mambo is free software; you can redistribute it and/or
  10. *  modify it under the terms of the GNU General Public License
  11. *  as published by the Free Software Foundation; version 2 of the
  12. *  License.
  13. */
  14.  
  15. /** ensure this file is being included by a parent file */
  16. defined'_VALID_MOS' or die'Direct Access to this location is not allowed.' );
  17.  
  18. $query "SELECT a.id, a.sectionid, a.title, a.created, u.name, a.created_by_alias, a.created_by"
  19. "\n FROM #__content AS a"
  20. "\n LEFT JOIN #__users AS u ON u.id=a.created_by"
  21. "\n WHERE a.state <> '-2'"
  22. "\n ORDER BY created DESC"
  23. "\n LIMIT 10"
  24. ;
  25. $database->setQuery$query );
  26. $rows $database->loadObjectList();
  27. ?>
  28.  
  29. <table class="adminlist">
  30. <tr>
  31.     <th colspan="3">
  32.     <?php echo T_('Most Recently Added Content')?>
  33.     </th>
  34. </tr>
  35. <?php
  36.  
  37. if ($rows{
  38.     foreach ($rows as $row{
  39.         if $row->sectionid == {
  40.             $link 'index2.php?option=com_typedcontent&amp;task=edit&amp;hidemainmenu=1&amp;id='$row->id;
  41.         else {
  42.             $link 'index2.php?option=com_content&amp;task=edit&amp;hidemainmenu=1&amp;id='$row->id;
  43.         }
  44.  
  45.         if $acl->acl_check'administration''manage''users'$my->usertype'components''com_users' ) ) {
  46.             if $row->created_by_alias {
  47.                 $author $row->created_by_alias;
  48.             else {
  49.                 $linkA     'index2.php?option=com_users&amp;task=editA&amp;hidemainmenu=1&amp;id='$row->created_by;
  50.                 $author '<a href="'$linkA .'" title="'.T_('Edit User'.'">'htmlspecialchars$row->nameENT_QUOTES .'</a>';
  51.             }
  52.         else {
  53.             if $row->created_by_alias {
  54.                 $author $row->created_by_alias;
  55.             else {
  56.                 $author htmlspecialchars$row->nameENT_QUOTES );
  57.             }
  58.         }
  59.         ?>
  60.         <tr>
  61.             <td>
  62.             <a href="<?php echo $link?>">
  63.             <?php echo htmlspecialchars($row->titleENT_QUOTES);?>
  64.             </a>
  65.             </td>
  66.             <td>
  67.             <?php echo MosFormatDate($row->created'Y-m-d H:i:s');?>
  68.             </td>
  69.             <td>
  70.             <?php echo $author;?>
  71.             </td>
  72.         </tr>
  73.         <?php
  74.     }    
  75. else {
  76.     ?>
  77.     <tr>
  78.         <td colspan="3"><?php echo T_('Nothing to show')?></td>
  79.     </tr>
  80.     <?php
  81. }
  82. ?>
  83. </table>

Documentation generated on Mon, 05 May 2008 16:21:15 +0400 by phpDocumentor 1.4.0