<?
#########################################
# Скрипт онлайн игры "Стритрейсинг"_____#
# Автор: -=FеST=-(СиК)__________________#
# ICQ : 345-22-23_______________________#
# Все права принадлежат автору(-=FeST=-)#
#########################################
include_once '../sys/inc/start.php';
include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
include_once '../sys/inc/adm_check.php';
include_once '../sys/inc/user.php';
$set['title']='Стритрейсинг';
include_once '../sys/inc/thead.php';
title();
err();
aut();

if(!isset($user)){
echo 'Вы неавторизованы';
include_once '../sys/inc/tfoot.php';
exit;
}
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `racing` WHERE `id_u`='".$user['id']."'"),0)==0)
mysql_query("INSERT INTO `racing`(`id_u`) VALUES('".$user['id']."')");
  $arr=mysql_fetch_array(mysql_query("SELECT * FROM `racing` WHERE `id_u`='".$user['id']."'"));
   $car=mysql_fetch_array(mysql_query("SELECT * FROM `racing_car` WHERE `id`='".$arr['car']."'"));
if($arr['color']!='0'){
if($arr['color']==1)
$color='red_';
elseif($arr['color']==2)
$color='blue_';
elseif($arr['color']==3)
$color='green_'; 
}

   echo "
<div class='aut'>
<img src='ico/exp.gif' alt=''/>".$arr['exp']."
<img src='ico/level.gif' alt=''/>".$arr['level']."
<img src='ico/money.gif' alt=''/>".$arr['money']."
<img src='ico/resp.gif' alt=''/>".$arr['resp']."</div>

<center><img src='car/".(isset($color) ? "".$color."".$car['screen']."" : "".$car['screen']."")."' alt=''/> <br/>".$car['name']."</center>
<div class='rowup'>
<img src='ico/ico.gif' alt=''/><a href='race.php'> Гонки</a><br/>
<img src='ico/ico.gif' alt=''/><a href='garage.php'> Гараж</a><br/>
<img src='ico/ico.gif' alt=''/><a href='auto.php'> Автосалон</a><br/>
<img src='ico/ico.gif' alt=''/><a href='rate.php'> Рейтинг</a><br/>
<img src='ico/ico.gif' alt=''/><a href='bot_race.php'> Искать гонщиков</a><br/>
<img src='ico/ico.gif' alt=''/><a href='retry.php'> Начать заново игру</a><br/>
<img src='ico/ico.gif' alt=''/><a href='faq.php'> FAQ по игре</a></div>
";






include_once '../sys/inc/tfoot.php';
?>