diff --git a/system/distributor.php b/system/distributor.php index 368828a..0349ab0 100644 --- a/system/distributor.php +++ b/system/distributor.php @@ -157,17 +157,17 @@ $html->set('main', isset($html->arr['main']) ? $html->arr['main'] : '', true); $sql->query('SELECT `id`, `login`, `time` FROM `users` ORDER BY `id` ASC'); - $online = ''; + $online = ''; + $online_users = []; while($staff = $sql->get()) { if ($staff['time']+15 > $start_point) { - $online .= $staff['login'].', '; - } - else { - $online .= ''; + $online_users[] = $staff['login']; } } - $online .= ''; + if(!empty($online_users) && is_countable($online_users)) { + $online = '' . implode(", ", $online_users) . ''; + } $html->set('online_users', $online); $html->pack('all');