Файл: public_html/modules/rating/online.php
Строк: 36
<?php
$root = $_SERVER['DOCUMENT_ROOT'];
include_once ($root.'/core/base.php');
falseauth();
$header = "Игроки онлайн";
include_once ($root.'/core/head.php');
echo '<div class="b"><center><div class = "btn _dark">Онлайн</div> <a href="/noalliance" class = "btn _green">Без альянса</a></center></div>';
$count = $db -> query("SELECT * FROM `users` WHERE `date_online` > '".time()."'") -> num_rows;
$k_page = k_page($count,10);
$page = page($k_page);
$start = 10*$page-10;
$sql = $db -> query("SELECT * FROM `users` WHERE `date_online` > '".time()."' ORDER BY `level` DESC LIMIT $start, 10");
$position = 1 + ($page == 1 ? 0 : 10*$page-10);
while($q = $sql->fetch_object())
{
echo '<div class = "notice_container"><div class = "gborder notice_alert2 alert-success">
<img src="/images/users.png" width="35px"> <big>'.who($q->id).'</big> '.$q->level.' ур.</div></div>';
$position++;
}
if($count >= 10) echo str('/online/?', $k_page, $page);
echo"<div class = 'line'></div><center><a href = '/rating' class = 'link'>Назад</a></center>";
include_once ($root.'/core/foot.php');