| [ 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 global $mosConfig_list_limit; 20 21 require_once ( $mosConfig_absolute_path .'/administrator/includes/pageNavigation.php' ); 22 23 $limit = $mainframe->getUserStateFromRequest( "viewlistlimit", 'limit', $mosConfig_list_limit ); 24 $limitstart = $mainframe->getUserStateFromRequest( "view{$option}", 'limitstart', 0 ); 25 26 // hides Administrator or Super Administrator from list depending on usertype 27 $_and = ''; 28 if ( $my->gid == 24 ) { 29 $_and = "\n AND userid != '25'"; 30 } 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 . "\n LIMIT $pageNav->limitstart, $pageNav->limit" 55 ; 56 $database->setQuery( $query ); 57 $rows = $database->loadObjectList(); 58 ?> 59 <table class="adminlist"> 60 <tr> 61 <th colspan="4"> 62 <?php echo T_('Currently Logged in Users') ?> 63 </th> 64 </tr> 65 <?php 66 $i = 0; 67 foreach ( $rows as $row ) { 68 if ( $acl->acl_check( 'administration', 'manage', 'users', $my->usertype, 'components', 'com_users' ) ) { 69 $link = 'index2.php?option=com_users&task=editA&hidemainmenu=1&id='. $row->userid; 70 $name = '<a href="'. $link .'" title="'._('Edit User').'">'. $row->username .'</a>'; 71 } else { 72 $name = $row->username; 73 } 74 ?> 75 <tr> 76 <td width="5%"> 77 <?php echo $pageNav->rowNumber( $i ); ?> 78 </td> 79 <td> 80 <?php echo $name;?> 81 </td> 82 <td> 83 <?php echo $row->usertype;?> 84 </td> 85 <?php 86 if ( $acl->acl_check( 'administration', 'manage', 'users', $my->usertype, 'components', 'com_users' ) ) { 87 ?> 88 <td> 89 <a href="index2.php?option=com_users&task=flogout&id=<?php echo $row->userid; ?>"> 90 <img src="images/publish_x.png" width="12" height="12" border="0" alt="<?php echo T_('Logout') ?>" Title="<?php echo T_('Force Logout User') ?>" /> 91 </a> 92 </td> 93 <?php 94 } 95 ?> 96 </tr> 97 <?php 98 $i++; 99 } 100 ?> 101 </table> 102 <?php echo $pageNav->getListFooter(); ?> 103 <input type="hidden" name="option" value="" />
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Feb 8 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 |