diff --git a/admin/stats/tr_stats.php b/admin/stats/tr_stats.php index dca680e6a..ba0951a83 100644 --- a/admin/stats/tr_stats.php +++ b/admin/stats/tr_stats.php @@ -18,8 +18,8 @@ if (!IS_ADMIN) { bb_die($lang['NOT_AUTHORISED']); } -$sql[] = 'SELECT count(*) FROM `' . BB_USERS . '` WHERE `user_lastvisit` < UNIX_TIMESTAMP()-2592000'; -$sql[] = 'SELECT count(*) FROM `' . BB_USERS . '` WHERE `user_lastvisit` < UNIX_TIMESTAMP()-7776000'; +$sql[] = 'SELECT count(*) FROM `' . BB_USERS . '` WHERE `user_lastvisit` < UNIX_TIMESTAMP()-2592000 AND user_id NOT IN (' . EXCLUDED_USERS . ')'; +$sql[] = 'SELECT count(*) FROM `' . BB_USERS . '` WHERE `user_lastvisit` < UNIX_TIMESTAMP()-7776000 AND user_id NOT IN (' . EXCLUDED_USERS . ')'; $sql[] = 'SELECT round(avg(size)/1048576) FROM `' . BB_BT_TORRENTS . '`'; $sql[] = 'SELECT count(*) FROM `' . BB_BT_TORRENTS . '`'; $sql[] = 'SELECT count(distinct(topic_id)) FROM `' . BB_BT_TRACKER_SNAP . '` WHERE seeders > 0';