Файл: gonki/leading_machine.php
Строк: 306
<?
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/user.php';
include_once 'glava_gonki.php';
only_reg();
$set['title']='Заправить свою гоночную машину';
include_once '../sys/inc/thead.php';
title();
//ОнЛайн Игра Круто гонки от BleIK
//Игра самая лучшая
if (isset($_POST['save'])){
if ($user['money']>=$price_of_the_leading_in_the_machine0){
if (isset($_POST['avto']) && $_POST['avto']==0)
{
$user['avto']=0;
mysql_query("UPDATE `user` SET `money` = '".($user['money']-$price_of_the_leading_in_the_machine0)."' WHERE `id` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `user` SET `benzines` = '".($user['benzines']=55)."' WHERE `id` = '$user[id]' LIMIT 1");
}
}else $err='У вас недостаточно средств';
if ($user['money']>=$price_of_the_leading_in_the_machine1){
if (isset($_POST['avto']) && $_POST['avto']==1)
{
$user['avto']=1;
mysql_query("UPDATE `user` SET `money` = '".($user['money']-$price_of_the_leading_in_the_machine1)."' WHERE `id` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `user` SET `benzines` = '".($user['benzines']=61)."' WHERE `id` = '$user[id]' LIMIT 1");
}
}else $err='У вас недостаточно средств';
if ($user['money']>=$price_of_the_leading_in_the_machine2){
if (isset($_POST['avto']) && $_POST['avto']==2)
{
$user['avto']=2;
mysql_query("UPDATE `user` SET `money` = '".($user['money']-$price_of_the_leading_in_the_machine2)."' WHERE `id` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `user` SET `benzines` = '".($user['benzines']=45)."' WHERE `id` = '$user[id]' LIMIT 1");
}
}else $err='У вас недостаточно средств';
if ($user['money']>=$price_of_the_leading_in_the_machine3){
if (isset($_POST['avto']) && $_POST['avto']==3)
{
$user['avto']=3;
mysql_query("UPDATE `user` SET `money` = '".($user['money']-$price_of_the_leading_in_the_machine3)."' WHERE `id` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `user` SET `benzines` = '".($user['benzines']=50)."' WHERE `id` = '$user[id]' LIMIT 1");
}
}else $err='У вас недостаточно средств';
if ($user['money']>=$price_of_the_leading_in_the_machine4){
if (isset($_POST['avto']) && $_POST['avto']==4)
{
$user['avto']=4;
mysql_query("UPDATE `user` SET `money` = '".($user['money']-$price_of_the_leading_in_the_machine4)."' WHERE `id` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `user` SET `benzines` = '".($user['benzines']=55)."' WHERE `id` = '$user[id]' LIMIT 1");
}
}else $err='У вас недостаточно средств';
if ($user['money']>=$price_of_the_leading_in_the_machine5){
if (isset($_POST['avto']) && $_POST['avto']==5)
{
$user['avto']=5;
mysql_query("UPDATE `user` SET `money` = '".($user['money']-$price_of_the_leading_in_the_machine5)."' WHERE `id` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `user` SET `benzines` = '".($user['benzines']=60)."' WHERE `id` = '$user[id]' LIMIT 1");
}
}else $err='У вас недостаточно средств';
if ($user['money']>=$price_of_the_leading_in_the_machine7){
if (isset($_POST['avto']) && $_POST['avto']==7)
{
$user['avto']=7;
mysql_query("UPDATE `user` SET `money` = '".($user['money']-$price_of_the_leading_in_the_machine7)."' WHERE `id` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `user` SET `benzines` = '".($user['benzines']=65)."' WHERE `id` = '$user[id]' LIMIT 1");
}
}else $err='У вас недостаточно средств';
if ($user['money']>=$price_of_the_leading_in_the_machine8){
if (isset($_POST['avto']) && $_POST['avto']==8)
{
$user['avto']=8;
mysql_query("UPDATE `user` SET `money` = '".($user['money']-$price_of_the_leading_in_the_machine8)."' WHERE `id` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `user` SET `benzines` = '".($user['benzines']=70)."' WHERE `id` = '$user[id]' LIMIT 1");
}
}else $err='У вас недостаточно средств';
if ($user['money']>=$price_of_the_leading_in_the_machine9){
if (isset($_POST['avto']) && $_POST['avto']==9)
{
$user['avto']=9;
mysql_query("UPDATE `user` SET `money` = '".($user['money']-$price_of_the_leading_in_the_machine9)."' WHERE `id` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `user` SET `benzines` = '".($user['benzines']=75)."' WHERE `id` = '$user[id]' LIMIT 1");
}
}else $err='У вас недостаточно средств';
if ($user['money']>=$price_of_the_leading_in_the_machine10){
if (isset($_POST['avto']) && $_POST['avto']==10)
{
$user['avto']=10;
mysql_query("UPDATE `user` SET `money` = '".($user['money']-$price_of_the_leading_in_the_machine10)."' WHERE `id` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `user` SET `benzines` = '".($user['benzines']=80)."' WHERE `id` = '$user[id]' LIMIT 1");
}
}else $err='У вас недостаточно средств';
if (!isset($err))msg('Автомобиль успешно заправлен');
}
err();
aut();
echo "<div class='index'>";
echo "<form method='post' action='?$passgen'>n";
if ($user['benzines']!=30){
if ($user['avto']==0){
echo "<img src="images/mashine/vaz2107.png" width='328px' /></br><hr/>
<input name='avto' type='radio' ".($user['avto']==0?' checked="checked"':null)." value='0' />Заправить Ваз 2107 $price_of_the_leading_in_the_machine0 $<br />";
}}else{$beside_you_full_tank = 1;}
if ($user['benzines']!=50){
if ($user['avto']==1){
echo "<img src="images/mashine/vaz2112.png" width='328px' /></br><hr/>
<input name='avto' type='radio' ".($user['avto']==1?' checked="checked"':null)." value='1' />Заправить Ваз 2112 $price_of_the_leading_in_the_machine1 $<br />";
}}else{echo "Топливный бак полон, ваш автомобиль не нуждается в заправке.";$beside_you_full_tank = 1;}
if ($user['benzines']!=45){if ($user['avto']==2){
echo "<img src="images/mashine/LanserEvolutionX.png" width='328px' /></br><hr/>
<input name='avto' type='radio' ".($user['avto']==2?' checked="checked"':null)." value='2' />Заправить Lanser Evolution X $price_of_the_leading_in_the_machine2 $<br />";
}}else{echo "Топливный бак полон, ваш автомобиль не нуждается в заправке.";$beside_you_full_tank = 1;}if ($user['benzines']!=65)
{if ($user['avto']==3){
echo "<img src="images/mashine/Pontiac_Solstice.png" width='328px' /></br><hr/>
<input name='avto' type='radio' ".($user['avto']==3?' checked="checked"':null)." value='3' />Заправить Pontiac Solstice $price_of_the_leading_in_the_machine3 $<br />";
}}else{echo "Топливный бак полон, ваш автомобиль не нуждается в заправке.";$beside_you_full_tank = 1;}if ($user['benzines']!=69)
{if ($user['avto']==4){
echo "<img src="images/mashine/BMW_Z4.png" width='328px' /></br><hr/>
<input name='avto' type='radio' ".($user['avto']==4?' checked="checked"':null)." value='4' />Заправить BMW Z4 $price_of_the_leading_in_the_machine4 $<br />";
}}else{echo "Топливный бак полон, ваш автомобиль не нуждается в заправке.";$beside_you_full_tank = 1;}if ($user['benzines']!=70)
{if ($user['avto']==5){
echo "<img src="images/mashine/TVR_Sagaris.png" width='328px' /></br><hr/>
<input name='avto' type='radio' ".($user['avto']==5?' checked="checked"':null)." value='5' />Заправить TVR Sagaris $price_of_the_leading_in_the_machine5 $<br />";
}}else{echo "Топливный бак полон, ваш автомобиль не нуждается в заправке.";$beside_you_full_tank = 1;}if ($user['benzines']!=74)
{if ($user['avto']==7){
echo "<img src="images/mashine/Audi_TT.png" width='328px' /></br><hr/>
<input name='avto' type='radio' ".($user['avto']==7?' checked="checked"':null)." value='7' />Заправить Audi TT $price_of_the_leading_in_the_machine7 $<br />";
}}else{echo "Топливный бак полон, ваш автомобиль не нуждается в заправке.";$beside_you_full_tank = 1;}if ($user['benzines']!=84)
{if ($user['avto']==8){
echo "<img src="images/mashine/Bizzarrini.png" width='328px' /></br><hr/>
<input name='avto' type='radio' ".($user['avto']==8?' checked="checked"':null)." value='8' />Заправить Bizzarrini $price_of_the_leading_in_the_machine8 $<br />";
}}else{echo "Топливный бак полон, ваш автомобиль не нуждается в заправке.";$beside_you_full_tank = 1;}if ($user['benzines']!=94)
{if ($user['avto']==9){
echo "<img src="images/mashine/KTM_X-Bow.png" width='328px' /></br><hr/>
<input name='avto' type='radio' ".($user['avto']==9?' checked="checked"':null)." value='9' />Заправить KTM X-Bow $price_of_the_leading_in_the_machine9 $<br />";
}}else{echo "Топливный бак полон, ваш автомобиль не нуждается в заправке.";$beside_you_full_tank = 1;}if ($user['benzines']!=100)
{if ($user['avto']==10){
echo "<img src="images/mashine/Ferrari_612_Scaglietti_Hamann.png" width='328px' /></br>
<hr/>
<input name='avto' type='radio' ".($user['avto']==10?' checked="checked"':null)." value='10' />Заправить Ferrar 612 Scaglietti Hamann $price_of_the_leading_in_the_machine10 $<br />";
}}else{echo "Топливный бак полон, ваш автомобиль не нуждается в заправке.";$beside_you_full_tank = 1;}if ($user['benzines']!=100)
echo "</select>n<hr/>";
if ($beside_you_full_tank!=1){
echo "<input type='submit' name='save' value='Заправить автомобиль свой' />n";
echo "</form>n";
}
echo"</div>";
include_once '../sys/inc/tfoot.php';
?>