| 20 |
$limitstart = $mainframe->getUserStateFromRequest( "view{$option}", 'limitstart', 0 ); |
$limitstart = $mainframe->getUserStateFromRequest( "view{$option}", 'limitstart', 0 ); |
| 21 |
|
|
| 22 |
// hides Administrator or Super Administrator from list depending on usertype |
// hides Administrator or Super Administrator from list depending on usertype |
| 23 |
$and = ''; |
$_and = ''; |
| 24 |
if ( $my->gid == 24 ) { |
if ( $my->gid == 24 ) { |
| 25 |
$and = "\n AND userid != '25'"; |
$_and = "\n AND userid != '25'"; |
| 26 |
} |
} |
| 27 |
if ( $my->gid == 23 ) { |
if ( $my->gid == 23 ) { |
| 28 |
$and = "\n AND userid != '25'"; |
$_and = "\n AND userid != '25'"; |
| 29 |
$and .= "\n AND userid != '24'"; |
$_and .= "\n AND userid != '24'"; |
| 30 |
} |
} |
| 31 |
|
|
| 32 |
// get the total number of records |
// get the total number of records |
| 33 |
$query = "SELECT COUNT(*)" |
$query = "SELECT COUNT(*)" |
| 34 |
. "\n FROM #__session" |
. "\n FROM #__session" |
| 35 |
. "\n WHERE userid != 0" |
. "\n WHERE userid != 0" |
| 36 |
. $and |
. $_and |
| 37 |
. "\n ORDER BY usertype, username" |
. "\n ORDER BY usertype, username" |
| 38 |
; |
; |
| 39 |
$database->setQuery( $query ); |
$database->setQuery( $query ); |
| 45 |
$query = "SELECT *" |
$query = "SELECT *" |
| 46 |
. "\n FROM #__session" |
. "\n FROM #__session" |
| 47 |
. "\n WHERE userid != 0" |
. "\n WHERE userid != 0" |
| 48 |
. $and |
. $_and |
| 49 |
. "\n ORDER BY usertype, username" |
. "\n ORDER BY usertype, username" |
| 50 |
. "\n LIMIT $pageNav->limitstart, $pageNav->limit" |
. "\n LIMIT $pageNav->limitstart, $pageNav->limit" |
| 51 |
; |
; |