<?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"><div class="block_zero center"><span style="color: #9bc;">Бессмертная слава!</span></div><div class="mini-line"></div><div class="block_zero center"><img src="image/logo/slava.png" width="120" height="60" alt="logo"></div><div class="dot-line"></div>';

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

echo'<li><a href="rating.php?mod=super"><img src="image/icon/hero.png" width="12" height="12" alt="*">Рейтинг самых сильных</a></li>';

echo'<li><a href="rating.php?mod=lvlexp"><img src="image/icon/level.png" alt="*">Рейтинг уровневого опыта</a></li>';

echo'<li><a href="rating.php?mod=lvl"><img src="image/icon/die.png" alt="*">Рейтинг Арены</a></li>';

echo'<li><a href="rating.php?mod=dueli"><img src="image/icon/2hit.png" alt="*">Рейтинг Дуэлей</a></li>';

echo'<li><a href="rating.php?mod=slava"><img src="image/icon/premium.png" alt="*">Рейтинг Противостояния</a></li>';

echo'<li><a href="rating.php?mod=karma"><img src="image/icon/karma.png" alt="*">Рейтинг Популярности</a></li>';

echo'<li><a href="rating.php?mod=almaz"><img src="image/icon/almaz.png" alt="*"/>Рейтинг по Золоту</a></li>';

echo'<li><a href="rating.php?mod=money"><img src="image/icon/money.png" alt="*"/>Рейтинг по Серебру</a></li>';

echo'<li><a href="rating.php?mod=clan"><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');
?>