[ Index ] |
|
Code source de Joomla 1.0.13 |
1 <?php 2 /** 3 * @version $Id: mod_logged.php 4502 2006-08-13 22:45:33Z eddiea $ 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 global $mosConfig_list_limit; 18 19 require_once ( $mosConfig_absolute_path .'/administrator/includes/pageNavigation.php' ); 20 21 $limit = $mainframe->getUserStateFromRequest( "viewlistlimit", 'limit', $mosConfig_list_limit ); 22 $limitstart = $mainframe->getUserStateFromRequest( "view{$option}", 'limitstart', 0 ); 23 24 // hides Administrator or Super Administrator from list depending on usertype 25 $and = ''; 26 // administrator check 27 if ( $my->gid == 24 ) { 28 $and = "\n AND userid != '25'"; 29 } 30 // manager check 31 if ( $my->gid == 23 ) { 32 $and = "\n AND userid != '25'"; 33 $and .= "\n AND userid != '24'"; 34 } 35 36 // get the total number of records 37 $query = "SELECT COUNT(*)" 38 . "\n FROM #__session" 39 . "\n WHERE userid != 0" 40 . $and 41 . "\n ORDER BY usertype, username" 42 ; 43 $database->setQuery( $query ); 44 $total = $database->loadResult(); 45 46 // page navigation 47 $pageNav = new mosPageNav( $total, $limitstart, $limit ); 48 49 $query = "SELECT *" 50 . "\n FROM #__session" 51 . "\n WHERE userid != 0" 52 . $and 53 . "\n ORDER BY usertype, username" 54 ; 55 $database->setQuery( $query, $pageNav->limitstart, $pageNav->limit ); 56 $rows = $database->loadObjectList(); 57 ?> 58 <table class="adminlist"> 59 <tr> 60 <th colspan="4"> 61 Currently Logged in Users 62 </th> 63 </tr> 64 <?php 65 $i = 0; 66 foreach ( $rows as $row ) { 67 if ( $acl->acl_check( 'administration', 'manage', 'users', $my->usertype, 'components', 'com_users' ) ) { 68 $link = 'index2.php?option=com_users&task=editA&hidemainmenu=1&id='. $row->userid; 69 $name = '<a href="'. $link .'" title="Edit User">'. $row->username .'</a>'; 70 } else { 71 $name = $row->username; 72 } 73 ?> 74 <tr> 75 <td width="5%"> 76 <?php echo $pageNav->rowNumber( $i ); ?> 77 </td> 78 <td> 79 <?php echo $name;?> 80 </td> 81 <td> 82 <?php echo $row->usertype;?> 83 </td> 84 <?php 85 if ( $acl->acl_check( 'administration', 'manage', 'users', $my->usertype, 'components', 'com_users' ) ) { 86 ?> 87 <td> 88 <a href="index2.php?option=com_users&task=flogout&id=<?php echo $row->userid; ?>"> 89 <img src="images/publish_x.png" width="12" height="12" border="0" alt="Logout" Title="Force Logout User" /> 90 </a> 91 </td> 92 <?php 93 } 94 ?> 95 </tr> 96 <?php 97 $i++; 98 } 99 ?> 100 </table> 101 <?php echo $pageNav->getListFooter(); ?> 102 <input type="hidden" name="option" value="" />
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 |
![]() |