Файл: _modules/user/online/index.php
Строк: 41
<?php
# mark core v1.0
# author Drk in
# date 24.10.19
# core
require_once ( $_SERVER['DOCUMENT_ROOT']."/_core/system.php" );
# user
system::access(true);
# meta
$title = 'Онлайн сталкеры :: '.domain;
# head
require_once ( head );
echo '
<div style="margin: 5px;">
<div class="grid fights-link">
<div class="six columns ln">
<a href="/users/top">Рейтинг</a>
</div>
<div class="six columns">
<a href="/users/online">Онлайн</a>
</div>
</div>
</div>
';
$cn = DB :: $dbh -> querySingle("SELECT count(id) FROM user WHERE data_aut > ?;", array(time()-600));
if ($cn == 0)echo '<div class="dialog"><h1 class="pda">КПК</h1><p>› Cписок онлайн пуст<br></p></div>';
$page = new page($cn);
$limit = $cn > $page -> elements ? $page -> limit : null;
$query = DB :: $dbh -> query("SELECT id FROM user WHERE data_aut > ? ORDER BY exp DESC {$limit};", array(time()-600));
$i = $page -> start;
while ($act = $query -> fetch()):
$act = cache_user::get($act['id']);
$i++;
if ($i < 10)$i = '0'.$i;
echo '
<div class="fights-link" style="margin: 5px;">
<a href="/id/'.$act['id'].'" style="padding: 5px;">
<div class = "attack-icon" style="padding-right: 7px;float: right;margin-top: 5px;">
'.$i.'
</div>
<div style="padding-right: 7px;float: left;margin-top: 5px;">
'.user::min_ava($act['ava']).'
</div>
<div style="overflow: hidden;">
<h1 class="chat">'.user::mail($act['id']).'</h1></div>
<span style="font-size: 10px;">
Уровень: <font color="#82e42b">'.$act['lvl'].'</font> <br> Опыт <font color="#82e42b">'.$act['exp'].'</font>
</span>
</a></div>
';
endwhile;
$page -> get('?');
echo '<div class="line"></div>';
# foot
require_once ( foot );
?>