aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/functions/functions.php8
-rw-r--r--phpBB/index.php2
2 files changed, 9 insertions, 1 deletions
diff --git a/phpBB/functions/functions.php b/phpBB/functions/functions.php
index 6345630813..bc2fd5b670 100644
--- a/phpBB/functions/functions.php
+++ b/phpBB/functions/functions.php
@@ -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']);
diff --git a/phpBB/index.php b/phpBB/index.php
index b8cea3e80c..79c0a9644b 100644
--- a/phpBB/index.php
+++ b/phpBB/index.php
@@ -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))
{