Файл: rating.php
Строк: 90
<?
define('PROTECTOR', 1);
$head = 'rating';//фикс. места
$textl='Зал Славы';
@include('files/db.php');
@include('files/auth.php');
@include('files/func.php');
@include('files/core.php');
@include('files/head.php');
@include('files/zag.php');
switch($_GET[mod]){
default:
echo"<a href="rating.php?mod=clan"><b>Рейтинг Кланов</b></a><br/>";
echo"<a href="rating.php?mod=slava">Знаменитые</a><br/>";
echo"<a href="rating.php?mod=lvl">Охотники</a><br/>";
echo"<a href="rating.php?mod=glad">Гладиаторы</a><br/>";
echo"<a href="rating.php?mod=money">Богачи</a><br/>";
echo"<a href="rating.php?mod=almaz">Ювелиры</a><br/>";
echo"<div class="dot">";
$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))
{
echo"$i. <a href="search.php?nick=$best[usr]&go=go">$best[usr]</a> [<b>$best[lvl]</b> уровень]<br/>";
$i++;
}
}else{
echo"<b>Нет опытных игроков</b><br/>";
}
echo "</div><img src='pic/main/redball.gif' alt='*'/> <a href="rules.php?mod=adm">Администрация</a><br/>";
echo'<img src="pic/main/search.png" alt="*"/> <a href="search.php?">Поиск игроков</a><br/>';
$time=time();
$req = mysql_query("SELECT * FROM `ban` WHERE `ban_time`>'$time'");
$banners=mysql_num_rows($req);
echo'<img src="pic/main/alkatrass.png" alt="*"/> <a href="zona.php?">Тюрьма</a> ('.$banners.')<br/>';
echo"</div></div><div class='menu'><a href="index.php?">На главную</a>";
break;
case 'clan':
$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))
{
echo"$i. <img src="pic/clan/$best[emblema]" alt="*"/><a href="clan.php?id=$best[id]">$best[name]</a>
[Рейтинг: <b>$best[reiting]</b>]<br/>";
$i++;
}
}else{
echo"<b>Нет Кланов</b><br/>";
}
echo"<a href="rating.php?">Назад</a>";
break;
case 'slava':
$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))
{
echo"$i. <a href="search.php?nick=$best[usr]&go=go">$best[usr]</a>
[Слава: <b>$best[slava]</b>]<br/>";
$i++;
}
}else{
echo"<b>Нет Великих</b><br/>";
}
echo"<a href="rating.php?">Назад</a>";
break;
case 'glad':
$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))
{
echo"$i. <a href="search.php?nick=$best[usr]&go=go">$best[usr]</a>
[Побед на арене: <b>$best[arenawins]</b>]<br/>";
$i++;
}
}else{
echo"<b>Нет гладиаторов</b><br/>";
}
echo"<a href="rating.php?">Назад</a>";
break;
case 'lvl':
$b = mysql_query("SELECT usr,wins FROM users WHERE wins >'0' ORDER BY wins DESC LIMIT 0, 10");
////////////////////////////
$avto=mysql_num_rows($b);
if($avto>=1){
$i=1;
While($best = mysql_fetch_array($b))
{
echo"$i. <a href="search.php?nick=$best[usr]&go=go">$best[usr]</a>
[Убито монстров <b>$best[wins]</b>]<br/>";
$i++;
}
}else{
echo"<b>Нет сильных игроков</b><br/>";
}
echo"$div";
echo"<a href="rating.php?">Назад</a>";
break;
/////////////
case 'krit':
$b = mysql_query("SELECT usr,krit FROM users WHERE krit >'0' ORDER BY krit DESC LIMIT 0, 10");
////////////////////////////
$avto=mysql_num_rows($b);
if($avto>=1){
$i=1;
While($best = mysql_fetch_array($b)){
echo"$i. <a href="search.php?nick=$best[usr]&go=go">$best[usr]</a>
[Критический удар <b>$best[krit]%</b>]<br/>";
$i++;}}else{
echo"<b>Нет критовиков</b><br/>";}
echo"<a href="rating.php?">Назад</a>";
break;
///////////
case 'ukrit':
$b = mysql_query("SELECT usr,ukrit FROM users WHERE ukrit >'0' ORDER BY ukrit DESC LIMIT 0, 10");
////////////////////////////
$avto=mysql_num_rows($b);
if($avto>=1){
$i=1;
While($best = mysql_fetch_array($b)){
echo"$i. <a href="search.php?nick=$best[usr]&go=go">$best[usr]</a>
[Крит-урон <b>$best[ukrit]%</b>]<br/>";
$i++;}}else{
echo"<b>Нет критовиков с сильным ударом</b><br/>";}
echo"<a href="rating.php?">Назад</a>";
break;
///////////
case 'money':
$b = mysql_query("SELECT usr,money FROM users WHERE money >0 and prava!=4 ORDER BY money DESC LIMIT 0, 10");
////////////////////////////
$avto=mysql_num_rows($b);
if($avto>=1){
$i=1;
While($best = mysql_fetch_array($b)){
echo"$i. <a href="search.php?nick=$best[usr]&go=go">$best[usr]</a>
[Монеты <b>$best[money]</b>]<br/>";
$i++;}}else{
echo"<b>Нет богачей</b><br/>";}
echo"<a href="rating.php?">Назад</a>";
break;
case 'almaz':
$b = mysql_query("SELECT usr,almaz FROM users WHERE almaz >0 and prava<4 ORDER BY almaz DESC LIMIT 0, 10");
////////////////////////////
$avto=mysql_num_rows($b);
if($avto>=1){
$i=1;
While($best = mysql_fetch_array($b)){
echo"$i. <a href="search.php?nick=$best[usr]&go=go">$best[usr]</a>
[Алмазы: <b>$best[almaz]</b>]<br/>";
$i++;}}else{
echo"<b>Нет ювелиров</b><br/>";}
echo"<a href="rating.php?">Назад</a>";
break;
///////////
}
@include('files/down.php');
?>