Файл: modules/user/online.php
Строк: 62
<?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, 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_online';
$title = _t('users_online');
include_header($title);
$tpl->div('title', _t('users_online'));
$online_a = $db->query("SELECT * FROM `users` WHERE `time` > '". (time()-300) ."'")->rowCount();
$pages = new Paginator($online_a, $ames);
if($online_a == 0)
{
$tpl->div('menu', _t('not_users'));
}
else
{
$online_q = $db->query("SELECT * FROM `users` WHERE `time` > '". (time()-300) ."' ORDER BY time DESC LIMIT $start, $ames");
while($online = $online_q->fetch())
{
$tpl->div('post', nick($online['id'], rtime($online['time'])) . (!empty($online['locate']) ? _t($online['locate']) : NULL));
}
$pages->view();
}
$tpl->div('block', NAV .'<a href="/pages/guests/">'. _t('guests_online').'</a></br/>'. HICO .'<a href="/">'. _t('home').'</a>');
include_footer();
?>