Файл: plugins/page/users.online.php
Строк: 5
<?php
$title = 'Пользователи';
require (SYS.'head.php');
$all = core::count('users', 'time_last', '> '.TIME.'-600');
$pages = new pages($all, $set['user_pages']);
$query = $db->query("SELECT `time_last`, `id` FROM `users` WHERE `time_last` > ".TIME."-600 ORDER BY `time_last` DESC LIMIT $start, $set[user_pages]");
while ($list = $query->fetch_assoc())
{
$posts[] = [
'image' => user::photo($list['id']),
'title' => user::login($list['id']),
'post' => 'Посл. посещение: '.core::time($list['time_last']),
];
}
if ($all == 0)
$posts[] = [
'title' => 'Нет пользователей.'
];
$smarty->assign('post', $posts);
$smarty->display('posts.tpl');
$pages->view('?');
require (SYS.'foot.php');