Файл: supergonki/supergonki/index.php
Строк: 1084
<?php
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';
?>
<title>Супер гонки</title>
<?
?>
<link rel="stylesheet" href="style000.css" type="text/css" />
<?
if(!isset($user)){
echo '<table class="wdt msg-table">
<tr>
<td align="left" style="vertical-align: top; width: 10%">
<img src="icon/face-mex.png">
</td>
<td align="left" style="vertical-align: top">
Играть могут лишь зарегистрированные пользователи!</td>
</tr>
</table>';
exit;
}
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `supergonki` WHERE `id_u`='".$user['id']."'"),0)==0)
mysql_query("INSERT INTO `supergonki`(`id_u`) VALUES('".$user['id']."')");
$arr=mysql_fetch_array(mysql_query("SELECT * FROM `supergonki` WHERE `id_u`='".$user['id']."'"));
$car=mysql_fetch_array(mysql_query("SELECT * FROM `super_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_';
}
?>
<table class="wdt black">
<tr>
<td class="yellow" align="left" style="vertical-align: top; padding-bottom: 0px">
<img src="icon/fuel.png"><span id="FUELCNT">
<?
echo"".$arr['level']."";
?>
</span>
</td>
<td class="orange" align="left" style="vertical-align: top; padding-bottom: 0px">
<img src="icon/speed.png">
<?
echo"".$arr['speed']."";
?> л.с
</td>
<td class="white" style="vertical-align: top; padding-bottom: 0px">
ур.
<?
echo"".$arr['level']."";
?>
</td>
<td class="white" align="right" style="vertical-align: top; padding-bottom: 0px">
<img src="icon/money.png">
<?
echo"".$arr['money']."";
?>
</td>
<td class="green" align="right" style="vertical-align: top; padding-bottom: 0px">
<img src="icon/baks.png">
<?
echo"".$arr['baks']."";
?>
</td>
</tr>
<tr>
<td align="left" class="white" style="vertical-align: top; padding: 0px; height: 3px" colspan="5" height="3px">
<img src="icon/expline.png" width="35%" height="3px" style="height: 3px;">
</td>
</tr>
</table>
<table class="wdt black" style="border-bottom: 1px solid #767676;">
<tr>
<td class="white" align="left" style="padding-top: 0px;">
<a class="green" style="font-weight: bold;" href="index.php">Гараж</a>
</td>
<td class="white" align="left" style="padding-top: 0px;">
<a class="white" href="race.php">Гонки</a>
</td>
<td class="gray" align="left" style="padding-top: 0px;">
<a class="white" href="bank.php">Дилер</a>
</td>
<td class="gray" align="right" style="padding-top: 0px;">
<a class="white" href="rate.php">Топ</a>
</td>
</tr>
</table>
<?
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `supergonki` WHERE `id_u`='".$user['id']."'"),0)==0)
mysql_query("INSERT INTO `supergonki`(`id_u`) VALUES('".$user['id']."')");
$arr=mysql_fetch_array(mysql_query("SELECT * FROM `supergonki` WHERE `id_u`='".$user['id']."'"));
$car=mysql_fetch_array(mysql_query("SELECT * FROM `super_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_';
}
if(isset($_GET['tun'])){
if(isset($_GET['cz'])){
?>
<table class="wdt msg-table">
<tr>
<td align="left" style="vertical-align: top; width: 10%">
<img src="icon/face-mex.png">
</td>
<td align="left" style="vertical-align: top">
Здесь ты можешь улучшить cцепление на своей машине!</br>
<?
if(isset($_POST['submit'])){
if($arr['cz']<6){
if($arr['baks']>=intval($arr['cz']*6)){
mysql_query("UPDATE `supergonki` SET `speed`=`speed`+".($arr['cz']*7).", `uprav`=`uprav`+".intval($arr['cz']*4).", `baks`=`baks`-".($arr['cz']*6).", `cz`=`cz`+1 WHERE `id_u`='".$user['id']."'");
msg('Тюнинг прошел успешно!');
}
else
{
echo "Нехватает денег для покупки<br/>";
}}
else
{
echo "Детали успешно обновлены до самого высокого уровня<br/>";
}
}
?>
</td>
</tr>
</table>
<table class="wdt garage-table">
<tr>
<td align="right" style="padding-top: 10px;">
<table class="wdt">
<tr>
<td style="vertical-align: top; padding-left: 10px;" align="left" rowspan="4">
</td>
<td align="left" class="white" style="vertical-align: top" width="40%"><b>
<?
echo"".$car['name']."";
?>
</b>
</td>
</tr>
<tr>
<td align="left" class="white" nowrap="nowrap" style="font-size: 14px">Мощность: <img src="icon/speed.png"><b class="orange">
<?
echo"".$arr['speed']."";
?> л.с </b></td>
</tr>
<tr>
<td align="left" class="white" style="font-size: 14px">Рейтинг: <img src="icon/rating.png"><b class="yellow">
<?
echo"".$arr['exp']."";
?>
</b></td>
</tr>
<tr>
<td align="left" class="white" style="font-size: 14px">Бензин: <img src="icon/fuel.png"><b class="yellow" style="color: #000"><span id="FUELTIME">
<?
echo"".$arr['level']."";
?></span></b></td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="left" style="padding-bottom: 0px; padding-left: 10px; padding-right: 10px;" valign="bottom">
</br>
</br>
<?
echo"<img class='wdt' src='car/".(isset($color) ? "".$color."".$car['screen']."" : "".$car['screen']."")."' alt=''/> <br/>";
?>
</br>
<img class="wdt" style="margin-top: -25px;" src="icon/car_shad.png">
</td>
</tr>
</table>
<table class="wdt main-menu">
<tr>
<td class="white" align="center" style="width:25%; border-right: solid 1px #bebebf; vertical-align: bottom;">
<b><a style="text-decoration: none; color: #000" href="gorod.php"><img src="icon/map-ico0.png"><br>
Город</a></b>
</td>
<td class="gray" align="center" style="width:25%; border-right: solid 1px #bebebf; vertical-align: bottom;">
</td>
<td class="gray" align="center" style="width:25%">
</td>
</tr>
</table>
<table class="wdt gray-table" style="font-size: 10pt">
</table>
<table class="wdt brown-header">
<tr>
<td align="left">Детали улучшают характеристики:</td>
</tr>
</table>
<table class="wdt gray-table" style="font-size: 10pt">
<tr>
<td class="white td-cell" align="center" style="width: 60px; padding-right: 0px">
<img src="ico/flywheel.png">
</td>
<td class="td-cell white" align="left" style="vertical-align: top">
<br>
<img src="icon/speed.png"><b class="orange">
Сцепление
</b><br>
<img src="icon/power-wh.png">
<b><?
echo"".$arr['cz']."";
?> ур </b><br>
<img src="icon/power-wh.png">
<b> Мощность + <?
echo"".intval($arr['cz']*7)."";
?> </b><br>
<img src="icon/baks.png">
<b class="green"><?
echo"".intval($arr['cz']*6)."";
?> </b><br>
</td>
<td class="td-cell" align="right" style="padding-right: 10px; width: 45%">
<form action="index.php?tun&cz" method="post">
<input type="submit" name='submit' class="upgrade-btn" value="Улучшить">
</form>
</td>
</tr>
</table>
<table class="wdt gray-table" style="font-size: 10pt">
<td class="white td-cell" align="center" style="height:30px;">
<form action="index.php?tun" method="post">
<input type="submit" class="wdt race-btn" value="Тюнинг"/>
</form>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<?
exit;
}
if(isset($_GET['vpusk'])){
?>
<table class="wdt msg-table">
<tr>
<td align="left" style="vertical-align: top; width: 10%">
<img src="icon/face-mex.png">
</td>
<td align="left" style="vertical-align: top">
Здесь ты можешь улучшить трансмиссию на своей машине!</br>
<?
if(isset($_POST['submit'])){
if($arr['vpusk']<10){
if($arr['baks']>=intval($arr['vpusk']*7)){
mysql_query("UPDATE `supergonki` SET `speed`=`speed`+".($arr['vpusk']*7).", `uprav`=`uprav`+".intval($arr['vpusk']*1).", `baks`=`baks`-".($arr['vpusk']*7).", `vpusk`=`vpusk`+1 WHERE `id_u`='".$user['id']."'");
msg('Тюнинг прошел успешно!');
}
else
{
echo "Нехватает денег для покупки<br/>";
}}
else
{
echo "Детали успешно обновлены до последнего уровня<br/>";
}
}
?>
</td>
</tr>
</table>
<table class="wdt garage-table">
<tr>
<td align="right" style="padding-top: 10px;">
<table class="wdt">
<tr>
<td style="vertical-align: top; padding-left: 10px;" align="left" rowspan="4">
</td>
<td align="left" class="white" style="vertical-align: top" width="40%"><b>
<?
echo"".$car['name']."";
?>
</b>
</td>
</tr>
<tr>
<td align="left" class="white" nowrap="nowrap" style="font-size: 14px">Мощность: <img src="icon/speed.png"><b class="orange">
<?
echo"".$arr['speed']."";
?> л.с </b></td>
</tr>
<tr>
<td align="left" class="white" style="font-size: 14px">Рейтинг: <img src="icon/rating.png"><b class="yellow">
<?
echo"".$arr['exp']."";
?>
</b></td>
</tr>
<tr>
<td align="left" class="white" style="font-size: 14px">Бензин: <img src="icon/fuel.png"><b class="yellow" style="color: #000"><span id="FUELTIME">
<?
echo"".$arr['level']."";
?></span></b></td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" style="padding-bottom: 0px; padding-left: 10px; padding-right: 10px;" valign="bottom">
</br>
</br>
<?
echo"<img class='wdt' src='car/".(isset($color) ? "".$color."".$car['screen']."" : "".$car['screen']."")."' alt=''/> <br/>";
?>
</br>
<img class="wdt" style="margin-top: -25px;" src="icon/car_shad.png">
</td>
</tr>
</table>
<table class="wdt main-menu">
<tr>
<td class="white" align="center" style="width:25%; border-right: solid 1px #bebebf; vertical-align: bottom;">
<b><a style="text-decoration: none; color: #000" href="gorod.php"><img src="icon/map-ico0.png"><br>
Город</a></b>
</td>
<td class="gray" align="center" style="width:25%; border-right: solid 1px #bebebf; vertical-align: bottom;">
</td>
<td class="gray" align="center" style="width:25%">
</td>
</tr>
</table>
<table class="wdt gray-table" style="font-size: 10pt">
</table>
<table class="wdt brown-header">
<tr>
<td align="left">Детали улучшают характеристики:</td>
</tr>
</table>
<table class="wdt gray-table" style="font-size: 10pt">
<tr>
<td class="white td-cell" align="center" style="width: 60px; padding-right: 0px">
<img src="ico/transmission.png">
</td>
<td class="td-cell white" align="left" style="vertical-align: top">
<br>
<img src="icon/speed.png"><b class="orange">
Трансмиссия
</b><br>
<img src="icon/power-wh.png">
<b><?
echo"".$arr['vpusk']."";
?> ур </b><br>
<img src="icon/power-wh.png">
<b>Мощность + <?
echo"".intval($arr['vpusk']*7)."";
?> </b><br>
<img src="icon/baks.png">
<b class="green"><?
echo"".intval($arr['vpusk']*7)."";
?> </b><br>
</td>
<td class="td-cell" align="right" style="padding-right: 10px; width: 45%">
<form action="index.php?tun&vpusk" method="post">
<input type="submit" name='submit' class="upgrade-btn" value="Улучшить">
</form>
</td>
</tr>
</table>
<table class="wdt gray-table" style="font-size: 10pt">
<td class="white td-cell" align="center" style="height:30px;">
<form action="index.php?tun" method="post">
<input type="submit" class="wdt race-btn" value="Тюнинг"/>
</form>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<?
exit;
}
if(isset($_GET['podv'])){
?>
<table class="wdt msg-table">
<tr>
<td align="left" style="vertical-align: top; width: 10%">
<img src="icon/face-mex.png">
</td>
<td align="left" style="vertical-align: top">
Здесь ты можешь улучшить турбину на своей машине!</br>
<?
if(isset($_POST['submit'])){
if($arr['podv']<10){
if($arr['baks']>=intval($arr['podv']*6)){
mysql_query("UPDATE `supergonki` SET `speed`=`speed`+".($arr['podv']*2).", `uprav`=`uprav`+".intval($arr['podv']*2).", `baks`=`baks`-".($arr['podv']*6).", `podv`=`podv`+1 WHERE `id_u`='".$user['id']."'");
msg('Тюнинг прошел успешно!');
}
else
{
echo "Нехватает денег для покупки<br/>";
}}
else
{
echo "Детали успешно обновленны до последнего уровня<br/>";
}
}
?>
</td>
</tr>
</table>
<table class="wdt garage-table">
<tr>
<td align="right" style="padding-top: 10px;">
<table class="wdt">
<tr>
<td style="vertical-align: top; padding-left: 10px;" align="left" rowspan="4">
</td>
<td align="left" class="white" style="vertical-align: top" width="40%"><b>
<?
echo"".$car['name']."";
?>
</b>
</td>
</tr>
<tr>
<td align="left" class="white" nowrap="nowrap" style="font-size: 14px">Мощность: <img src="icon/speed.png"><b class="orange">
<?
echo"".$arr['speed']."";
?> л.с </b></td>
</tr>
<tr>
<td align="left" class="white" style="font-size: 14px">Рейтинг: <img src="icon/rating.png"><b class="yellow">
<?
echo"".$arr['exp']."";
?>
</b></td>
</tr>
<tr>
<td align="left" class="white" style="font-size: 14px">Бензин: <img src="icon/fuel.png"><b class="yellow" style="color: #000"><span id="FUELTIME">
<?
echo"".$arr['level']."";
?></span></b></td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" style="padding-bottom: 0px; padding-left: 10px; padding-right: 10px;" valign="bottom">
</br>
</br>
<?
echo"<img class='wdt' src='car/".(isset($color) ? "".$color."".$car['screen']."" : "".$car['screen']."")."' alt=''/> <br/>";
?>
</br>
<img class="wdt" style="margin-top: -25px;" src="icon/car_shad.png">
</td>
</tr>
</table>
<table class="wdt main-menu">
<tr>
<td class="white" align="center" style="width:25%; border-right: solid 1px #bebebf; vertical-align: bottom;">
<b><a style="text-decoration: none; color: #000" href="gorod.php"><img src="icon/map-ico0.png"><br>
Город</a></b>
</td>
<td class="gray" align="center" style="width:25%; border-right: solid 1px #bebebf; vertical-align: bottom;">
</td>
<td class="gray" align="center" style="width:25%">
</td>
</tr>
</table>
<table class="wdt gray-table" style="font-size: 10pt">
</table>
<table class="wdt brown-header">
<tr>
<td align="left">Детали улучшают характеристики:</td>
</tr>
</table>
<table class="wdt gray-table" style="font-size: 10pt">
<tr>
<td class="white td-cell" align="center" style="width: 60px; padding-right: 0px">
<img src="ico/turbo.png">
</td>
<td class="td-cell white" align="left" style="vertical-align: top">
<br>
<img src="icon/speed.png"><b class="orange">
Турбина
</b><br>
<img src="icon/power-wh.png">
<b><?
echo"".$arr['podv']."";
?> ур </b><br>
<img src="icon/power-wh.png">
<b>Мощность + <?
echo"".intval($arr['podv']*5)."";
?> </b><br>
<img src="icon/baks.png">
<b class="green"><?
echo"".intval($arr['podv']*6)."";
?> </b><br>
</td>
<td class="td-cell" align="right" style="padding-right: 10px; width: 45%">
<form action="index.php?tun&podv" method="post">
<input type="submit" name='submit' class="upgrade-btn" value="Улучшить">
</form>
</td>
</tr>
</table>
<table class="wdt gray-table" style="font-size: 10pt">
<td class="white td-cell" align="center" style="height:30px;">
<form action="index.php?tun" method="post">
<input type="submit" class="wdt race-btn" value="Тюнинг"/>
</form>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<?
exit;
}
if(isset($_GET['za'])){
?>
<table class="wdt msg-table">
<tr>
<td align="left" style="vertical-align: top; width: 10%">
<img src="icon/face-mex.png">
</td>
<td align="left" style="vertical-align: top">
Здесь ты можешь улучшить коллектор на своей машине!</br>
<?
if(isset($_POST['submit'])){
if($arr['za']<10){
if($arr['baks']>=intval($arr['za']*5)){
mysql_query("UPDATE `supergonki` SET `speed`=`speed`+".($arr['za']*5).", `uprav`=`uprav`+".intval($arr['za']*1).", `baks`=`baks`-".($arr['za']*5).", `za`=`za`+1 WHERE `id_u`='".$user['id']."'");
msg('Тюнинг прошел успешно!');
}
else
{
echo "Нехватает денег для покупки<br/>";
}}
else
{
echo "Детали успешно обновлены до последнего уровня<br/>";
}
}
?>
</td>
</tr>
</table>
<table class="wdt garage-table">
<tr>
<td align="right" style="padding-top: 10px;">
<table class="wdt">
<tr>
<td style="vertical-align: top; padding-left: 10px;" align="left" rowspan="4">
</td>
<td align="left" class="white" style="vertical-align: top" width="40%"><b>
<?
echo"".$car['name']."";
?>
</b>
</td>
</tr>
<tr>
<td align="left" class="white" nowrap="nowrap" style="font-size: 14px">Мощность: <img src="icon/speed.png"><b class="orange">
<?
echo"".$arr['speed']."";
?> л.с </b></td>
</tr>
<tr>
<td align="left" class="white" style="font-size: 14px">Рейтинг: <img src="icon/rating.png"><b class="yellow">
<?
echo"".$arr['exp']."";
?>
</b></td>
</tr>
<tr>
<td align="left" class="white" style="font-size: 14px">Бензин: <img src="icon/fuel.png"><b class="yellow" style="color: #000"><span id="FUELTIME">
<?
echo"".$arr['level']."";
?></span></b></td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" style="padding-bottom: 0px; padding-left: 10px; padding-right: 10px;" valign="bottom">
</br>
</br>
<?
echo"<img class='wdt' src='car/".(isset($color) ? "".$color."".$car['screen']."" : "".$car['screen']."")."' alt=''/> <br/>";
?>
</br>
<img class="wdt" style="margin-top: -25px;" src="icon/car_shad.png">
</td>
</tr>
</table>
<table class="wdt main-menu">
<tr>
<td class="white" align="center" style="width:25%; border-right: solid 1px #bebebf; vertical-align: bottom;">
<b><a style="text-decoration: none; color: #000" href="gorod.php"><img src="icon/map-ico0.png"><br>
Город</a></b>
</td>
<td class="gray" align="center" style="width:25%; border-right: solid 1px #bebebf; vertical-align: bottom;">
</td>
<td class="gray" align="center" style="width:25%">
</td>
</tr>
</table>
<table class="wdt gray-table" style="font-size: 10pt">
</table>
<table class="wdt brown-header">
<tr>
<td align="left">Детали улучшают характеристики:</td>
</tr>
</table>
<table class="wdt gray-table" style="font-size: 10pt">
<tr>
<td class="white td-cell" align="center" style="width: 60px; padding-right: 0px">
<img src="ico/exhaust.png">
</td>
<td class="td-cell white" align="left" style="vertical-align: top">
<br>
<img src="icon/speed.png"><b class="orange">
Коллектор
</b><br>
<img src="icon/power-wh.png">
<b><?
echo"".$arr['za']."";
?> ур </b><br>
<img src="icon/power-wh.png">
<b>Мощность + <?
echo"".intval($arr['za']*5)."";
?> </b><br>
<img src="icon/baks.png">
<b class="green"><?
echo"".intval($arr['za']*5)."";
?> </b><br>
</td>
<td class="td-cell" align="right" style="padding-right: 10px; width: 45%">
<form action="index.php?tun&za" method="post">
<input type="submit" name='submit' class="upgrade-btn" value="Улучшить">
</form>
</td>
</tr>
</table>
<table class="wdt gray-table" style="font-size: 10pt">
<td class="white td-cell" align="center" style="height:30px;">
<form action="index.php?tun" method="post">
<input type="submit" class="wdt race-btn" value="Тюнинг"/>
</form>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<?
exit;
}
if(isset($_GET['zak'])){
?>
<table class="wdt msg-table">
<tr>
<td align="left" style="vertical-align: top; width: 10%">
<img src="icon/face-mex.png">
</td>
<td align="left" style="vertical-align: top">
Здесь ты можешь улучшить тормоза!</br>
<?
if(isset($_POST['submit'])){
if($arr['zak']<10){
if($arr['baks']>=intval($arr['zak']*4)){
mysql_query("UPDATE `supergonki` SET `speed`=`speed`+".($arr['zak']*5).", `uprav`=`uprav`+".intval($arr['zak']*1).", `baks`=`baks`-".($arr['zak']*4).", `zak`=`zak`+1 WHERE `id_u`='".$user['id']."'");
msg('Тюнинг прошел успешно!');
}
else
{
echo "Нехватает денег для покупки<br/>";
}}
else
{
echo "Детали успешно обновлены до последнего уровня<br/>";
}
}
?>
</td>
</tr>
</table>
<table class="wdt garage-table">
<tr>
<td align="right" style="padding-top: 10px;">
<table class="wdt">
<tr>
<td style="vertical-align: top; padding-left: 10px;" align="left" rowspan="4">
</td>
<td align="left" class="white" style="vertical-align: top" width="40%"><b>
<?
echo"".$car['name']."";
?>
</b>
</td>
</tr>
<tr>
<td align="left" class="white" nowrap="nowrap" style="font-size: 14px">Мощность: <img src="icon/speed.png"><b class="orange">
<?
echo"".$arr['speed']."";
?> л.с </b></td>
</tr>
<tr>
<td align="left" class="white" style="font-size: 14px">Рейтинг: <img src="icon/rating.png"><b class="yellow">
<?
echo"".$arr['exp']."";
?>
</b></td>
</tr>
<tr>
<td align="left" class="white" style="font-size: 14px">Бензин: <img src="icon/fuel.png"><b class="yellow" style="color: #000"><span id="FUELTIME">
<?
echo"".$arr['level']."";
?></span></b></td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" style="padding-bottom: 0px; padding-left: 10px; padding-right: 10px;" valign="bottom">
</br>
</br>
<?
echo"<img class='wdt' src='car/".(isset($color) ? "".$color."".$car['screen']."" : "".$car['screen']."")."' alt=''/> <br/>";
?>
</br>
<img class="wdt" style="margin-top: -25px;" src="icon/car_shad.png">
</td>
</tr>
</table>
<table class="wdt main-menu">
<tr>
<td class="white" align="center" style="width:25%; border-right: solid 1px #bebebf; vertical-align: bottom;">
<b><a style="text-decoration: none; color: #000" href="gorod.php"><img src="icon/map-ico0.png"><br>
Город</a></b>
</td>
<td class="gray" align="center" style="width:25%; border-right: solid 1px #bebebf; vertical-align: bottom;">
</td>
<td class="gray" align="center" style="width:25%">
</td>
</tr>
</table>
<table class="wdt gray-table" style="font-size: 10pt">
</table>
<table class="wdt brown-header">
<tr>
<td align="left">Детали улучшают характеристики:</td>
</tr>
</table>
<table class="wdt gray-table" style="font-size: 10pt">
<tr>
<td class="white td-cell" align="center" style="width: 60px; padding-right: 0px">
<img src="ico/brakes.png">
</td>
<td class="td-cell white" align="left" style="vertical-align: top">
<br>
<img src="icon/speed.png"><b class="orange">
Тормоза
</b><br>
<img src="icon/power-wh.png">
<b><?
echo"".$arr['zak']."";
?> ур </b><br>
<img src="icon/power-wh.png">
<b>Мощность + <?
echo"".intval($arr['zak']*5)."";
?> </b><br>
<img src="icon/baks.png">
<b class="green"><?
echo"".intval($arr['zak']*4)."";
?> </b><br>
</td>
<td class="td-cell" align="right" style="padding-right: 10px; width: 45%">
<form action="index.php?tun&zak" method="post">
<input type="submit" name='submit' class="upgrade-btn" value="Улучшить">
</form>
</td>
</tr>
</table>
<table class="wdt gray-table" style="font-size: 10pt">
<td class="white td-cell" align="center" style="height:30px;">
<form action="index.php?tun" method="post">
<input type="submit" class="wdt race-btn" value="Тюнинг"/>
</form>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<?
exit;
}
if(isset($_GET['shina'])){
?>
<table class="wdt msg-table">
<tr>
<td align="left" style="vertical-align: top; width: 10%">
<img src="icon/face-mex.png">
</td>
<td align="left" style="vertical-align: top">
Здесь ты можешь улучшить Шины на своей машине!</br>
<?
if(isset($_POST['submit'])){
if($arr['shina']<10){
if($arr['baks']>=intval($arr['shina']*5)){
mysql_query("UPDATE `supergonki` SET `speed`=`speed`+".($arr['shina']*2).", `uprav`=`uprav`+".intval($arr['shina']*3).", `baks`=`baks`-".($arr['shina']*5).", `shina`=`shina`+1 WHERE `id_u`='".$user['id']."'");
msg('Тюнинг прошел успешно!');
}
else
{
echo "Нехватает денег для покупки<br/>";
}
}
else
{
echo "Детали успешно обновлены до последнего уровня<br/>";
}
}
?>
</td>
</tr>
</table>
<table class="wdt garage-table">
<tr>
<td align="right" style="padding-top: 10px;">
<table class="wdt">
<tr>
<td style="vertical-align: top; padding-left: 10px;" align="left" rowspan="4">
</td>
<td align="left" class="white" style="vertical-align: top" width="40%"><b>
<?
echo"".$car['name']."";
?>
</b>
</td>
</tr>
<tr>
<td align="left" class="white" nowrap="nowrap" style="font-size: 14px">Мощность: <img src="icon/speed.png"><b class="orange">
<?
echo"".$arr['speed']."";
?> л.с </b></td>
</tr>
<tr>
<td align="left" class="white" style="font-size: 14px">Рейтинг: <img src="icon/rating.png"><b class="yellow">
<?
echo"".$arr['exp']."";
?>
</b></td>
</tr>
<tr>
<td align="left" class="white" style="font-size: 14px">Бензин: <img src="icon/fuel.png"><b class="yellow" style="color: #000"><span id="FUELTIME">
<?
echo"".$arr['level']."";
?></span></b></td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" style="padding-bottom: 0px; padding-left: 10px; padding-right: 10px;" valign="bottom">
</br>
</br>
<?
echo"<img class='wdt' src='car/".(isset($color) ? "".$color."".$car['screen']."" : "".$car['screen']."")."' alt=''/> <br/>";
?>
</br>
<img class="wdt" style="margin-top: -25px;" src="icon/car_shad.png">
</td>
</tr>
</table>
<table class="wdt main-menu">
<tr>
<td class="white" align="center" style="width:25%; border-right: solid 1px #bebebf; vertical-align: bottom;">
<b><a style="text-decoration: none; color: #000" href="gorod.php"><img src="icon/map-ico0.png"><br>
Город</a></b>
</td>
<td class="gray" align="center" style="width:25%; border-right: solid 1px #bebebf; vertical-align: bottom;">
</td>
<td class="gray" align="center" style="width:25%">
</td>
</tr>
</table>
<table class="wdt gray-table" style="font-size: 10pt">
</table>
<table class="wdt brown-header">
<tr>
<td align="left">Детали улучшают характеристики:</td>
</tr>
</table>
<table class="wdt gray-table" style="font-size: 10pt">
<tr>
<td class="white td-cell" align="center" style="width: 60px; padding-right: 0px">
<img src="ico/tires.png">
</td>
<td class="td-cell white" align="left" style="vertical-align: top">
<br>
<img src="icon/speed.png"><b class="orange">
Шины
</b><br>
<img src="icon/power-wh.png">
<b><?
echo"".$arr['shina']."";
?> ур </b><br>
<img src="icon/power-wh.png">
<b>Мощность + <?
echo"".intval($arr['shina']*2)."";
?> </b><br>
<img src="icon/baks.png">
<b class="green"><?
echo"".intval($arr['shina']*5)."";
?> </b><br>
</td>
<td class="td-cell" align="right" style="padding-right: 10px; width: 45%">
<form action="index.php?tun&shina" method="post">
<input type="submit" name='submit' class="upgrade-btn" value="Улучшить">
</form>
</td>
</tr>
</table>
<table class="wdt gray-table" style="font-size: 10pt">
<td class="white td-cell" align="center" style="height:30px;">
<form action="index.php?tun" method="post">
<input type="submit" class="wdt race-btn" value="Тюнинг"/>
</form>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<?
exit;
}
?>
<table class="wdt msg-table">
<tr>
<td align="left" style="vertical-align: top; width: 10%">
<img src="icon/face-mex.png">
</td>
<td align="left" style="vertical-align: top">
Здесь ты можешь улучшить свою машину!</td>
</tr>
</table>
<table class="wdt garage-table">
<tr>
<td align="right" style="padding-top: 10px;">
<table class="wdt">
<tr>
<td style="vertical-align: top; padding-left: 10px;" align="left" rowspan="4">
</td>
<td align="left" class="white" style="vertical-align: top" width="40%"><b>
<?
echo"".$car['name']."";
?>
</b>
</td>
</tr>
<tr>
<td align="left" class="white" nowrap="nowrap" style="font-size: 14px">Мощность: <img src="icon/speed.png"><b class="orange">
<?
echo"".$arr['speed']."";
?> л.с </b></td>
</tr>
<tr>
<td align="left" class="white" style="font-size: 14px">Рейтинг: <img src="icon/rating.png"><b class="yellow">
<?
echo"".$arr['exp']."";
?>
</b></td>
</tr>
<tr>
<td align="left" class="white" style="font-size: 14px">Бензин: <img src="icon/fuel.png"><b class="yellow" style="color: #000"><span id="FUELTIME">
<?
echo"".$arr['level']."";
?></span></b></td>
</tr>
</table>
</td>
</tr>
<tr>
<tr>
<tr>
<td align="center" style="padding-bottom: 10px; padding-left: 10px; padding-right: 10px;" valign="bottom">
</br>
</br>
<?
echo"<img class='wdt' src='car/".(isset($color) ? "".$color."".$car['screen']."" : "".$car['screen']."")."' alt=''/> <br/>";
?>
</br>
<img class="wdt" style="margin-top: -25px;" src="icon/car_shad.png">
</td>
</tr>
</table>
<table class="wdt main-menu">
<tr>
<td class="white" align="center" style="width:25%; border-right: solid 1px #bebebf; vertical-align: bottom;">
<b><a style="text-decoration: none; color: #000" href="gorod.php"><img src="icon/map-ico0.png"><br>
Город</a></b>
</td>
<td class="white" align="center" style="width:25%; border-right: solid 1px #bebebf; vertical-align: bottom;">
<b><a style="text-decoration: none; color: #000" href="index.php?tun"><img src="icon/engine.png"><br>
Тюнинг</a></b>
</td>
<td class="white" align="center" style="width:25%; border-right: solid 1px #bebebf; vertical-align: bottom;">
<b><a style="text-decoration: none; color: #000" href="index.php?sost"><img src="icon/info.png"><br>
Инфо</a></b>
<td class="gray" align="center" style="width:25%; border-right: solid 1px #bebebf; vertical-align: bottom;">
</td>
<td class="gray" align="center" style="width:25%">
</td>
</tr>
</table>
<table class="wdt gray-table" style="font-size: 10pt">
</table>
<table class="wdt brown-header">
<tr>
<td align="left">Детали улучшают характеристики:</td>
</tr>
</table>
<table class="wdt gray-table" style="font-size: 10pt"><tr>
<td class="td-cell" align="right" style="padding-right: 10px; width: 45%">
<table class="wdt gray-table" style="font-size: 10pt">
<tr>
<td class="white td-cell" align="center" style="width: 60px; padding-right: 0px">
<img src="ico/tires.png">
</td>
<td class="td-cell white" align="left" style="vertical-align: top">
<br>
<img src="icon/speed.png"><b class="orange">
Шины</b><br>
<img src="icon/power-wh.png">
<b><?
echo"".$arr['shina']."";
?> ур </b>
</td>
<td class="td-cell" align="right" style="padding-right: 10px; width: 45%">
<form action="?tun&shina" method="post">
<input type="submit" class="upgrade-btn" value="Улучшить">
</form>
</td>
</tr>
<table class="wdt gray-table" style="font-size: 10pt">
<tr>
<td class="white td-cell" align="center" style="width: 60px; padding-right: 0px">
<img src="ico/brakes.png">
</td>
<td class="td-cell white" align="left" style="vertical-align: top">
<br>
<img src="icon/speed.png"><b class="orange">
Тормоза
</b><br>
<img src="icon/power-wh.png">
<b><?
echo"".$arr['zak']."";
?> ур </b><br>
</td>
<td class="td-cell" align="right" style="padding-right: 10px; width: 45%">
<form action="?tun&zak" method="post">
<input type="submit" class="upgrade-btn" value="Улучшить">
</form>
</td>
</tr>
<table class="wdt gray-table" style="font-size: 10pt">
<tr>
<td class="white td-cell" align="center" style="width: 60px; padding-right: 0px">
<img src="ico/turbo.png">
</td>
<td class="td-cell white" align="left" style="vertical-align: top">
<br>
<img src="icon/speed.png"><b class="orange">
Турбина
</b><br>
<img src="icon/power-wh.png">
<b><?
echo"".$arr['podv']."";
?> ур </b><br>
</td>
<td class="td-cell" align="right" style="padding-right: 10px; width: 45%">
<form action="?tun&podv" method="post">
<input type="submit" class="upgrade-btn" value="Улучшить">
</form>
</td>
</tr>
<table class="wdt gray-table" style="font-size: 10pt">
<tr>
<td class="white td-cell" align="center" style="width: 60px; padding-right: 0px">
<img src="ico/transmission.png">
</td>
<td class="td-cell white" align="left" style="vertical-align: top">
<br>
<img src="icon/speed.png"><b class="orange">
Трансмиссия
</b><br>
<img src="icon/power-wh.png">
<b><?
echo"".$arr['vpusk']."";
?> ур </b><br>
</td>
<td class="td-cell" align="right" style="padding-right: 10px; width: 45%">
<form action="?tun&vpusk" method="post">
<input type="submit" class="upgrade-btn" value="Улучшить">
</form>
</td>
</tr>
<table class="wdt gray-table" style="font-size: 10pt">
<tr>
<td class="white td-cell" align="center" style="width: 60px; padding-right: 0px">
<img src="ico/flywheel.png">
</td>
<td class="td-cell white" align="left" style="vertical-align: top">
<br>
<img src="icon/speed.png"><b class="orange">
Сцепление
</b><br>
<img src="icon/power-wh.png">
<b><?
echo"".$arr['cz']."";
?> ур </b><br>
</td>
<td class="td-cell" align="right" style="padding-right: 10px; width: 45%">
<form action="?tun&cz" method="post">
<input type="submit" class="upgrade-btn" value="Улучшить">
</form>
</td>
</tr>
<table class="wdt gray-table" style="font-size: 10pt">
<tr>
<td class="white td-cell" align="center" style="width: 60px; padding-right: 0px">
<img src="ico/exhaust.png">
</td>
<td class="td-cell white" align="left" style="vertical-align: top">
<br>
<img src="icon/speed.png"><b class="orange">
Коллектор</b><br>
<img src="icon/power-wh.png">
<b><?
echo"".$arr['za']."";
?> ур </b><br>
</td>
<td class="td-cell" align="right" style="padding-right: 10px; width: 45%">
<form action="?tun&za" method="post">
<input type="submit" class="upgrade-btn" value="Улучшить">
</form>
</td>
</tr>
<tr>
</table>
</table>
</td>
</tr>
</table>
<tr>
</table>
<table class="wdt gray-table" style="font-size: 10pt">
<td class="white td-cell" align="center" style="height:30px;">
<form action="/index.php" method="get">
<input type="submit" class="wdt race-btn" value="На сайт"/>
</form>
</td>
</tr>
</table>
<?
}
?>
<?
if(isset($_GET['sost'])){
?>
<table class="wdt green-table">
<tr>
<td class="white td-cell" align="left" style="width: 140px">
<table>
<table class="wdt green-header">
<tr>
<td align="left">Состояние авто:</td>
</tr>
</table>
<?
echo "
<img src='icon/speed.png' alt=''/> Мощность : ".$arr['speed']." л.с <br/>
<img src='icon/uprav.png' alt=''/> Управление : ".$arr['uprav']."<br/>
<img src='icon/mechanic.png' alt=''/> Тормоза : ".$arr['zak']." ур<br/>
<img src='icon/mechanic.png' alt=''/> Сцепление : ".$arr['cz']." ур<br/>
<img src='icon/mechanic.png' alt=''/> Турбина : ".$arr['podv']." ур<br/>
<img src='icon/mechanic.png' alt=''/> Трансмиссия : ".$arr['vpusk']." ур<br/>
<img src='icon/mechanic.png' alt=''/> Шины : ".$arr['shina']." ур<br/>
<img src='icon/mechanic.png' alt=''/> Коллектор : ".$arr['za']." ур<br/>";
?>
<table class="wdt green-header">
<tr>
<td align="left">Гонщик:</td>
</tr>
</table>
<?
echo"
<img src='icon/win.png' alt=''/> Побед : ".$arr['win']."/".$arr['nextlevel']." ".($arr['win']>=$arr['nextlevel'] ? "" : "")."<br/>
<img src='icon/loose.png' alt=''/> Поражений : ".$arr['lose']."<br/>
<img src='icon/rating.png' alt=''/> Рейтинг : ".$arr['exp']."<br/>
<img src='icon/level.png' alt=''/> Уровень : ".$arr['level']."<br/>
<img src='icon/money.png' alt=''/> Монеты : ".$arr['money']."<br/>
<img src='icon/baks.png' alt=''/> Баксы : ".$arr ['baks']."<br/>
<img src='icon/fuel.png' alt=''/> Бензин : ".$arr ['level']."<br/>
<img src='icon/reputation.png' alt=''/> Репутация : ".$arr['resp']."<br/>
<img src='icon/samoob.png' alt=''/> Самообладание : ".$arr['samoobl']."<br/>
<img src='icon/reaction.png' alt=''/> Реакция : ".$arr['reak']."</div>";
?>
</td>
</table>
<table class="wdt gray-table" style="font-size: 10pt">
<td class="white td-cell" align="center" style="height:30px;">
<form action="index.php" method="get">
<input type="submit" class="wdt race-btn" value="В гараж"/>
</form>
</td>
</tr>
</table>
<?
}
if(!isset($_GET['tun']) && !isset($_GET['sost']) && !isset($_GET['color'])){
?>
<table class="wdt msg-table">
<tr>
<td align="left" style="vertical-align: top; width: 10%">
<img src="icon/face-mex.png">
</td>
<td align="left" style="vertical-align: top">
Приветствую тебя в мире гонок! </br></td>
</tr>
</table>
<table class="wdt garage-table">
<tr>
<td align="right" style="padding-top: 10px;">
<table class="wdt">
<tr>
<td style="vertical-align: top; padding-left: 10px;" align="left" rowspan="4">
</td>
<td align="left" class="white" style="vertical-align: top" width="40%"><b>
<?
echo"".$car['name']."";
?>
</b>
</td>
</tr>
<tr>
<td align="left" class="white" nowrap="nowrap" style="font-size: 14px">Мощность: <img src="icon/speed.png"><b class="orange">
<?
echo"".$arr['speed']."";
?> л.с </b></td>
</tr>
<tr>
<td align="left" class="white" style="font-size: 14px">Рейтинг: <img src="icon/rating.png"><b class="yellow">
<?
echo"".$arr['exp']."";
?>
</b></td>
</tr>
<tr>
<td align="left" class="white" style="font-size: 14px">Бензин: <img src="icon/fuel.png"><b class="yellow" style="color: #000"><span id="FUELTIME">
<?
echo"".$arr['level']."";
?></span></b></td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" style="padding-bottom: 0px; padding-left: 10px; padding-right: 10px;" valign="bottom">
</br>
</br>
<?
echo"<img class='wdt' src='car/".(isset($color) ? "".$color."".$car['screen']."" : "".$car['screen']."")."' alt=''/> <br/>";
?>
</br>
<img class="wdt" style="margin-top: -25px;" src="icon/car_shad.png">
</td>
</tr>
</table>
<table class="wdt main-menu">
<tr>
<td class="white" align="center" style="width:25%; border-right: solid 1px #bebebf; vertical-align: bottom;">
<b><a style="text-decoration: none; color: #000" href="gorod.php"><img src="icon/map-ico0.png"><br>
Город</a></b>
</td>
<td class="white" align="center" style="width:25%; border-right: solid 1px #bebebf; vertical-align: bottom;">
<b><a style="text-decoration: none; color: #000" href="index.php?tun"><img src="icon/engine.png"><br>
Тюнинг</a></b>
</td>
<td class="white" align="center" style="width:25%; border-right: solid 1px #bebebf; vertical-align: bottom;">
<b><a style="text-decoration: none; color: #000" href="index.php?sost"><img src="icon/info.png"><br>
Инфо</a></b>
</td>
<td class="gray" align="center" style="width:25%; border-right: solid 1px #bebebf; vertical-align: bottom;">
</td>
<td class="gray" align="center" style="width:25%">
</td>
</tr>
</table>
<table class="wdt gray-table" style="font-size: 10pt">
</table>
<table class="wdt brown-header">
<tr>
<td align="left">Детали улучшают характеристики:</td>
</tr>
</table>
<table class="wdt gray-table" style="font-size: 10pt"><tr>
</form>
</form>
</td>
</tr>
</table>
</td>
</table>
<table class="wdt gray-table" style="font-size: 10pt">
<td class="white td-cell" align="center" style="height:30px;">
<form action="/index.php" method="get">
<input type="submit" class="wdt race-btn" value="На сайт"/>
</form>
</td>
</tr>
</table>
<?
}
?>