mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-20 07:42:09 +02:00
Users online update
git-svn-id: file:///svn/phpbb/trunk@144 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
7791a31260
commit
5ff33e38fe
@ -43,6 +43,10 @@ function get_db_stat($db, $mode)
|
||||
AND user_level != '. DELETED .'
|
||||
ORDER BY user_id DESC LIMIT 1';
|
||||
break;
|
||||
|
||||
case 'usersonline':
|
||||
$sql = "SELECT COUNT(*) AS online FROM ".SESSIONS_TABLE;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@ -57,6 +61,10 @@ function get_db_stat($db, $mode)
|
||||
{
|
||||
return($row);
|
||||
}
|
||||
else if($mode == "usersonline")
|
||||
{
|
||||
return ($row['online']);
|
||||
}
|
||||
else
|
||||
{
|
||||
return($row['total']);
|
||||
|
@ -41,7 +41,7 @@ $total_users = get_db_stat($db, 'usercount');
|
||||
$newest_userdata = get_db_stat($db, 'newestuser');
|
||||
$newest_user = $newest_userdata["username"];
|
||||
$newest_uid = $newest_userdata["user_id"];
|
||||
$users_browsing = "4 Users";
|
||||
$users_browsing = get_db_stat($db, "usersonline") . " Users ";
|
||||
|
||||
if(empty($viewcat))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user