<?
//
//
require_once($_SERVER['DOCUMENT_ROOT']."/jquery/inc/system.php"); 
//
//
if(!$user){
header('location:/login/');
exit();
}
//
//
head([]);
//
//

$liga = num($_GET['type']);
if($liga <= 0){
header('location:?type='.$user['liga_type']);
exit();
}
if($liga >= 6){
header('location:?type='.$user['liga_type']);
exit();
}

$sql = DB::$dbs->query("SELECT `id`,`gender`,`name`,`liga_coll` FROM `users` WHERE `gender` != '0' AND `liga_type` = '".$liga."' ORDER BY `liga_coll` DESC LIMIT 10")->fetchAll(PDO::FETCH_BOTH);
		?>
<div class="poster -gas">
		    <div class="start">
		        <center>
		            <span class="title-wqi">Лига <?=$liga_type[$liga];?></span>
		        </center>

		<?
		$i = 1;
		
			foreach ($sql as $sqlls => $im): ?>

<div class="menu-us">
<div class="imgL">
<img src="/css/img/min_gender_<?=$im['gender'];?>.png" class="imgFight2" width="40" height="40">
</div>
<font color="#999999">
<?=user_info($im['id']);?>
<span style="float: right;"><?=$i;?> место</span>
</font>
<br>
<font color="#777777">
<img src="/css/img/liga/rating.png" width="16" height="16"> <?=$im['liga_coll'];?> 
</font>
</div>


			<?php
			$i++;
			endforeach;
			?>
			<div class="stats2"></div>
<center><a href="/arena/">Вернуться на арену</a></center>
			</div>
			</div>
<?
//
//
foot([]);
//
//
?>