<?php
define('PROTECTOR', 1);
include('files/path.php');
include($path.'files/db.php');
include($path.'files/auth.php');
include($path.'files/func.php');
$textl='Блатная малина';
include($path.'files/core.php');
include($path.'files/head.php');
include($path.'files/zag.php');
switch($_GET['mod']){

default:

echo'<div class="main">';

echo'<div class="menuList">';

echo'<li><a href="rating.php?mod=super"><img src="image/icon/user.png" width="12" height="12" alt="*">Рейтинг по сумме статов</a></li>';

echo'<li><a href="/home.php?mod=list"><img src="image/icon/clan.png" alt="*">Рейтинг Банд</a></li>';

echo'</div></div>';
break;

case 'lvlexp':
echo'<div class="main"><div class="block_zero center"><h1 class="yellow">Рейтинг авторитета</h1></div><div class="mini-line"></div>';
echo'<div class="menuList">';
$b = mysql_query("SELECT usr,lvl,exp FROM users WHERE lvl >'0' ORDER BY exp DESC LIMIT 0, 10");
$avto=mysql_num_rows($b);
if($avto>=1){
$i=1;
While($best = mysql_fetch_array($b)){
$bestexp = number_format($best['exp']);
echo'<li><a href="search.php?nick='.$best['usr'].'&amp;go=go"><span style="color: #ffffff;">'.$i.'.</span> '.$best['usr'].'<span style="float: right;"><span style="color: #ffffff;"><img src="image/icon/level.png" alt="*">'.$best['lvl'].', <img src="image/icon/exp.png" alt="*">'.$bestexp.'</span></span></a></li>';
$i++;
}
}else{
echo'<div class="main"><div class="block_zero">Нет сильных игроков</div></div>';
}
echo'</div></div><div class="dot-line"></div><div class="main"><div class="block_zero"><a href="javascript:history.go(-1)"><span style="color: #999;"><< Назад</span></a></div></div>';
break;

case 'clan':
echo'<div class="main"><div class="block_zero center"><h1 class="yellow">Рейтинг Банд фракции</h1></div><div class="mini-line"></div>';
echo'<div class="menuList">';
$b = mysql_query("SELECT reiting,emblema,name,id FROM `clan` WHERE `reiting` >'0' ORDER BY round(`reiting`) DESC LIMIT 0, 10");
$avto=mysql_num_rows($b);
if($avto>=1){
$i=1;
While($best = mysql_fetch_array($b)){
$bestklan = number_format($best['reiting']);
echo'<li><a href="clan.php?id='.$best['id'].'"><span style="color: #ffffff;">'.$i.'.</span> <img src="image/clan/'.$best['emblema'].'.png" alt="*"/>'.$best['name'].'<span style="float: right;"><span style="color: #ffffff;"><img src="image/clan/raiting.png" alt="*">'.$bestklan.'</span></span></a></li>';
$i++;
}
}else{
echo'<div class="main"><div class="block_zero">Нет Банд</div></div>';
}
echo'</div></div><div class="dot-line"></div><div class="main"><div class="block_zero"><a href="javascript:history.go(-1)"><span style="color: #999;"><< Назад</span></a></div></div>';
break;

case 'slava':
echo'<div class="main"><div class="block_zero center"><h1 class="yellow">Рейтинг Контроля</h1></div><div class="mini-line"></div>';
echo'<div class="menuList">';
$b = mysql_query("SELECT usr, slava FROM users WHERE slava >'0' ORDER BY slava DESC LIMIT 0, 10");
$avto=mysql_num_rows($b);
if($avto>=1){
$i=1;
While($best = mysql_fetch_array($b))
{
$bestslava = number_format($best['slava']);
echo'<li><a href="search.php?nick='.$best['usr'].'&amp;go=go"><span style="color: #ffffff;">'.$i.'.</span> '.$best['usr'].'<span style="float: right;"><span style="color: #ffffff;"><img src="image/icon/premium.png" alt="*">'.$bestslava.'</span></span></a></li>';
$i++;
}
}else{
echo'<div class="main"><div class="block_zero">Нет сильных игроков</div></div>';
}
echo'</div></div><div class="dot-line"></div><div class="main"><div class="block_zero"><a href="javascript:history.go(-1)"><span style="color: #999;"><< Назад</span></a></div></div>';
break;

case 'dueli':
echo'<div class="main"><div class="block_zero center"><h1 class="yellow">Рейтинг Лиги бойцов</h1></div><div class="mini-line"></div>';
echo'<div class="menuList">';
$dueli=mysql_query("SELECT `usr`, `allwins` FROM `set` WHERE `allwins` > '0' ORDER BY `allwins` DESC LIMIT 0, 10");
$avto=mysql_num_rows($dueli);
if($avto>=1){
$i=1;
While($best=mysql_fetch_array($dueli))
{
$allwin = number_format($best['allwins']);
echo'<li><a href="search.php?nick='.$best['usr'].'&amp;go=go"><span style="color: #ffffff;">'.$i.'.</span> '.$best['usr'].'<span style="float: right;"><span style="color: #ffffff;"><img src="image/icon/2hit.png" alt="*"/>'.$allwin.'</span></span></a></li>';
$i++;
}
}else{
echo'<div class="main"><div class="block_zero">Нет сильных игроков</div></div>';
}
echo'</div></div><div class="dot-line"></div><div class="main"><div class="block_zero"><a href="javascript:history.go(-1)"><span style="color: #999;"><< Назад</span></a></div></div>';
break;

case 'karma':
echo'<div class="main"><div class="block_zero center"><h1 class="yellow">Рейтинг Популярности</h1></div><div class="mini-line"></div>';
echo'<div class="menuList">';
$kar=mysql_query("SELECT `usr`, `karma` FROM `users` WHERE `karma` > '0' ORDER BY `karma` DESC LIMIT 0, 10");
$avto=mysql_num_rows($kar);
if($avto>=1){
$i=1;
While($best=mysql_fetch_array($kar))
{
$allkar = number_format($best['karma']);
echo'<li><a href="search.php?nick='.$best['usr'].'&amp;go=go"><span style="color: #ffffff;">'.$i.'.</span> '.$best['usr'].'<span style="float: right;"><span style="color: #ffffff;"><img src="image/icon/karma.png" alt="*"/>'.$allkar.'</span></span></a></li>';
$i++;
}
}else{
echo'<div class="main"><div class="block_zero">Нет сильных игроков</div></div>';
}
echo'</div></div><div class="dot-line"></div><div class="main"><div class="block_zero"><a href="javascript:history.go(-1)"><span style="color: #999;"><< Назад</span></a></div></div>';
break;

case 'lvl':
echo'<div class="main"><div class="block_zero center"><h1 class="yellow">Рейтинг Разборок</h1></div><div class="mini-line"></div>';
echo'<div class="menuList">';
$b = mysql_query("SELECT usr,arenawins FROM users WHERE arenawins >'0' ORDER BY arenawins DESC LIMIT 0, 10");
$avto=mysql_num_rows($b);
if($avto>=1){
$i=1;
While($best = mysql_fetch_array($b))
{
$bestwin = number_format($best['arenawins']);
echo'<li><a href="search.php?nick='.$best['usr'].'&amp;go=go"><span style="color: #ffffff;">'.$i.'.</span> '.$best['usr'].'<span style="float: right;"><span style="color: #ffffff;"><img src="image/icon/die.png" alt="*"/>'.$bestwin.'</span></span></a></li>';
$i++;
}
}else{
echo'<div class="main"><div class="block_zero">Нет сильных игроков</div></div>';
}
echo'</div></div><div class="dot-line"></div><div class="main"><div class="block_zero"><a href="javascript:history.go(-1)"><span style="color: #999;"><< Назад</span></a></div></div>';
break;

case 'super':
echo'<div class="main"><div class="block_zero center"><h1 class="yellow">Рейтинг самых сильных</h1></div><div class="mini-line"></div>';
echo'<div class="menuList">';
$super=mysql_query("SELECT `usr`, `super` FROM `users` WHERE `super` > '0' ORDER BY `super` DESC LIMIT 0, 10");
$avto=mysql_num_rows($super);
if($avto>=1){
$i=1;
While($best = mysql_fetch_array($super)){
$allsuper = number_format($best['super']);
echo'<li><a href="search.php?nick='.$best['usr'].'&amp;go=go"><span style="color: #ffffff;">'.$i.'.</span> '.$best['usr'].'<span style="float: right;"><span style="color: #ffffff;"><img src="image/icon/hero.png" width="12" height="12" alt="*"/>'.$allsuper.'</span></span></a></li>';
$i++;
}
}else{
echo'<div class="main"><div class="block_zero">Нет сильных игроков</div></div>';
}
echo'</div></div><div class="dot-line"></div><div class="main"><div class="block_zero"><a href="javascript:history.go(-1)"><span style="color: #999;"><< Назад</span></a></div></div>';
break;

case 'money':
echo'<div class="main"><div class="block_zero center"><h1 class="yellow">Рейтинг по Сигаретам</h1></div><div class="mini-line"></div>';
echo'<div class="menuList">';
$b = mysql_query("SELECT usr, money FROM users WHERE money >0 and prava<4 and lvl>0 ORDER BY money DESC LIMIT 0, 10");
$avto=mysql_num_rows($b);
if($avto>=1){
$i=1;
While($best = mysql_fetch_array($b)){
$bestmoney = number_format($best['money']);
echo'<li><a href="search.php?nick='.$best['usr'].'&amp;go=go"><span style="color: #ffffff;">'.$i.'.</span> '.$best['usr'].'<span style="float: right;"><span style="color: #ffffff;"><img src="image/icon/money.png" alt="*"/>'.$bestmoney.'</span></span></a></li>';
$i++;
}
}else{
echo'<div class="main"><div class="block_zero">Нет сильных игроков</div></div>';
}
echo'</div></div><div class="dot-line"></div><div class="main"><div class="block_zero"><a href="javascript:history.go(-1)"><span style="color: #999;"><< Назад</span></a></div></div>';
break;

case 'almaz':
echo'<div class="main"><div class="block_zero center"><h1 class="yellow">Рейтинг по Рублям</h1></div><div class="mini-line"></div>';
echo'<div class="menuList">';
$b = mysql_query("SELECT usr,almaz FROM users WHERE almaz >0 and prava<4 and lvl>0 ORDER BY almaz DESC LIMIT 0, 10");
$avto=mysql_num_rows($b);
if($avto>=1){
$i=1;
While($best = mysql_fetch_array($b)){
$bestalmaz = number_format($best['almaz']);
echo'<li><a href="search.php?nick='.$best['usr'].'&amp;go=go"><span style="color: #ffffff;">'.$i.'.</span> '.$best['usr'].'<span style="float: right;"><span style="color: #ffffff;"><img src="image/icon/almaz.png" alt="*"/>'.$bestalmaz.'</span></span></a></li>';
$i++;
}
}else{
echo'<div class="main"><div class="block_zero">Нет сильных игроков</div></div>';
}
echo'</div></div><div class="dot-line"></div><div class="main"><div class="block_zero"><a href="javascript:history.go(-1)"><span style="color: #999;"><< Назад</span></a></div></div>';
break;
}
include($path.'files/down.php');
?>