Файл: dev/top.php
Строк: 1615
<?
include_once '../sys/core/start.php';
include_once '../sys/core/compress.php';
include_once '../sys/core/sess.php';
include_once '../sys/core/home.php';
include_once '../sys/core/settings.php';
include_once '../sys/core/db_connect.php';
include_once '../sys/core/ipua.php';
include_once '../sys/core/fnc.php';
include_once '../sys/core/user.php';
include_once '../sys/inc/fnc_game.php';
include_once '../sys/inc/thead.php';
include_once '../sys/inc/uhead.php';
only_reg();
if(isset($_GET['all']))
{
echo "<table class='wdt gray-table'><tr>";
echo "<td width='50%'><form action='/dev/top.php?level' method='post'><input class='yes-btn' type='submit' value='Уровни'></form></td><td>";
echo "<input class='inactive-btn' type='submit' value='Все гонщики'></td><tr><td>";
echo "<form action='/dev/top.php?to' method='post'><input class='yes-btn' type='submit' value='Топ по Т.О'></form></td><td>";
echo "<form action='/dev/top.php?bog' method='post'><input class='yes-btn' type='submit' value='Богачи'></form></td></tr><td>";
echo "<form action='/dev/top.php?like' method='post'><input class='yes-btn' type='submit' value='Лайки'></form></td><td>";
echo "<form action='/dev/top.php?fishka' method='post'><input class='yes-btn' type='submit' value='Фишки'></form></td><tr><td>";
echo "<form action='/dev/top.php' method='post'><input class='yes-btn' type='submit' value='Уровня'></form></td><td>";
echo "<input class='inactive-btn' type='submit' value='Общий'></td><tr><td>";
echo "</td></tr></table>";
echo "<table class='wdt brown-header'><tr><td align='left'>Общий топ: </td></tr></table>";
$q=mysql_query("SELECT * FROM `user` ORDER BY `rating` DESC LIMIT 10");
while($post=mysql_fetch_array($q)){
$post_user=mysql_fetch_array(mysql_query("SELECT * FROM `taxi_user` WHERE `id_user` = '".$post['id']."'"));
$post_user_taxi=mysql_fetch_array(mysql_query("SELECT * FROM `taxi` WHERE `id` = '".$post_user['id_taxi']."'"));
$garage=mysql_fetch_array(mysql_query("SELECT * FROM `garage` WHERE `id` = '$post[car_id]'"));
$stock=$garage['stock_power']+1061;
$settuning=$garage['power'];
if($user['id']==$post['id'])
{
$ss=1;
}
else
{
$ss=0;
}
if($post['nitro_bonus']>0){
$post_n2o_power=$post['nitro_bonus'];
}
else
{
$post_n2o_power=0;
}
if($post_user_taxi['bonus_power']>0){
$post_taxi_bonus_power=$post_user_taxi['bonus_power'];
}
else
{
$post_taxi_bonus_power=0;
}
$post_power=$garage['power']+$post_n2o_power+$post_taxi_bonus_power;
if($post['id']==$user['id']){
echo "<table class='wdt green-table'>";
}
else
{
echo "<table class='wdt gray-table'>";
}
echo "<tr style='border-bottom:1px #252525 solid;'><td class='white' align='center' width='20%' style='padding-right: 5px;'><img src='/style/img/avatars/$post[avatar].png' alt='avatar'></td>";
echo "<td class='white' align='center' width='40%'><img class='wdt' src='/style/img/car/$garage[screen].png' alt='car'>";
if($garage['neon']!=0){
echo "<img class='wdt' style='margin-top: -15px;' src='/style/img/images/neon/$garage[neon].png' alt='neon'>";
}
else
{
echo "<img class='wdt' style='margin-top: -15px;' src='/style/img/images/car_shadow.png' alt='neon'>";
}
if($garage['gos_region']>0)
{
if($garage['gos_region_transit']>0)
{
if($garage['gos_region']<10)
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]0$garage[gos_region]&b=7' alt='number'><br/>";
}
else
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]$garage[gos_region]&b=7' alt='number'><br/>";
}
}
else
{
if($garage['gos_region']<10)
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]0$garage[gos_region]&b=1' alt='number'><br/>";
}
else
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]$garage[gos_region]&b=1' alt='number'><br/>";
}
}
}
echo "</td><td class='white' align='left'>";
if($post_user_taxi)
{
echo "<b class='yellow'>[$post_user_taxi[label]]</b> ";
}
echo "$post[nick]<br><img src='/style/img/icons/rating.png' alt='rating'><b class='yellow'>".m_format($post['rating'])."</b><br>";
if($settuning >= $stock)
{
echo "<img src='/style/img/icons/fire.png'>";
}
else
{
echo "<img src='/style/img/icons/power.png'>";
}
echo "<b class='orange'>$post_power л.с.</b>";
echo "<br><img src='/style/img/icons/garage.png' alt='Garage'><a class='white' style='font-size: 11pt;' href='/dev/info.php?id=$post[id]'>Гараж</a><br></td></tr>";
}
$count_all = mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `rating` > '".$user['rating']."'"),0);
$count_all_mesto=$count_all+1;
if($count_all>9)
{
echo "<tr><td colspan='4' class='point-continue'>... ... ...</td></tr>";
$stock=$mycar['stock_power']+1061;
$settuning=$mycar['power'];
if($user['nitro_bonus']>0){
$n2o_power=$user['nitro_bonus'];
}
else
{
$n2o_power=0;
}
if($mt['bonus_power']>0){
$my_taxi_bonus_power=$mt['bonus_power'];
}
else
{
$my_taxi_bonus_power=0;
}
$m_power=$mycar['power']+$n2o_power+$my_taxi_bonus_power;
echo "<table class='wdt green-table'>";
echo "<tr style='border-bottom:1px #252525 solid;'><td class='white' align='center' width='20%' style='padding-right: 5px;'><img src='/style/img/avatars/$user[avatar].png' alt='avatar'></td>";
echo "<td class='white' align='center' width='40%'><img class='wdt' src='/style/img/car/$mycar[screen].png' alt='car'>";
if($mycar['neon']!=0){
echo "<img class='wdt' style='margin-top: -15px;' src='/style/img/images/neon/$mycar[neon].png' alt='neon'>";
}
else
{
echo "<img class='wdt' style='margin-top: -15px;' src='/style/img/images/car_shadow.png' alt='neon'>";
}
if($mycar['gos_region']>0)
{
if($mycar['gos_region_transit']>0)
{
if($mycar['gos_region']<10)
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$mycar[gos_bb_one]$mycar[gos_number]$mycar[gos_bb_two]$mycar[gos_bb_free]0$mycar[gos_region]&b=7' alt='number'><br/>";
}
else
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$mycar[gos_bb_one]$mycar[gos_number]$mycar[gos_bb_two]$mycar[gos_bb_free]$mycar[gos_region]&b=7' alt='number'><br/>";
}
}
else
{
if($mycar['gos_region']<10)
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$mycar[gos_bb_one]$mycar[gos_number]$mycar[gos_bb_two]$mycar[gos_bb_free]0$mycar[gos_region]&b=1' alt='number'><br/>";
}
else
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$mycar[gos_bb_one]$mycar[gos_number]$mycar[gos_bb_two]$mycar[gos_bb_free]$mycar[gos_region]&b=1' alt='number'><br/>";
}
}
}
echo "</td><td class='white' align='left'>";
if($mt && $mtu)
{
echo "<b class='yellow'>[$mt[label]]</b> ";
}
echo "$user[nick]<br><img src='/style/img/icons/rating.png' alt='rating'><b class='yellow'>".m_format($user['rating'])."</b><br>";
if($settuning >= $stock)
{
echo "<img src='/style/img/icons/fire.png'>";
}
else
{
echo "<img src='/style/img/icons/power.png'>";
}
echo "<b class='orange'>$m_power л.с.</b>";
echo "<br><b class='red'>$count_all_mesto место</b><br></td></tr>";
}
}
elseif(isset($_GET['level']))
{
echo "<table class='wdt gray-table'><tr>";
echo "<td width='50%'><input class='inactive-btn' type='submit' value='Уровни'></form></td><td>";
echo "<form action='/dev/top.php?all' method='post'><input class='yes-btn' type='submit' value='Все гонщики'></form></td><tr><td>";
echo "<form action='/dev/top.php?to' method='post'><input class='yes-btn' type='submit' value='Топ по Т.О'></form></td><td>";
echo "<form action='/dev/top.php?bog' method='post'><input class='yes-btn' type='submit' value='Богачи'></form></td></tr><td>";
echo "<form action='/dev/top.php?like' method='post'><input class='yes-btn' type='submit' value='Лайки'></form></td><td>";
echo "<form action='/dev/top.php?fishka' method='post'><input class='yes-btn' type='submit' value='Фишки'></td><tr><td>";
echo "</td></tr></table>";
echo "<table class='wdt brown-header'><tr><td align='left'>Самые богатые: </td></tr></table>";
$q=mysql_query("SELECT * FROM `user` ORDER BY `level` DESC LIMIT 10");
while($post=mysql_fetch_array($q)){
$post_user=mysql_fetch_array(mysql_query("SELECT * FROM `taxi_user` WHERE `id_user` = '".$post['id']."'"));
$post_user_taxi=mysql_fetch_array(mysql_query("SELECT * FROM `taxi` WHERE `id` = '".$post_user['id_taxi']."'"));
$garage=mysql_fetch_array(mysql_query("SELECT * FROM `garage` WHERE `id` = '$post[car_id]'"));
if($post['id']==$user['id']){
echo "<table class='wdt green-table'>";
}
else
{
echo "<table class='wdt gray-table'>";
}
echo "<tr style='border-bottom:1px #252525 solid;'><td class='white' align='center' width='20%' style='padding-right: 5px;'><img src='/style/img/avatars/$post[avatar].png' alt='avatar'></td>";
echo "<td class='white' align='center' width='40%'><img class='wdt' src='/style/img/car/$garage[screen].png' alt='car'>";
if($garage['neon']!=0){
echo "<img class='wdt' style='margin-top: -15px;' src='/style/img/images/neon/$garage[neon].png' alt='neon'>";
}
else
{
echo "<img class='wdt' style='margin-top: -15px;' src='/style/img/images/car_shadow.png' alt='neon'>";
}
if($garage['gos_region']>0)
{
if($garage['gos_region_transit']>0)
{
if($garage['gos_region']<10)
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]0$garage[gos_region]&b=7' alt='number'><br/>";
}
else
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]$garage[gos_region]&b=7' alt='number'><br/>";
}
}
else
{
if($garage['gos_region']<10)
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]0$garage[gos_region]&b=1' alt='number'><br/>";
}
else
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]$garage[gos_region]&b=1' alt='number'><br/>";
}
}
}
echo "</td><td class='white' align='left'>";
if($post_user_taxi)
{
echo "<b class='yellow'>[$post_user_taxi[label]]</b> ";
}
echo "$post[nick]<br><b class='white'>Ур. ".m_format($post['level'])."</b>";
echo "<br><img src='/style/img/icons/garage.png' alt='Garage'><a class='white' style='font-size: 11pt;' href='/dev/info.php?id=$post[id]'>Гараж</a><br></td></tr>";
}
$count_level = mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `level` > '".$user['level']."'"),0);
$count_level_mesto=$count_level+1;
if($count_level>9)
{
echo "<tr><td colspan='4' class='point-continue'>... ... ...</td></tr>";
$stock=$mycar['stock_power']+1061;
$settuning=$mycar['power'];
if($user['nitro_bonus']>0){
$n2o_power=$user['nitro_bonus'];
}
else
{
$n2o_power=0;
}
if($mt['bonus_power']>0){
$my_taxi_bonus_power=$mt['bonus_power'];
}
else
{
$my_taxi_bonus_power=0;
}
$m_power=$mycar['power']+$n2o_power+$my_taxi_bonus_power;
echo "<table class='wdt green-table'>";
echo "<tr style='border-bottom:1px #252525 solid;'><td class='white' align='center' width='20%' style='padding-right: 5px;'><img src='/style/img/avatars/$user[avatar].png' alt='avatar'></td>";
echo "<td class='white' align='center' width='40%'><img class='wdt' src='/style/img/car/$mycar[screen].png' alt='car'>";
if($mycar['neon']!=0){
echo "<img class='wdt' style='margin-top: -15px;' src='/style/img/images/neon/$mycar[neon].png' alt='neon'>";
}
else
{
echo "<img class='wdt' style='margin-top: -15px;' src='/style/img/images/car_shadow.png' alt='neon'>";
}
if($mycar['gos_region']>0)
{
if($mycar['gos_region_transit']>0)
{
if($mycar['gos_region']<10)
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$mycar[gos_bb_one]$mycar[gos_number]$mycar[gos_bb_two]$mycar[gos_bb_free]0$mycar[gos_region]&b=7' alt='number'><br/>";
}
else
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$mycar[gos_bb_one]$mycar[gos_number]$mycar[gos_bb_two]$mycar[gos_bb_free]$mycar[gos_region]&b=7' alt='number'><br/>";
}
}
else
{
if($mycar['gos_region']<10)
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$mycar[gos_bb_one]$mycar[gos_number]$mycar[gos_bb_two]$mycar[gos_bb_free]0$mycar[gos_region]&b=1' alt='number'><br/>";
}
else
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$mycar[gos_bb_one]$mycar[gos_number]$mycar[gos_bb_two]$mycar[gos_bb_free]$mycar[gos_region]&b=1' alt='number'><br/>";
}
}
}
echo "</td><td class='white' align='left'>";
if($mt && $mtu)
{
echo "<b class='yellow'>[$mt[label]]</b> ";
}
echo "$user[nick]<br><b class='white'>Ур. $user[level]</b>";
echo "<br><b class='red'>$count_level_mesto место</b><br></td></tr>";
}
}
elseif(isset($_GET['to']))
{
echo "<table class='wdt gray-table'><tr>";
echo "<td width='50%'><form action='/dev/top.php?level' method='post'><input class='yes-btn' type='submit' value='Уровни'></form></td><td>";
echo "<form action='/dev/top.php?all' method='post'><input class='yes-btn' type='submit' value='Все гонщики'></form></td><tr><td>";
echo "<input class='inactive-btn' type='submit' value='Топ по Т.О'></form></td><td>";
echo "<form action='/dev/top.php?bog' method='post'><input class='yes-btn' type='submit' value='Богачи'></form></td></tr><td>";
echo "<form action='/dev/top.php?like' method='post'><input class='yes-btn' type='submit' value='Лайки'></form></td><td>";
echo "<form action='/dev/top.php?fishka' method='post'><input class='yes-btn' type='submit' value='Фишки'></td><tr><td>";
echo "</td></tr></table>";
echo "<table class='wdt brown-header'><tr><td align='left'>Лучшие турнирщики: </td></tr></table>";
$q=mysql_query("SELECT * FROM `user` ORDER BY `turnir_money` DESC LIMIT 10");
while($post=mysql_fetch_array($q)){
$post_user=mysql_fetch_array(mysql_query("SELECT * FROM `taxi_user` WHERE `id_user` = '".$post['id']."'"));
$post_user_taxi=mysql_fetch_array(mysql_query("SELECT * FROM `taxi` WHERE `id` = '".$post_user['id_taxi']."'"));
$garage=mysql_fetch_array(mysql_query("SELECT * FROM `garage` WHERE `id` = '$post[car_id]'"));
if($post['id']==$user['id']){
echo "<table class='wdt green-table'>";
}
else
{
echo "<table class='wdt gray-table'>";
}
echo "<tr style='border-bottom:1px #252525 solid;'><td class='white' align='center' width='20%' style='padding-right: 5px;'><img src='/style/img/avatars/$post[avatar].png' alt='avatar'></td>";
echo "<td class='white' align='center' width='40%'><img class='wdt' src='/style/img/car/$garage[screen].png' alt='car'>";
if($garage['neon']!=0){
echo "<img class='wdt' style='margin-top: -15px;' src='/style/img/images/neon/$garage[neon].png' alt='neon'>";
}
else
{
echo "<img class='wdt' style='margin-top: -15px;' src='/style/img/images/car_shadow.png' alt='neon'>";
}
if($garage['gos_region']>0)
{
if($garage['gos_region_transit']>0)
{
if($garage['gos_region']<10)
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]0$garage[gos_region]&b=7' alt='number'><br/>";
}
else
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]$garage[gos_region]&b=7' alt='number'><br/>";
}
}
else
{
if($garage['gos_region']<10)
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]0$garage[gos_region]&b=1' alt='number'><br/>";
}
else
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]$garage[gos_region]&b=1' alt='number'><br/>";
}
}
}
echo "</td><td class='white' align='left'>";
if($post_user_taxi)
{
echo "<b class='yellow'>[$post_user_taxi[label]]</b> ";
}
echo "$post[nick]<br><img src='/style/img/icons/hp.png' alt='rating'><b class='yellow'>".m_format($post['turnir_money'])."</b>";
echo "<br><img src='/style/img/icons/garage.png' alt='Garage'><a class='white' style='font-size: 11pt;' href='/dev/info.php?id=$post[id]'>Гараж</a><br></td></tr>";
}
$count_to = mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `turnir_money` > '".$user['turnir_money']."'"),0);
$count_to_mesto=$count_to+1;
if($count_to>9)
{
echo "<tr><td colspan='4' class='point-continue'>... ... ...</td></tr>";
$stock=$mycar['stock_power']+1061;
$settuning=$mycar['power'];
if($user['nitro_bonus']>0){
$n2o_power=$user['nitro_bonus'];
}
else
{
$n2o_power=0;
}
if($mt['bonus_power']>0){
$my_taxi_bonus_power=$mt['bonus_power'];
}
else
{
$my_taxi_bonus_power=0;
}
$m_power=$mycar['power']+$n2o_power+$my_taxi_bonus_power;
echo "<table class='wdt green-table'>";
echo "<tr style='border-bottom:1px #252525 solid;'><td class='white' align='center' width='20%' style='padding-right: 5px;'><img src='/style/img/avatars/$user[avatar].png' alt='avatar'></td>";
echo "<td class='white' align='center' width='40%'><img class='wdt' src='/style/img/car/$mycar[screen].png' alt='car'>";
if($mycar['neon']!=0){
echo "<img class='wdt' style='margin-top: -15px;' src='/style/img/images/neon/$mycar[neon].png' alt='neon'>";
}
else
{
echo "<img class='wdt' style='margin-top: -15px;' src='/style/img/images/car_shadow.png' alt='neon'>";
}
if($mycar['gos_region']>0)
{
if($mycar['gos_region_transit']>0)
{
if($mycar['gos_region']<10)
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$mycar[gos_bb_one]$mycar[gos_number]$mycar[gos_bb_two]$mycar[gos_bb_free]0$mycar[gos_region]&b=7' alt='number'><br/>";
}
else
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$mycar[gos_bb_one]$mycar[gos_number]$mycar[gos_bb_two]$mycar[gos_bb_free]$mycar[gos_region]&b=7' alt='number'><br/>";
}
}
else
{
if($mycar['gos_region']<10)
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$mycar[gos_bb_one]$mycar[gos_number]$mycar[gos_bb_two]$mycar[gos_bb_free]0$mycar[gos_region]&b=1' alt='number'><br/>";
}
else
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$mycar[gos_bb_one]$mycar[gos_number]$mycar[gos_bb_two]$mycar[gos_bb_free]$mycar[gos_region]&b=1' alt='number'><br/>";
}
}
}
echo "</td><td class='white' align='left'>";
if($mt && $mtu)
{
echo "<b class='yellow'>[$mt[label]]</b> ";
}
echo "$user[nick]<br><img src='/style/img/icons/hp.png' alt='rating'><b class='yellow'>".m_format($user['turnir_money'])."</b>";
echo "<br><b class='red'>$count_to_mesto место</b><br></td></tr>";
}
}
elseif(isset($_GET['like']))
{
echo "<table class='wdt gray-table'><tr>";
echo "<td width='50%'><form action='/dev/top.php' method='post'><input class='yes-btn' type='submit' value='Уровня'></form></td><td>";
echo "<form action='/dev/top.php?all' method='post'><input class='yes-btn' type='submit' value='Все гонщики'></form></td><tr><td>";
echo "<form action='/dev/top.php?to' method='post'><input class='yes-btn' type='submit' value='Топ по Т.О'></form></td><td>";
echo "<form action='/dev/top.php?bog' method='post'><input class='yes-btn' type='submit' value='Богачи'></form></td></tr><td>";
echo "<input class='inactive-btn' type='submit' value='Лайки'></td><td>";
echo "<form action='/dev/top.php?fishka' method='post'><input class='yes-btn' type='submit' value='Фишки'></form></td><tr><td>";
echo "</td></tr></table>";
echo "<table class='wdt brown-header'><tr><td align='left'>Самые крутые: </td></tr></table>";
$q=mysql_query("SELECT * FROM `user` WHERE `likes_garage`!='0' ORDER BY `likes_garage` DESC LIMIT 10");
while($post=mysql_fetch_array($q)){
$post_user=mysql_fetch_array(mysql_query("SELECT * FROM `taxi_user` WHERE `id_user` = '".$post['id']."'"));
$post_user_taxi=mysql_fetch_array(mysql_query("SELECT * FROM `taxi` WHERE `id` = '".$post_user['id_taxi']."'"));
$garage=mysql_fetch_array(mysql_query("SELECT * FROM `garage` WHERE `id` = '$post[car_id]'"));
$stock=$garage['stock_power']+1061;
$settuning=$garage['power'];
if($user['id']==$post['id'])
{
$ss=1;
}
else
{
$ss=0;
}
if($post['nitro_bonus']>0){
$post_n2o_power=$post['nitro_bonus'];
}
else
{
$post_n2o_power=0;
}
if($post_user_taxi['bonus_power']>0){
$post_taxi_bonus_power=$post_user_taxi['bonus_power'];
}
else
{
$post_taxi_bonus_power=0;
}
$post_power=$garage['power']+$post_n2o_power+$post_taxi_bonus_power;
if($post['id']==$user['id']){
echo "<table class='wdt gray-table'>";
}
else
{
echo "<table class='wdt gray-table'>";
}
echo "<tr style='border-bottom:1px #252525 solid;'><td class='white' align='center' width='20%' style='padding-right: 5px;'><img src='/style/img/avatars/$post[avatar].png' alt='avatar'></td>";
echo "<td class='white' align='center' width='40%'><img class='wdt' src='/style/img/car/$garage[screen].png' alt='car'>";
if($garage['neon']!=0){
echo "<img class='wdt' style='margin-top: -15px;' src='/style/img/images/neon/$garage[neon].png' alt='neon'>";
}
else
{
echo "<img class='wdt' style='margin-top: -15px;' src='/style/img/images/car_shadow.png' alt='neon'>";
}
if($garage['gos_region']>0)
{
if($garage['gos_region_transit']>0)
{
if($garage['gos_region']<10)
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]$garage[gos_region]&b=$garage[gos_region_transit]' alt='number'><br/>";
}
else
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]$garage[gos_region]&b=$garage[gos_region_transit]' alt='number'><br/>";
}
}
else
{
if($garage['gos_region']<10)
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]$garage[gos_region]&b=1' alt='number'><br/>";
}
else
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]$garage[gos_region]&b=1' alt='number'><br/>";
}
}
}
echo "</td><td class='white' align='left'>";
if($post_user_taxi)
{
echo "<b class='yellow'>[$post_user_taxi[label]]</b> ";
}
echo "$post[nick]<br><img src='/style/img/icons/rating.png' alt='rating'><b class='yellow'>".m_format($post['rating'])."</b><br>";
echo "
<table class='cool-table' style=' width: 64px;'><tbody><tr>
<td align='center' style='padding: 3px'><img src='/style/img/icons/like.png'></td>
<td align='center' style=' padding: 3px 4px 1px 0px;'>".m_format($post['likes_garage'])."</td>
</tr></tbody></table>
";
if($settuning >= $stock)
{
echo "<img src='/style/img/icons/fire.png'>";
}
else
{
echo "<img src='/style/img/icons/power.png'>";
}
echo "<b class='orange'>$post_power л.с.</b>";
echo "<br><img src='/style/img/icons/garage.png' alt='Garage'><a class='white' style='font-size: 11pt;' href='/dev/info.php?id=$post[id]'>Гараж</a><br></td></tr>";
}
$count_all = mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `likes_garage` > '".$user['likes_garage']."'"),0);
$count_all_mesto=$count_all+1;
if($count_all>9)
{
echo "<tr><td colspan='4' class='point-continue'>... ... ...</td></tr>";
$stock=$mycar['stock_power']+1061;
$settuning=$mycar['power'];
if($user['nitro_bonus']>0){
$n2o_power=$user['nitro_bonus'];
}
else
{
$n2o_power=0;
}
if($mt['bonus_power']>0){
$my_taxi_bonus_power=$mt['bonus_power'];
}
else
{
$my_taxi_bonus_power=0;
}
$m_power=$mycar['power']+$n2o_power+$my_taxi_bonus_power;
echo "<table class='wdt green-table'>";
echo "<tr style='border-bottom:1px #252525 solid;'><td class='white' align='center' width='20%' style='padding-right: 5px;'><img src='/style/img/avatars/$user[avatar].png' alt='avatar'></td>";
echo "<td class='white' align='center' width='40%'><img class='wdt' src='/style/img/car/$mycar[screen].png' alt='car'>";
if($mycar['neon']!=0){
echo "<img class='wdt' style='margin-top: -15px;' src='/style/img/images/neon/$mycar[neon].png' alt='neon'>";
}
else
{
echo "<img class='wdt' style='margin-top: -15px;' src='/style/img/images/car_shadow.png' alt='neon'>";
}
if($mycar['gos_region']>0)
{
if($mycar['gos_region_transit']>0)
{
if($mycar['gos_region']<10)
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$mycar[gos_bb_one]$mycar[gos_number]$mycar[gos_bb_two]$mycar[gos_bb_free]0$mycar[gos_region]&b=$garage[gos_region_transit]' alt='number'><br/>";
}
else
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$mycar[gos_bb_one]$mycar[gos_number]$mycar[gos_bb_two]$mycar[gos_bb_free]$mycar[gos_region]&b=$garage[gos_region_transit]' alt='number'><br/>";
}
}
else
{
if($mycar['gos_region']<10)
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$mycar[gos_bb_one]$mycar[gos_number]$mycar[gos_bb_two]$mycar[gos_bb_free]0$mycar[gos_region]&b=1' alt='number'><br/>";
}
else
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$mycar[gos_bb_one]$mycar[gos_number]$mycar[gos_bb_two]$mycar[gos_bb_free]$mycar[gos_region]&b=1' alt='number'><br/>";
}
}
}
echo "</td><td class='white' align='left'>";
if($mt && $mtu)
{
echo "<b class='yellow'>[$mt[label]]</b> ";
}
echo "$user[nick]<br><img src='/style/img/icons/like.png' alt='rating'><b class='white'>".m_format($user['likes_garage'])."</b><br>";
if($settuning >= $stock)
{
echo "<img src='/style/img/icons/fire.png'>";
}
else
{
echo "<img src='/style/img/icons/power.png'>";
}
echo "<b class='orange'>$m_power л.с.</b>";
echo "<br><b class='red'>$count_all_mesto место</b><br></td></tr>";
}
}
elseif(isset($_GET['fishka']))
{
echo "<table class='wdt gray-table'><tr>";
echo "<td width='50%'><form action='/dev/top.php?level' method='post'><input class='yes-btn' type='submit' value='Уровни'></form></td><td>";
echo "<form action='/dev/top.php?all' method='post'><input class='yes-btn' type='submit' value='Все гонщики'></form></td><tr><td>";
echo "<form action='/dev/top.php?to' method='post'><input class='yes-btn' type='submit' value='Топ по Т.О'></form><td>";
echo "<form action='/dev/top.php?bog' method='post'><input class='yes-btn' type='submit' value='Богачи'></form></td><tr><td>";
echo "<form action='/dev/top.php?like' method='post'><input class='yes-btn' type='submit' value='Лайки'></form></td><td>";
echo "<input class='inactive-btn' type='submit' value='Фишки'></td><tr><td>";
echo "</td></tr></table>";
echo "<table class='wdt brown-header'><tr><td align='left'>Игроки с азартом: </td></tr></table>";
$q=mysql_query("SELECT * FROM `user` ORDER BY `fishka` DESC LIMIT 10");
while($post=mysql_fetch_array($q)){
$post_user=mysql_fetch_array(mysql_query("SELECT * FROM `taxi_user` WHERE `id_user` = '".$post['id']."'"));
$post_user_taxi=mysql_fetch_array(mysql_query("SELECT * FROM `taxi` WHERE `id` = '".$post_user['id_taxi']."'"));
$garage=mysql_fetch_array(mysql_query("SELECT * FROM `garage` WHERE `id` = '$post[car_id]'"));
if($post['id']==$user['id']){
echo "<table class='wdt green-table'>";
}
else
{
echo "<table class='wdt gray-table'>";
}
echo "<tr style='border-bottom:1px #252525 solid;'><td class='white' align='center' width='20%' style='padding-right: 5px;'><img src='/style/img/avatars/$post[avatar].png' alt='avatar'></td>";
echo "<td class='white' align='center' width='40%'><img class='wdt' src='/style/img/car/$garage[screen].png' alt='car'>";
if($garage['neon']!=0){
echo "<img class='wdt' style='margin-top: -15px;' src='/style/img/images/neon/$garage[neon].png' alt='neon'>";
}
else
{
echo "<img class='wdt' style='margin-top: -15px;' src='/style/img/images/car_shadow.png' alt='neon'>";
}
if($garage['gos_region']>0)
{
if($garage['gos_region_transit']>0)
{
if($garage['gos_region']<10)
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]0$garage[gos_region]&b=7' alt='number'><br/>";
}
else
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]$garage[gos_region]&b=7' alt='number'><br/>";
}
}
else
{
if($garage['gos_region']<10)
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]0$garage[gos_region]&b=1' alt='number'><br/>";
}
else
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]$garage[gos_region]&b=1' alt='number'><br/>";
}
}
}
echo "</td><td class='white' align='left'>";
if($post_user_taxi)
{
echo "<b class='yellow'>[$post_user_taxi[label]]</b> ";
}
echo "$post[nick]";
echo "<br><img src='/style/img/icons/fishka.png' alt='rating'><b class='yellow'>".m_format($post['fishka'])."</b>";
echo "<br><img src='/style/img/icons/garage.png' alt='Garage'><a class='white' style='font-size: 11pt;' href='/dev/info.php?id=$post[id]'>Гараж</a><br></td></tr>";
}
$count_fishka = mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `fishka` > '".$user['fishka']."'"),0);
$count_fishka_mesto=$count_fishka+1;
if($count_fishka>9)
{
echo "<tr><td colspan='4' class='point-continue'>... ... ...</td></tr>";
$stock=$mycar['stock_power']+1061;
$settuning=$mycar['power'];
if($user['nitro_bonus']>0){
$n2o_power=$user['nitro_bonus'];
}
else
{
$n2o_power=0;
}
if($mt['bonus_power']>0){
$my_taxi_bonus_power=$mt['bonus_power'];
}
else
{
$my_taxi_bonus_power=0;
}
$m_power=$mycar['power']+$n2o_power+$my_taxi_bonus_power;
echo "<table class='wdt green-table'>";
echo "<tr style='border-bottom:1px #252525 solid;'><td class='white' align='center' width='20%' style='padding-right: 5px;'><img src='/style/img/avatars/$user[avatar].png' alt='avatar'></td>";
echo "<td class='white' align='center' width='40%'><img class='wdt' src='/style/img/car/$mycar[screen].png' alt='car'>";
if($mycar['neon']!=0){
echo "<img class='wdt' style='margin-top: -15px;' src='/style/img/images/neon/$mycar[neon].png' alt='neon'>";
}
else
{
echo "<img class='wdt' style='margin-top: -15px;' src='/style/img/images/car_shadow.png' alt='neon'>";
}
if($mycar['gos_region']>0)
{
if($mycar['gos_region_transit']>0)
{
if($mycar['gos_region']<10)
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$mycar[gos_bb_one]$mycar[gos_number]$mycar[gos_bb_two]$mycar[gos_bb_free]0$mycar[gos_region]&b=7' alt='number'><br/>";
}
else
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$mycar[gos_bb_one]$mycar[gos_number]$mycar[gos_bb_two]$mycar[gos_bb_free]$mycar[gos_region]&b=7' alt='number'><br/>";
}
}
else
{
if($mycar['gos_region']<10)
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$mycar[gos_bb_one]$mycar[gos_number]$mycar[gos_bb_two]$mycar[gos_bb_free]0$mycar[gos_region]&b=1' alt='number'><br/>";
}
else
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$mycar[gos_bb_one]$mycar[gos_number]$mycar[gos_bb_two]$mycar[gos_bb_free]$mycar[gos_region]&b=1' alt='number'><br/>";
}
}
}
echo "</td><td class='white' align='left'>";
if($mt && $mtu)
{
echo "<b class='yellow'>[$mt[label]]</b> ";
}
echo "<br><img src='/style/img/icons/fishka.png' alt='rating'><b class='yellow'>$user[fishka]</b>";
echo "<br><b class='red'>$count_fishka_mesto место</b><br></td></tr>";
}
}
elseif(isset($_GET['bog']))
{
echo "<table class='wdt gray-table'><tr>";
echo "<td width='50%'><form action='/dev/top.php?level' method='post'><input class='yes-btn' type='submit' value='Уровни'></form></td><td>";
echo "<form action='/dev/top.php?all' method='post'><input class='yes-btn' type='submit' value='Все гонщики'></form></td><tr><td>";
echo "<form action='/dev/top.php?to' method='post'><input class='yes-btn' type='submit' value='Топ по Т.О'></form></td><td>";
echo "<input class='inactive-btn' type='submit' value='Богачи'></td><tr><td>";
echo "<form action='/dev/top.php?like' method='post'><input class='yes-btn' type='submit' value='Лайки'></form></td><td>";
echo "<form action='/dev/top.php?fishka' method='post'><input class='yes-btn' type='submit' value='Фишки'></td><tr><td>";
echo "</td></tr></table>";
echo "<table class='wdt brown-header'><tr><td align='left'>Самые богатые: </td></tr></table>";
$q=mysql_query("SELECT * FROM `user` ORDER BY `baks` DESC LIMIT 10");
while($post=mysql_fetch_array($q)){
$post_user=mysql_fetch_array(mysql_query("SELECT * FROM `taxi_user` WHERE `id_user` = '".$post['id']."'"));
$post_user_taxi=mysql_fetch_array(mysql_query("SELECT * FROM `taxi` WHERE `id` = '".$post_user['id_taxi']."'"));
$garage=mysql_fetch_array(mysql_query("SELECT * FROM `garage` WHERE `id` = '$post[car_id]'"));
if($post['id']==$user['id']){
echo "<table class='wdt green-table'>";
}
else
{
echo "<table class='wdt gray-table'>";
}
echo "<tr style='border-bottom:1px #252525 solid;'><td class='white' align='center' width='20%' style='padding-right: 5px;'><img src='/style/img/avatars/$post[avatar].png' alt='avatar'></td>";
echo "<td class='white' align='center' width='40%'><img class='wdt' src='/style/img/car/$garage[screen].png' alt='car'>";
if($garage['neon']!=0){
echo "<img class='wdt' style='margin-top: -15px;' src='/style/img/images/neon/$garage[neon].png' alt='neon'>";
}
else
{
echo "<img class='wdt' style='margin-top: -15px;' src='/style/img/images/car_shadow.png' alt='neon'>";
}
if($garage['gos_region']>0)
{
if($garage['gos_region_transit']>0)
{
if($garage['gos_region']<10)
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]0$garage[gos_region]&b=7' alt='number'><br/>";
}
else
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]$garage[gos_region]&b=7' alt='number'><br/>";
}
}
else
{
if($garage['gos_region']<10)
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]0$garage[gos_region]&b=1' alt='number'><br/>";
}
else
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]$garage[gos_region]&b=1' alt='number'><br/>";
}
}
}
echo "</td><td class='white' align='left'>";
if($post_user_taxi)
{
echo "<b class='yellow'>[$post_user_taxi[label]]</b> ";
}
echo "$post[nick]<br><img src='/style/img/icons/money.png' alt='rating'><b class='yellow'>".m_format($post['money'])."</b>";
echo "<br><img src='/style/img/icons/baks.png' alt='rating'><b class='green'>".m_format($post['baks'])."</b>";
echo "<br><img src='/style/img/icons/garage.png' alt='Garage'><a class='white' style='font-size: 11pt;' href='/dev/info.php?id=$post[id]'>Гараж</a><br></td></tr>";
}
$count_bog = mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `baks` > '".$user['baks']."'"),0);
$count_bog_mesto=$count_bog+1;
if($count_bog>9)
{
echo "<tr><td colspan='4' class='point-continue'>... ... ...</td></tr>";
$stock=$mycar['stock_power']+1061;
$settuning=$mycar['power'];
if($user['nitro_bonus']>0){
$n2o_power=$user['nitro_bonus'];
}
else
{
$n2o_power=0;
}
if($mt['bonus_power']>0){
$my_taxi_bonus_power=$mt['bonus_power'];
}
else
{
$my_taxi_bonus_power=0;
}
$m_power=$mycar['power']+$n2o_power+$my_taxi_bonus_power;
echo "<table class='wdt green-table'>";
echo "<tr style='border-bottom:1px #252525 solid;'><td class='white' align='center' width='20%' style='padding-right: 5px;'><img src='/style/img/avatars/$user[avatar].png' alt='avatar'></td>";
echo "<td class='white' align='center' width='40%'><img class='wdt' src='/style/img/car/$mycar[screen].png' alt='car'>";
if($mycar['neon']!=0){
echo "<img class='wdt' style='margin-top: -15px;' src='/style/img/images/neon/$mycar[neon].png' alt='neon'>";
}
else
{
echo "<img class='wdt' style='margin-top: -15px;' src='/style/img/images/car_shadow.png' alt='neon'>";
}
if($mycar['gos_region']>0)
{
if($mycar['gos_region_transit']>0)
{
if($mycar['gos_region']<10)
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$mycar[gos_bb_one]$mycar[gos_number]$mycar[gos_bb_two]$mycar[gos_bb_free]0$mycar[gos_region]&b=7' alt='number'><br/>";
}
else
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$mycar[gos_bb_one]$mycar[gos_number]$mycar[gos_bb_two]$mycar[gos_bb_free]$mycar[gos_region]&b=7' alt='number'><br/>";
}
}
else
{
if($mycar['gos_region']<10)
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$mycar[gos_bb_one]$mycar[gos_number]$mycar[gos_bb_two]$mycar[gos_bb_free]0$mycar[gos_region]&b=1' alt='number'><br/>";
}
else
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$mycar[gos_bb_one]$mycar[gos_number]$mycar[gos_bb_two]$mycar[gos_bb_free]$mycar[gos_region]&b=1' alt='number'><br/>";
}
}
}
echo "</td><td class='white' align='left'>";
if($mt && $mtu)
{
echo "<b class='yellow'>[$mt[label]]</b> ";
}
echo "$user[nick]<br><img src='/style/img/icons/money.png' alt='rating'><b class='yellow'>$user[money]</b>";
echo "<br><img src='/style/img/icons/baks.png' alt='rating'><b class='green'>$user[baks]</b>";
echo "<br><b class='red'>$count_bog_mesto место</b><br></td></tr>";
}
}
elseif(isset($_GET['next_level']))
{
echo "<table class='wdt brown-header'><tr><td align='left'>Лучший следующего уровня: </td></tr></table>";
$q=mysql_query("SELECT * FROM `user` WHERE `level` = '".($user['level']+1)."' ORDER BY `rating` DESC LIMIT 1");
while($post=mysql_fetch_array($q)){
$post_user=mysql_fetch_array(mysql_query("SELECT * FROM `taxi_user` WHERE `id_user` = '".$post['id']."'"));
$post_user_taxi=mysql_fetch_array(mysql_query("SELECT * FROM `taxi` WHERE `id` = '".$post_user['id_taxi']."'"));
$garage=mysql_fetch_array(mysql_query("SELECT * FROM `garage` WHERE `id` = '$post[car_id]'"));
$stock=$garage['stock_power']+1061;
$settuning=$garage['power'];
if($post['nitro_bonus']>0){
$post_n2o_power=$post['nitro_bonus'];
}
else
{
$post_n2o_power=0;
}
if($post_user_taxi['bonus_power']>0){
$post_taxi_bonus_power=$post_user_taxi['bonus_power'];
}
else
{
$post_taxi_bonus_power=0;
}
$post_power=$garage['power']+$post_n2o_power+$post_taxi_bonus_power;
if($post['id']==$user['id']){
echo "<table class='wdt green-table'>";
}
else
{
echo "<table class='wdt gray-table'>";
}
echo "<tr style='border-bottom:1px #252525 solid;'><td class='white' align='center' width='20%' style='padding-right: 5px;'><img src='/style/img/avatars/$post[avatar].png' alt='avatar'></td>";
echo "<td class='white' align='center' width='40%'><img class='wdt' src='/style/img/car/$garage[screen].png' alt='car'>";
if($garage['neon']!=0){
echo "<img class='wdt' style='margin-top: -15px;' src='/style/img/images/neon/$garage[neon].png' alt='neon'>";
}
else
{
echo "<img class='wdt' style='margin-top: -15px;' src='/style/img/images/car_shadow.png' alt='neon'>";
}
if($garage['gos_region']>0)
{
if($garage['gos_region_transit']>0)
{
if($garage['gos_region']<10)
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]0$garage[gos_region]&b=7' alt='number'><br/>";
}
else
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]$garage[gos_region]&b=7' alt='number'><br/>";
}
}
else
{
if($garage['gos_region']<10)
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]0$garage[gos_region]&b=1' alt='number'><br/>";
}
else
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]$garage[gos_region]&b=1' alt='number'><br/>";
}
}
}
echo "</td><td class='white' align='left'>";
if($post_user_taxi)
{
echo "<b class='yellow'>[$post_user_taxi[label]]</b> ";
}
echo "$post[nick]<br><img src='/style/img/icons/rating.png' alt='rating'><b class='yellow'>".m_format($post['rating'])."</b><br>";
if($settuning >= $stock)
{
echo "<img src='/style/img/icons/fire.png'>";
}
else
{
echo "<img src='/style/img/icons/power.png'>";
}
echo "<b class='orange'>$post_power л.с.</b>";
echo "<br><img src='/style/img/icons/garage.png' alt='Garage'><a class='white' style='font-size: 11pt;' href='/dev/info.php?id=$post[id]'>Гараж</a><br></td></tr>";
}
}
else
{
echo "<table class='wdt gray-table'><tr>";
echo "<td width='50%'><form action='/dev/top.php?level' method='post'><input class='yes-btn' type='submit' value='Уровни'></form></td><td>";
echo "<input class='inactive-btn' type='submit' value='Все гонщики'></td><tr><td>";
echo "<form action='/dev/top.php?to' method='post'><input class='yes-btn' type='submit' value='Топ по Т.О'></form></td><td>";
echo "<form action='/dev/top.php?bog' method='post'><input class='yes-btn' type='submit' value='Богачи'></form></td></tr><td>";
echo "<form action='/dev/top.php?like' method='post'><input class='yes-btn' type='submit' value='Лайки'></form></td><td>";
echo "<form action='/dev/top.php?fishka' method='post'><input class='yes-btn' type='submit' value='Фишки'></td><tr><td>";
echo "<input class='inactive-btn' type='submit' value='Уровня'></form></td><td>";
echo "<form action='/dev/top.php?all' method='post'><input class='yes-btn' type='submit' value='Общий'></form></td><tr><td>";
echo "</td></tr></table>";
echo "<table class='wdt brown-header'><tr><td align='left'>Лучший следующего уровня: </td></tr></table>";
$q=mysql_query("SELECT * FROM `user` WHERE `level` = '".($user['level']+1)."' ORDER BY `rating` DESC LIMIT 1");
while($post=mysql_fetch_array($q)){
$post_user=mysql_fetch_array(mysql_query("SELECT * FROM `taxi_user` WHERE `id_user` = '".$post['id']."'"));
$post_user_taxi=mysql_fetch_array(mysql_query("SELECT * FROM `taxi` WHERE `id` = '".$post_user['id_taxi']."'"));
$garage=mysql_fetch_array(mysql_query("SELECT * FROM `garage` WHERE `id` = '$post[car_id]'"));
$stock=$garage['stock_power']+1061;
$settuning=$garage['power'];
if($post['nitro_bonus']>0){
$post_n2o_power=$post['nitro_bonus'];
}
else
{
$post_n2o_power=0;
}
if($post_user_taxi['bonus_power']>0){
$post_taxi_bonus_power=$post_user_taxi['bonus_power'];
}
else
{
$post_taxi_bonus_power=0;
}
$post_power=$garage['power']+$post_n2o_power+$post_taxi_bonus_power;
if($post['id']==$user['id']){
echo "<table class='wdt green-table'>";
}
else
{
echo "<table class='wdt gray-table'>";
}
echo "<tr style='border-bottom:1px #252525 solid;'><td class='white' align='center' width='20%' style='padding-right: 5px;'><img src='/style/img/avatars/$post[avatar].png' alt='avatar'></td>";
echo "<td class='white' align='center' width='40%'><img class='wdt' src='/style/img/car/$garage[screen].png' alt='car'>";
if($garage['neon']!=0){
echo "<img class='wdt' style='margin-top: -15px;' src='/style/img/images/neon/$garage[neon].png' alt='neon'>";
}
else
{
echo "<img class='wdt' style='margin-top: -15px;' src='/style/img/images/car_shadow.png' alt='neon'>";
}
if($garage['gos_region']>0)
{
if($garage['gos_region_transit']>0)
{
if($garage['gos_region']<10)
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]0$garage[gos_region]&b=7' alt='number'><br/>";
}
else
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]$garage[gos_region]&b=7' alt='number'><br/>";
}
}
else
{
if($garage['gos_region']<10)
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]0$garage[gos_region]&b=1' alt='number'><br/>";
}
else
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]$garage[gos_region]&b=1' alt='number'><br/>";
}
}
}
echo "</td><td class='white' align='left'>";
if($post_user_taxi)
{
echo "<b class='yellow'>[$post_user_taxi[label]]</b> ";
}
echo "$post[nick]<br><img src='/style/img/icons/rating.png' alt='rating'><b class='yellow'>".m_format($post['rating'])."</b><br>";
if($settuning >= $stock)
{
echo "<img src='/style/img/icons/fire.png'>";
}
else
{
echo "<img src='/style/img/icons/power.png'>";
}
echo "<b class='orange'>$post_power л.с.</b>";
echo "<br><img src='/style/img/icons/garage.png' alt='Garage'><a class='white' style='font-size: 11pt;' href='/dev/info.php?id=$post[id]'>Гараж</a><br></td></tr>";
}
echo "<table class='wdt brown-header'><tr><td align='left'>Топ гонщиков $user[level] уровня: </td></tr></table>";
$q=mysql_query("SELECT * FROM `user` WHERE `level` = '".$user['level']."' ORDER BY `rating` DESC LIMIT 10");
while($post=mysql_fetch_array($q)){
$post_user=mysql_fetch_array(mysql_query("SELECT * FROM `taxi_user` WHERE `id_user` = '".$post['id']."'"));
$post_user_taxi=mysql_fetch_array(mysql_query("SELECT * FROM `taxi` WHERE `id` = '".$post_user['id_taxi']."'"));
$garage=mysql_fetch_array(mysql_query("SELECT * FROM `garage` WHERE `id` = '$post[car_id]'"));
$stock=$garage['stock_power']+1061;
$settuning=$garage['power'];
if($post['nitro_bonus']>0){
$post_n2o_power=$post['nitro_bonus'];
}
else
{
$post_n2o_power=0;
}
if($post_user_taxi['bonus_power']>0){
$post_taxi_bonus_power=$post_user_taxi['bonus_power'];
}
else
{
$post_taxi_bonus_power=0;
}
$post_power=$garage['power']+$post_n2o_power+$post_taxi_bonus_power;
if($post['id']==$user['id']){
echo "<table class='wdt green-table'>";
}
else
{
echo "<table class='wdt gray-table'>";
}
echo "<tr style='border-bottom:1px #252525 solid;'><td class='white' align='center' width='20%' style='padding-right: 5px;'><img src='/style/img/avatars/$post[avatar].png' alt='avatar'></td>";
echo "<td class='white' align='center' width='40%'><img class='wdt' src='/style/img/car/$garage[screen].png' alt='car'>";
if($garage['neon']!=0){
echo "<img class='wdt' style='margin-top: -15px;' src='/style/img/images/neon/$garage[neon].png' alt='neon'>";
}
else
{
echo "<img class='wdt' style='margin-top: -15px;' src='/style/img/images/car_shadow.png' alt='neon'>";
}
if($garage['gos_region']>0)
{
if($garage['gos_region_transit']>0)
{
if($garage['gos_region']<10)
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]0$garage[gos_region]&b=7' alt='number'><br/>";
}
else
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]$garage[gos_region]&b=7' alt='number'><br/>";
}
}
else
{
if($garage['gos_region']<10)
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]0$garage[gos_region]&b=1' alt='number'><br/>";
}
else
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$garage[gos_bb_one]$garage[gos_number]$garage[gos_bb_two]$garage[gos_bb_free]$garage[gos_region]&b=1' alt='number'><br/>";
}
}
}
echo "</td><td class='white' align='left'>";
if($post_user_taxi)
{
echo "<b class='yellow'>[$post_user_taxi[label]]</b> ";
}
echo "$post[nick]<br><img src='/style/img/icons/rating.png' alt='rating'><b class='yellow'>".m_format($post['rating'])."</b><br>";
if($settuning >= $stock)
{
echo "<img src='/style/img/icons/fire.png'>";
}
else
{
echo "<img src='/style/img/icons/power.png'>";
}
echo "<b class='orange'>$post_power л.с.</b>";
echo "<br><img src='/style/img/icons/garage.png' alt='Garage'><a class='white' style='font-size: 11pt;' href='/dev/info.php?id=$post[id]'>Гараж</a><br></td></tr>";
}
$count_lv = mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `level` = '".$user['level']."' AND `rating` > '".$user['rating']."'"),0);
$count_lv_mesto=$count_lv+1;
if($count_lv>9)
{
echo "<tr><td colspan='4' class='point-continue'>... ... ...</td></tr>";
$stock=$mycar['stock_power']+1061;
$settuning=$mycar['power'];
if($user['nitro_bonus']>0){
$n2o_power=$user['nitro_bonus'];
}
else
{
$n2o_power=0;
}
if($mt['bonus_power']>0){
$my_taxi_bonus_power=$mt['bonus_power'];
}
else
{
$my_taxi_bonus_power=0;
}
$m_power=$mycar['power']+$n2o_power+$my_taxi_bonus_power;
echo "<table class='wdt green-table'>";
echo "<tr style='border-bottom:1px #252525 solid;'><td class='white' align='center' width='20%' style='padding-right: 5px;'><img src='/style/img/avatars/$user[avatar].png' alt='avatar'></td>";
echo "<td class='white' align='center' width='40%'><img class='wdt' src='/style/img/car/$mycar[screen].png' alt='car'>";
if($mycar['neon']!=0){
echo "<img class='wdt' style='margin-top: -15px;' src='/style/img/images/neon/$mycar[neon].png' alt='neon'>";
}
else
{
echo "<img class='wdt' style='margin-top: -15px;' src='/style/img/images/car_shadow.png' alt='neon'>";
}
if($mycar['gos_region']>0)
{
if($mycar['gos_region_transit']>0)
{
if($mycar['gos_region']<10)
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$mycar[gos_bb_one]$mycar[gos_number]$mycar[gos_bb_two]$mycar[gos_bb_free]0$mycar[gos_region]&b=7' alt='number'><br/>";
}
else
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$mycar[gos_bb_one]$mycar[gos_number]$mycar[gos_bb_two]$mycar[gos_bb_free]$mycar[gos_region]&b=7' alt='number'><br/>";
}
}
else
{
if($mycar['gos_region']<10)
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$mycar[gos_bb_one]$mycar[gos_number]$mycar[gos_bb_two]$mycar[gos_bb_free]0$mycar[gos_region]&b=1' alt='number'><br/>";
}
else
{
echo "<img width='95' src='http://club2108.ru/numgen/index.php?num=$mycar[gos_bb_one]$mycar[gos_number]$mycar[gos_bb_two]$mycar[gos_bb_free]$mycar[gos_region]&b=1' alt='number'><br/>";
}
}
}
echo "</td><td class='white' align='left'>";
if($mt && $mtu)
{
echo "<b class='yellow'>[$mt[label]]</b> ";
}
echo "$user[nick]<br><img src='/style/img/icons/rating.png' alt='rating'><b class='yellow'>".m_format($user['rating'])."</b><br>";
if($settuning >= $stock)
{
echo "<img src='/style/img/icons/fire.png'>";
}
else
{
echo "<img src='/style/img/icons/power.png'>";
}
echo "<b class='orange'>$m_power л.с.</b>";
echo "<br><b class='red'>$count_lv_mesto место</b><br></td></tr>";
}
}
echo "<table class='wdt gray-table'>";
echo "<tr><td class='white' align='center' style='height:30px;'><form action ='/dev/garage.php' method='post'><input class='no-btn' type='submit' value='Назад'></form></td></tr></table>";
include_once '../sys/inc/tfoot.php';
?>