| [ Index ] | PHP Cross Reference of Mambo 4.6.5 |
|
| [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @package Mambo 4 * @author Mambo Foundation Inc see README.php 5 * @copyright (C) 2000 - 2009 Mambo Foundation Inc. 6 * See COPYRIGHT.php for copyright notices and details. 7 * @license GNU/GPL Version 2, see LICENSE.php 8 * 9 * Redistributions of files must retain the above copyright notice. 10 * 11 * Mambo is free software; you can redistribute it and/or 12 * modify it under the terms of the GNU General Public License 13 * as published by the Free Software Foundation; version 2 of the License. 14 */ 15 16 /** ensure this file is being included by a parent file */ 17 defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); 18 19 $query = "SELECT a.id, a.sectionid, a.title, a.created, u.name, a.created_by_alias, a.created_by" 20 . "\n FROM #__content AS a" 21 . "\n LEFT JOIN #__users AS u ON u.id=a.created_by" 22 . "\n WHERE a.state <> '-2'" 23 . "\n ORDER BY created DESC" 24 . "\n LIMIT 10" 25 ; 26 $database->setQuery( $query ); 27 $rows = $database->loadObjectList(); 28 ?> 29 30 <table class="adminlist"> 31 <tr> 32 <th colspan="3"> 33 <?php echo T_('Most Recently Added Content'); ?> 34 </th> 35 </tr> 36 <?php 37 38 if ($rows) { 39 foreach ($rows as $row) { 40 if ( $row->sectionid == 0 ) { 41 $link = 'index2.php?option=com_typedcontent&task=edit&hidemainmenu=1&id='. $row->id; 42 } else { 43 $link = 'index2.php?option=com_content&task=edit&hidemainmenu=1&id='. $row->id; 44 } 45 46 if ( $acl->acl_check( 'administration', 'manage', 'users', $my->usertype, 'components', 'com_users' ) ) { 47 if ( $row->created_by_alias ) { 48 $author = $row->created_by_alias; 49 } else { 50 $linkA = 'index2.php?option=com_users&task=editA&hidemainmenu=1&id='. $row->created_by; 51 $author = '<a href="'. $linkA .'" title="'.T_('Edit User') .'">'. htmlspecialchars( $row->name, ENT_QUOTES ) .'</a>'; 52 } 53 } else { 54 if ( $row->created_by_alias ) { 55 $author = $row->created_by_alias; 56 } else { 57 $author = htmlspecialchars( $row->name, ENT_QUOTES ); 58 } 59 } 60 ?> 61 <tr> 62 <td> 63 <a href="<?php echo $link; ?>"> 64 <?php echo htmlspecialchars($row->title, ENT_QUOTES);?> 65 </a> 66 </td> 67 <td> 68 <?php echo $row->created;?> 69 </td> 70 <td> 71 <?php echo $author;?> 72 </td> 73 </tr> 74 <?php 75 } 76 } else { 77 ?> 78 <tr> 79 <td colspan="3">Nothing to show</td> 80 </tr> 81 <?php 82 } 83 ?> 84 </table>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed May 23 00:05:01 2012 | Cross-referenced by PHPXref 0.7 |
| Mambo API: Mambo is Free software released under the GNU/General Public License, Version 2 |