Файл: public_html/modules/rating/battleground.php
Строк: 34
<?php
$root = $_SERVER['DOCUMENT_ROOT'];
include_once ($root.'/core/base.php');
falseauth();
$header = "Лучшие по лиге";
include_once ($root.'/core/head.php');
echo '<div class="b"><center>10 лучших по рейтингу в "Поле боя"</center></div>';
$sql = $db -> query("SELECT * FROM `users` ORDER BY `battleground_rating` DESC LIMIT 10");
$position = 1;
while($q = $sql->fetch_object())
{
if($q->battleground_rating >= $max_rating) $league = $db->query("SELECT * FROM `battleground_leagues` WHERE `id` = '10' LIMIT 1")->fetch_object();
else $league = $db->query("SELECT * FROM `battleground_leagues` WHERE `min_rating` >= '".$q->battleground_rating."' LIMIT 1")->fetch_object();
echo '<a href="/user/'.$q->id.'" class="link">'.$position.' место <img src="/images/users.png" width="35px"> <big>'.$q->login.' </big><img src="/images/leagues/'.$league->image_id.'.png" width="30" heigth="30">'.$q->battleground_rating.'</a>';
$position++;
}
echo"<div class = 'line'></div><center><a href = '/rating' class = 'link'>Назад</a></center>";
include_once ($root.'/core/foot.php');