Файл: sumerki.mobi/sumerki.mobi/rating.php
Строк: 406
<?
//////////////////////////////////////////////////////////////
//////////////////////Онлайн игра "Сумерки"///////////////////
//////////////////////Основатель: Mc Laren////////////////////
///////////////////Контакты: ICQ - 597687549//////////////////
/////////////////////Пример: Sumerki.Mobi/////////////////////
///////////Если ты это читаешь, значит скрипт слили :D////////
//////////////////////////////////////////////////////////////
define('PROTECTOR', 1);
$headmod = 'rating';//фикс. места
$textl='Зал Славы';
include('files/path.php');
include('files/gzips.php');
include($path.'files/db.php');
include($path.'files/auth.php');
include($path.'files/func.php');
include($path.'files/core.php');
include($path.'files/head.php');
include($path.'files/zag.php');
switch($_GET[mod]){
default:
echo '<div class="zagolovok"><div class="zagolovok1"> <div class="zagolovok2"><div class="zagolovok_right"></div><div class="zagolovok_left"></div><div class="ch_name">';
echo 'Зал славы';
echo '</div><div class="clearFix"></div></div></div></div>';
echo"<div class='button pad_bot_5 pad'><a href="rating.php?mod=lvl">    <img src='/theme/standart/images/galochka.png'/> Рейтинг самых больших уровней</a></div>";
echo"<div class='button pad_bot_5 pad'><a href="rating.php?mod=opit">    <img src='/theme/standart/images/galochka.png'/> Рейтинг самых опытных</a></div>";
echo"<div class='button pad_bot_5 pad'><a href="rating.php?mod=sila">    <img src='/theme/standart/images/galochka.png'/> Рейтинг самых сильных</a></div>";
echo"<div class='button pad_bot_5 pad'><a href="rating.php?mod=lovk">    <img src='/theme/standart/images/galochka.png'/> Рейтинг самых ловких</a></div>";
echo"<div class='button pad_bot_5 pad'><a href="rating.php?mod=prot">    <img src='/theme/standart/images/galochka.png'/> Рейтинг защиты</a></div>";
echo"<div class='button pad_bot_5 pad'><a href="rating.php?mod=krit">    <img src='/theme/standart/images/galochka.png'/> Рейтинг точных</a></div>";
echo"<div class='button pad_bot_5 pad'><a href="rating.php?mod=ukrit">    <img src='/theme/standart/images/galochka.png'/> Рейтинг сокрушителей</a></div>";
echo"<div class='button pad_bot_5 pad'><a href="rating.php?mod=igrok">    <img src='/theme/standart/images/galochka.png'/> Рейтинг победителей арены</a></div>";
echo"<div class='button pad_bot_5 pad'><a href="rating.php?mod=igrok_porajeniya">    <img src='/theme/standart/images/galochka.png'/> Рейтинг боёв на арене</a></div>";
echo"<div class='button pad_bot_5 pad'><a href="rating.php?mod=loc">    <img src='/theme/standart/images/galochka.png'/> Рейтинг побед в окрестностях</a></div>";
echo"<div class='button pad_bot_5 pad'><a href="rating.php?mod=loc_proigral">    <img src='/theme/standart/images/galochka.png'/> Рейтинг поражений в окрестностях</a></div>";
echo"<div class='button pad_bot_5 pad'><a href="rating.php?mod=pop">    <img src='/theme/standart/images/galochka.png'/> Популярные игроки</a></div>";
break;
case 'pop':
echo '<div class="zagolovok"><div class="zagolovok1"> <div class="zagolovok2"><div class="zagolovok_right"></div><div class="zagolovok_left"></div><div class="ch_name">';
echo 'Популярные';
echo '</div><div class="clearFix"></div></div></div></div>';
$b = mysql_query("SELECT usr,rek FROM users WHERE rek >'0' AND prava <'5' ORDER BY loses DESC LIMIT 0, 10");
////////////////////////////
$avto=mysql_num_rows($b);
if($avto>=1){
$i=1;
While($best = mysql_fetch_array($b))
{
$nickas = strip_tags($best[usr]);
$req = mysql_query("SELECT `storona` FROM `users` WHERE `usr` = '$nickas'");
$asd = mysql_num_rows(mysql_query("SELECT laikas, usr FROM online WHERE laikas > '$timeout' AND usr='$nickas'"));
$pic = mysql_fetch_array($req);
echo '<div class="fon bgray"><div class="bg1"><div class="bg2"><div class="bg3"><div class="bg4"><div class="bg5"><div class="bg6"><div class="bg7"><div class="bg8">';
echo"$i.";
echo' <img src="pic/main/'.$pic['storona'].'.png" alt="#"/>';
$i++;
echo" <a href="search.php?nick=$best[usr]&go=go">$best[usr]</a>
<br>Популярность: ".number_format ($best[rek])."";
if($asd==0){
echo" - <font color="red"> offline</font>";}else{
echo" - <font color="lime"> Online</font>";}
echo '</div></div></div></div></div></div></div></div></div>';
}
echo "<div class='button pad_bot_5 pad'><a href="rating.php?">    <img src='/theme/standart/images/galochka.png'/> Вернуться</a></div>";
}else{
echo '<div class="fon bgray"><div class="bg1"><div class="bg2"><div class="bg3"><div class="bg4"><div class="bg5"><div class="bg6"><div class="bg7"><div class="bg8">';
echo"<b>Нет популярных</b>";
echo '</div></div></div></div></div></div></div></div></div>';
}
break;
case 'loc_proigral':
echo '<div class="zagolovok"><div class="zagolovok1"> <div class="zagolovok2"><div class="zagolovok_right"></div><div class="zagolovok_left"></div><div class="ch_name">';
echo 'Поражения в окрестностях';
echo '</div><div class="clearFix"></div></div></div></div>';
$b = mysql_query("SELECT usr,loses FROM users WHERE loses >'0' AND prava <'5' ORDER BY loses DESC LIMIT 0, 10");
////////////////////////////
$avto=mysql_num_rows($b);
if($avto>=1){
$i=1;
While($best = mysql_fetch_array($b))
{
$nickas = strip_tags($best[usr]);
$req = mysql_query("SELECT `storona` FROM `users` WHERE `usr` = '$nickas'");
$asd = mysql_num_rows(mysql_query("SELECT laikas, usr FROM online WHERE laikas > '$timeout' AND usr='$nickas'"));
$pic = mysql_fetch_array($req);
echo"<div class='fon bgray'><div class='bg1'><div class='bg2'><div class='bg3'><div class='bg4'><div class='bg5'><div class='bg6'><div class='bg7'><div class='bg8'>$i.";
echo' <img src="pic/main/'.$pic['storona'].'.png" alt="#"/>';
$i++;
echo" <a href="search.php?nick=$best[usr]&go=go">$best[usr]</a>
Поражений: ".number_format ($best[loses])."";
if($asd==0){
echo" - <font color="red"> offline</font></div></div></div></div></div></div></div></div></div>";}else{
echo" - <font color="lime"> Online</font></div></div></div></div></div></div></div></div></div>";}
}
echo "<div class='button pad_bot_5 pad'><a href="rating.php?">    <img src='/theme/standart/images/galochka.png'/> Вернуться</a></div>";
}else{
echo"<div class='fon bgray'><div class='bg1'><div class='bg2'><div class='bg3'><div class='bg4'><div class='bg5'><div class='bg6'><div class='bg7'><div class='bg8'><b>Нет поражений</b></div>";
}
break;
case 'loc':
echo '<div class="zagolovok"><div class="zagolovok1"> <div class="zagolovok2"><div class="zagolovok_right"></div><div class="zagolovok_left"></div><div class="ch_name">';
echo 'Победы в окрестностях';
echo '</div><div class="clearFix"></div></div></div></div>';
$b = mysql_query("SELECT usr,wins FROM users WHERE wins >'0' AND prava <'5' ORDER BY wins DESC LIMIT 0, 10");
////////////////////////////
$avto=mysql_num_rows($b);
if($avto>=1){
$i=1;
While($best = mysql_fetch_array($b))
{
$nickas = strip_tags($best[usr]);
$req = mysql_query("SELECT `storona` FROM `users` WHERE `usr` = '$nickas'");
$asd = mysql_num_rows(mysql_query("SELECT laikas, usr FROM online WHERE laikas > '$timeout' AND usr='$nickas'"));
$pic = mysql_fetch_array($req);
echo"<div class='fon bgray'><div class='bg1'><div class='bg2'><div class='bg3'><div class='bg4'><div class='bg5'><div class='bg6'><div class='bg7'><div class='bg8'>$i.";
echo' <img src="pic/main/'.$pic['storona'].'.png" alt="#"/>';
$i++;
echo" <a href="search.php?nick=$best[usr]&go=go">$best[usr]</a>
Побед ".number_format ($best[wins])."";
if($asd==0){
echo" - <font color="red"> offline</font></div></div></div></div></div></div></div></div></div>";}else{
echo" - <font color="lime"> Online</font></div></div></div></div></div></div></div></div></div>";}
}
echo "<div class='button pad_bot_5 pad'><a href="rating.php?">    <img src='/theme/standart/images/galochka.png'/> Вернуться</a></div>";
}else{
echo"<div class='fon bgray'><div class='bg1'><div class='bg2'><div class='bg3'><div class='bg4'><div class='bg5'><div class='bg6'><div class='bg7'><div class='bg8'><b>Нет победителей</b></div>";
}
break;
case 'igrok_porajeniya':
echo '<div class="zagolovok"><div class="zagolovok1"> <div class="zagolovok2"><div class="zagolovok_right"></div><div class="zagolovok_left"></div><div class="ch_name">';
echo 'Бои на арене';
echo '</div><div class="clearFix"></div></div></div></div>';
$b = mysql_query("SELECT usr,boi FROM users WHERE boi >'0' AND prava <'5' ORDER BY boi DESC LIMIT 0, 10");
////////////////////////////
$avto=mysql_num_rows($b);
if($avto>=1){
$i=1;
While($best = mysql_fetch_array($b))
{
$nickas = strip_tags($best[usr]);
$req = mysql_query("SELECT `storona` FROM `users` WHERE `usr` = '$nickas'");
$asd = mysql_num_rows(mysql_query("SELECT laikas, usr FROM online WHERE laikas > '$timeout' AND usr='$nickas'"));
$pic = mysql_fetch_array($req);
echo"<div class='fon bgray'><div class='bg1'><div class='bg2'><div class='bg3'><div class='bg4'><div class='bg5'><div class='bg6'><div class='bg7'><div class='bg8'>$i.";
echo' <img src="pic/main/'.$pic['storona'].'.png" alt="#"/>';
$i++;
echo" <a href="search.php?nick=$best[usr]&go=go">$best[usr]</a>
Боёв на арене: ".number_format ($best[boi])."";
if($asd==0){
echo" - <font color="red"> offline</font></div></div></div></div></div></div></div></div></div>";}else{
echo" - <font color="lime"> Online</font></div></div></div></div></div></div></div></div></div>";}
}
echo "<div class='button pad_bot_5 pad'><a href="rating.php?">    <img src='/theme/standart/images/galochka.png'/> Вернуться</a></div>";
}else{
echo"<div class='fon bgray'><div class='bg1'><div class='bg2'><div class='bg3'><div class='bg4'><div class='bg5'><div class='bg6'><div class='bg7'><div class='bg8'><b>Небыло боёв</b></div>";
}
break;
case 'igrok':
echo '<div class="zagolovok"><div class="zagolovok1"> <div class="zagolovok2"><div class="zagolovok_right"></div><div class="zagolovok_left"></div><div class="ch_name">';
echo 'Победы на арене';
echo '</div><div class="clearFix"></div></div></div></div>';
$b = mysql_query("SELECT usr,pobeda FROM users WHERE pobeda >'0' AND prava <'5' ORDER BY pobeda DESC LIMIT 0, 10");
////////////////////////////
$avto=mysql_num_rows($b);
if($avto>=1){
$i=1;
While($best = mysql_fetch_array($b))
{
$nickas = strip_tags($best[usr]);
$req = mysql_query("SELECT `storona` FROM `users` WHERE `usr` = '$nickas'");
$asd = mysql_num_rows(mysql_query("SELECT laikas, usr FROM online WHERE laikas > '$timeout' AND usr='$nickas'"));
$pic = mysql_fetch_array($req);
echo"<div class='fon bgray'><div class='bg1'><div class='bg2'><div class='bg3'><div class='bg4'><div class='bg5'><div class='bg6'><div class='bg7'><div class='bg8'>$i.";
echo' <img src="pic/main/'.$pic['storona'].'.png" alt="#"/>';
$i++;
echo" <a href="search.php?nick=$best[usr]&go=go">$best[usr]</a>
Побед: ".number_format ($best[pobeda])."";
if($asd==0){
echo" - <font color="red"> offline</font></div></div></div></div></div></div></div></div></div>";}else{
echo" - <font color="lime"> Online</font></div></div></div></div></div></div></div></div></div>";}
}
echo "<div class='button pad_bot_5 pad'><a href="rating.php?">    <img src='/theme/standart/images/galochka.png'/> Вернуться</a></div>";
}else{
echo"<div class='fon bgray'><div class='bg1'><div class='bg2'><div class='bg3'><div class='bg4'><div class='bg5'><div class='bg6'><div class='bg7'><div class='bg8'><b>Нет победителей</b></div>";
}
break;
case 'opit':
echo '<div class="zagolovok"><div class="zagolovok1"> <div class="zagolovok2"><div class="zagolovok_right"></div><div class="zagolovok_left"></div><div class="ch_name">';
echo 'Самые опытные';
echo '</div><div class="clearFix"></div></div></div></div>';
$b = mysql_query("SELECT usr,exp FROM users WHERE exp >'0' AND prava <'5' ORDER BY exp DESC LIMIT 0, 10");
////////////////////////////
$avto=mysql_num_rows($b);
if($avto>=1){
$i=1;
While($best = mysql_fetch_array($b))
{
$nickas = strip_tags($best[usr]);
$req = mysql_query("SELECT `storona` FROM `users` WHERE `usr` = '$nickas'");
$asd = mysql_num_rows(mysql_query("SELECT laikas, usr FROM online WHERE laikas > '$timeout' AND usr='$nickas' "));
$pic = mysql_fetch_array($req);
echo"<div class='fon bgray'><div class='bg1'><div class='bg2'><div class='bg3'><div class='bg4'><div class='bg5'><div class='bg6'><div class='bg7'><div class='bg8'>$i.";
echo' <img src="pic/main/'.$pic['storona'].'.png" alt="#"/>';
$i++;
echo" <a href="search.php?nick=$best[usr]&go=go">$best[usr]</a>
Опыта: ".number_format ($best[exp])."";
if($asd==0){
echo" - <font color="red"> Offline</font>";
echo '</div></div></div></div></div></div></div></div></div>';
}else{
echo" - <font color="lime"> Online</font>";
echo '</div></div></div></div></div></div></div></div></div>';
}
}
echo "<div class='button pad_bot_5 pad'><a href="rating.php?">    <img src='/theme/standart/images/galochka.png'/> Вернуться</a></div>";
}else{
echo"<b>Нет опытных</b><br/>";
}
break;
case 'lvl':
echo '<div class="zagolovok"><div class="zagolovok1"> <div class="zagolovok2"><div class="zagolovok_right"></div><div class="zagolovok_left"></div><div class="ch_name">';
echo 'Рейтинг уровней';
echo '</div><div class="clearFix"></div></div></div></div>';
$b = mysql_query("SELECT usr,lvl FROM users WHERE lvl >'0' AND prava <'5' ORDER BY lvl DESC LIMIT 0, 10");
////////////////////////////
$avto=mysql_num_rows($b);
if($avto>=1){
$i=1;
While($best = mysql_fetch_array($b))
{
$nickas = strip_tags($best[usr]);
$req = mysql_query("SELECT `storona` FROM `users` WHERE `usr` = '$nickas'");
$asd = mysql_num_rows(mysql_query("SELECT laikas, usr FROM online WHERE laikas > '$timeout' AND usr='$nickas'"));
$pic = mysql_fetch_array($req);
echo"<div class='fon bgray'><div class='bg1'><div class='bg2'><div class='bg3'><div class='bg4'><div class='bg5'><div class='bg6'><div class='bg7'><div class='bg8'>$i.";
echo' <img src="pic/main/'.$pic['storona'].'.png" alt="#"/>';
$i++;
echo" <a href="search.php?nick=$best[usr]&go=go">$best[usr]</a> <img src='pic/up.png'/> $best[lvl] ";
if($asd==0){
echo" - <font color="red"> offline</font>";
echo '</font></div></div></div></div></div></div></div></div></div>';
}else{
echo" - <font color="lime"> Online</font>";
echo '</font></div></div></div></div></div></div></div></div></div>';
}
}
echo "<div class='button pad_bot_5 pad'><a href="rating.php?">    <img src='/theme/standart/images/galochka.png'/> Вернуться</a></div>";
}else{
echo"<div class='fon bgray'><div class='bg1'><div class='bg2'><div class='bg3'><div class='bg4'><div class='bg5'><div class='bg6'><div class='bg7'><div class='bg8'><b>Нет опытных игроков</b></div>";
}
break;
///////////
///////////
case 'sila':
echo '<div class="zagolovok"><div class="zagolovok1"> <div class="zagolovok2"><div class="zagolovok_right"></div><div class="zagolovok_left"></div><div class="ch_name">';
echo 'Самые сильные';
echo '</div><div class="clearFix"></div></div></div></div>';
$b = mysql_query("SELECT usr,sila FROM users WHERE sila >'0' AND prava <'5' ORDER BY sila DESC LIMIT 0, 10");
////////////////////////////
$avto=mysql_num_rows($b);
if($avto>=1){
$i=1;
While($best = mysql_fetch_array($b))
{
$nickas = strip_tags($best[usr]);
$req = mysql_query("SELECT `storona` FROM `users` WHERE `usr` = '$nickas'");
$asd = mysql_num_rows(mysql_query("SELECT laikas, usr FROM online WHERE laikas > '$timeout' AND usr='$nickas'"));
$pic = mysql_fetch_array($req);
echo"<div class='fon bgray'><div class='bg1'><div class='bg2'><div class='bg3'><div class='bg4'><div class='bg5'><div class='bg6'><div class='bg7'><div class='bg8'>$i.";
echo' <img src="pic/main/'.$pic['storona'].'.png" alt="#"/>';
$i++;
echo" <a href="search.php?nick=$best[usr]&go=go">$best[usr]</a>
Сила: $best[sila]";
if($asd==0){
echo" - <font color="red"> offline</font>";
echo '</font></div></div></div></div></div></div></div></div></div>';
}else{
echo" - <font color="lime"> Online</font>";
echo '</font></div></div></div></div></div></div></div></div></div>';
}
}
echo "<div class='button pad_bot_5 pad'><a href="rating.php?">    <img src='/theme/standart/images/galochka.png'/> Вернуться</a></div>";
}else{
echo"<b>Нет сильных игроков</b><br/>";
}
break;
////////////////////////////
case 'lovk':
echo '<div class="zagolovok"><div class="zagolovok1"> <div class="zagolovok2"><div class="zagolovok_right"></div><div class="zagolovok_left"></div><div class="ch_name">';
echo 'Самые ловкие';
echo '</div><div class="clearFix"></div></div></div></div>';
$b = mysql_query("SELECT usr,lovk FROM users WHERE lovk >'0' AND prava <'5' ORDER BY lovk DESC LIMIT 0, 10");
////////////////////////////
$avto=mysql_num_rows($b);
if($avto>=1){
$i=1;
While($best = mysql_fetch_array($b))
{
$nickas = strip_tags($best[usr]);
$req = mysql_query("SELECT `storona` FROM `users` WHERE `usr` = '$nickas'");
$asd = mysql_num_rows(mysql_query("SELECT laikas, usr FROM online WHERE laikas > '$timeout' AND usr='$nickas'"));
$pic = mysql_fetch_array($req);
echo"<div class='fon bgray'><div class='bg1'><div class='bg2'><div class='bg3'><div class='bg4'><div class='bg5'><div class='bg6'><div class='bg7'><div class='bg8'>$i.";
echo' <img src="pic/main/'.$pic['storona'].'.png" alt="#"/>';
$i++;
echo" <a href="search.php?nick=$best[usr]&go=go">$best[usr]</a>
Ловкость: $best[lovk]";
if($asd==0){
echo" - <font color="red"> offline</font></div></div></div></div></div></div></div></div></div>";}else{
echo" - <font color="lime"> Online</font></div></div></div></div></div></div></div></div></div>";}
}
echo "<div class='button pad_bot_5 pad'><a href="rating.php?">    <img src='/theme/standart/images/galochka.png'/> Вернуться</a></div>";
}else{
echo"<div class='fon bgray'><div class='bg1'><div class='bg2'><div class='bg3'><div class='bg4'><div class='bg5'><div class='bg6'><div class='bg7'><div class='bg8'><b>Нет Ловких игроков</b></div>";
}
break;
///////////
case 'prot':
echo '<div class="zagolovok"><div class="zagolovok1"> <div class="zagolovok2"><div class="zagolovok_right"></div><div class="zagolovok_left"></div><div class="ch_name">';
echo 'Самые защищенные';
echo '</div><div class="clearFix"></div></div></div></div>';
$b = mysql_query("SELECT usr,prot FROM users WHERE prot >'0' AND prava <'5' ORDER BY prot DESC LIMIT 0, 10");
////////////////////////////
$avto=mysql_num_rows($b);
if($avto>=1){
$i=1;
While($best = mysql_fetch_array($b))
{
$nickas = strip_tags($best[usr]);
$req = mysql_query("SELECT `storona` FROM `users` WHERE `usr` = '$nickas'");
$asd = mysql_num_rows(mysql_query("SELECT laikas, usr FROM online WHERE laikas > '$timeout' AND usr='$nickas'"));
$pic = mysql_fetch_array($req);
echo"<div class='fon bgray'><div class='bg1'><div class='bg2'><div class='bg3'><div class='bg4'><div class='bg5'><div class='bg6'><div class='bg7'><div class='bg8'>$i.";
echo' <img src="pic/main/'.$pic['storona'].'.png" alt="#"/>';
$i++;
echo" <a href="search.php?nick=$best[usr]&go=go">$best[usr]</a>
Защита: ".number_format ($best[prot])."";
if($asd==0){
echo" - <font color="red"> offline</font></div></div></div></div></div></div></div></div></div>";}else{
echo" - <font color="lime"> Online</font></div></div></div></div></div></div></div></div></div>";}
}
echo "<div class='button pad_bot_5 pad'><a href="rating.php?">    <img src='/theme/standart/images/galochka.png'/> Вернуться</a></div>";
}else{
echo"<div class='fon bgray'><div class='bg1'><div class='bg2'><div class='bg3'><div class='bg4'><div class='bg5'><div class='bg6'><div class='bg7'><div class='bg8'><b>Нет физ. защищёных игроков</b></div>";
}
break;
///////////
case 'krit':
echo '<div class="zagolovok"><div class="zagolovok1"> <div class="zagolovok2"><div class="zagolovok_right"></div><div class="zagolovok_left"></div><div class="ch_name">';
echo 'Самые точные';
echo '</div><div class="clearFix"></div></div></div></div>';
$b = mysql_query("SELECT usr,krit FROM users WHERE krit >'0' AND prava <'5' ORDER BY krit DESC LIMIT 0, 10");
////////////////////////////
$avto=mysql_num_rows($b);
if($avto>=1){
$i=1;
While($best = mysql_fetch_array($b))
{
$nickas = strip_tags($best[usr]);
$req = mysql_query("SELECT `storona` FROM `users` WHERE `usr` = '$nickas'");
$asd = mysql_num_rows(mysql_query("SELECT laikas, usr FROM online WHERE laikas > '$timeout' AND usr='$nickas'"));
$pic = mysql_fetch_array($req);
echo"<div class='fon bgray'><div class='bg1'><div class='bg2'><div class='bg3'><div class='bg4'><div class='bg5'><div class='bg6'><div class='bg7'><div class='bg8'>$i.";
echo' <img src="pic/main/'.$pic['storona'].'.png" alt="#"/>';
$i++;
echo" <a href="search.php?nick=$best[usr]&go=go">$best[usr]</a>
Точность: $best[krit] %";
if($asd==0){
echo" - <font color="red"> offline</font></div></div></div></div></div></div></div></div></div>";}else{
echo" - <font color="lime"> Online</font></div></div></div></div></div></div></div></div></div>";}
}
echo "<div class='button pad_bot_5 pad'><a href="rating.php?">    <img src='/theme/standart/images/galochka.png'/> Вернуться</a></div>";
}else{
echo"<div class='fon bgray'><div class='bg1'><div class='bg2'><div class='bg3'><div class='bg4'><div class='bg5'><div class='bg6'><div class='bg7'><div class='bg8'><b>Нет точных</b></div>";
}
break;
///////////
case 'ukrit':
echo '<div class="zagolovok"><div class="zagolovok1"> <div class="zagolovok2"><div class="zagolovok_right"></div><div class="zagolovok_left"></div><div class="ch_name">';
echo 'Самые сокрушительные';
echo '</div><div class="clearFix"></div></div></div></div>';
$b = mysql_query("SELECT usr,ukrit FROM users WHERE ukrit >'0' AND prava <'5' ORDER BY ukrit DESC LIMIT 0, 10");
////////////////////////////
$avto=mysql_num_rows($b);
if($avto>=1){
$i=1;
While($best = mysql_fetch_array($b))
{
$nickas = strip_tags($best[usr]);
$req = mysql_query("SELECT `storona` FROM `users` WHERE `usr` = '$nickas'");
$asd = mysql_num_rows(mysql_query("SELECT laikas, usr FROM online WHERE laikas > '$timeout' AND usr='$nickas'"));
$pic = mysql_fetch_array($req);
echo"<div class='fon bgray'><div class='bg1'><div class='bg2'><div class='bg3'><div class='bg4'><div class='bg5'><div class='bg6'><div class='bg7'><div class='bg8'>$i.";
echo' <img src="pic/main/'.$pic['storona'].'.png" alt="#"/>';
$i++;
echo" <a href="search.php?nick=$best[usr]&go=go">$best[usr]</a>
Сокрушение: $best[ukrit] %";
if($asd==0){
echo" - <font color="red"> offline</font></div></div></div></div></div></div></div></div></div>";}else{
echo" - <font color="lime"> Online</font></div></div></div></div></div></div></div></div></div>";}
}
echo "<div class='button pad_bot_5 pad'><a href="rating.php?">    <img src='/theme/standart/images/galochka.png'/> Вернуться</a></div>";
}else{
echo"<div class='fon bgray'><div class='bg1'><div class='bg2'><div class='bg3'><div class='bg4'><div class='bg5'><div class='bg6'><div class='bg7'><div class='bg8'><b>Нет сокрушителей</b></div>";
}
break;
///////////
case 'money':
echo '<div class="zagolovok"><div class="zagolovok1"> <div class="zagolovok2"><div class="zagolovok_right"></div><div class="zagolovok_left"></div><div class="ch_name">';
echo 'Самые богатые';
echo '</div><div class="clearFix"></div></div></div></div>';
$b = mysql_query("SELECT usr,money FROM users WHERE money >0 AND prava <'5' 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 "<br/>• <a href="rating.php?"> Вернуться</a><br>";
break;
///////////
case 'gald':
$b = mysql_query("SELECT usr,gold FROM users WHERE gold >0 AND prava <'5' ORDER BY gold 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[gold]</b>]<br/>";
$i++;
}
}else{
echo"<b>Нет богачей</b><br/>";
}
echo"<a href="rating.php?">Назад</a>";
break;
///////////
}
include($path.'files/down.php');
include($path.'files/meny.php');
?>