Файл: modules/users/online_today.php
Строк: 41
<?php
/**
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) 2013-2014, Taras Chornyi, Sergiy Mazurenko, Ivan Kotliar
* @link http://perf-engine.net
* @package PerfEngine
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
$locate = 'in_users';
$title = _t('today_online');
include_header($title);
$tpl->div('title', _t('today_online'));
$users_a = $db->query("SELECT * FROM `users` WHERE `time` > '". strtotime('now 00:00:00') ."'")->rowCount();
$pages = new Paginator($users_a, $ames);
if($users_a == 0) {
$tpl->div('menu', _t('not_users'));
} else {
$users_q = $db->query("SELECT * FROM `users` WHERE `time` > '". strtotime('now 00:00:00') ."' ORDER BY time DESC LIMIT $start, $ames");
while($users = $users_q->fetch()) {
$tpl->div('menu', nick($users['id'], '<b>'._t('last_visit_time').'</b>: '.rtime($users['time'])));
}
$pages->view();
}
$tpl->div('block', NAV .' <a href="/users">'._t('back').'</a><br/>'. HICO .'<a href="/">'. _t('home') .'</a>');
include_footer();
?>