mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-27 12:29:38 +00: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
2 changed files with 9 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue