Вход Регистрация
Файл: garage.php
Строк: 229
<?php
require_once 'inc/system.php';
require_once 
'inc/head.php';

no_auth();


if(isset(
$_SESSION['msg'])){
echo 
'<img src="style/img/man.png" style="float:left;margin:5px 5px 20px 20px;"> 
<div class="tip-text"><div class="tit-t">
<b style="text-shadow:1px 1px 2px #0b4731;">'
.$_SESSION['msg'].'  </b></div></div>';
$_SESSION['msg']=NULL;
}

if(isset(
$_SESSION['lott'])){
echo 
'<div class="tip-text"><div class="tit-t"><b style="text-shadow:1px 1px 2px #0b4731;">'.$_SESSION['lott'].'  </b></div></div>';
$_SESSION['lott']=NULL;
}

$news mysql_fetch_array(mysql_query("SELECT * FROM `news` ORDER BY `id` DESC LIMIT 1"));

$countn mysql_num_rows(mysql_query("SELECT * FROM `news`"));

if(
$countn != '0'){



echo 
'<img src="style/img/man.png" style="float:left;margin:5px 5px 20px 20px;"> 
<div class="tip-text"><div class="tit-t">
<b style="text-shadow:1px 1px 2px #0b4731;">  '
.text($news['msg']).'</b> </div></div>';
}


echo 
'

<div class="garah">

<center>
<img src="'
.$my_moto['moto_img'].'"  width="70%"><br/> <br/></div>

<div class="ob-vh">

<b>'
.$my_moto['moto_name'].'  <b class="class-'.$my_moto['class'].'">'.$my_moto['class'].'</b></b> <br/> 

 <img src="/style/img/power.png"> Мощность: '
.$my_moto['power'].'  <br />
 <img src="/style/img/star.png"> Рейтинг: '
.$user['raiting'].'   <img src="/style/img/fuel.png"> Топливо: '.$user['fuel'].'   <br/>
 <img src="/style/img/level.png" wdith="12" height="12"> Уровень: '
.$user['level'].'   <img src="/style/img/level.png" wdith="12" height="12"> Опыт: '.$user['opit'].'/'.$swleveln.'   <br/>







</center></div></div>

</center>



<br/>'
;

echo
"<table class='wdt main-menu'><tr><td class='white' align='center' style='width:25%; border-right: solid 1px #37414B; vertical-align: bottom;'><b><a style='text-decoration: none; color: #000' href='/my.motorcykle'><img src='style/img/moto.png' wdith='25' height='25'></a></b></td><td class='gray' align='center' style='width:25%'><b><a style='text-decoration: none; color: #000'><a href='/turnir'><img src='style/img/cup.png' wdith='25' height='25'></a></b></td></tr></table>";

///echo '<a href=""><div class="link"><img src="style/img/moto.png"> Мои мотоциклы <small><font color="#3d8f71"><b> '.$countmoto.' </b></font></small></div></a>';
///echo '<a href="/tun.motorcykle"><div class="link"><img src="style/img/tuning.png"> Тюнинг мотоцикла</div></a>';
///echo '<a href="/settings"><div class="link"><img src="style/img/settings.png"> Настройки</div></a>';
///echo '<a href="/turnir"><div class="link"><img src="style/img/cup.png" wdith="19" height="19"> Турнир</div></a>';


if($my_moto['shina'] < 5){
if(isset(
$_POST['submit1'])){
if((
$user['money'] - shina_cena($my_moto['shina'])) >= 0){
mysql_query("UPDATE `garage` SET `shina` = `shina`+1, `power` = `power`+'".shina_speed($my_moto['shina'])."' WHERE `id` = '".$my_moto['id']."'");
mysql_query("UPDATE `user` SET `money` = `money`-'".shina_cena($my_moto['shina'])."' WHERE `id` = '".$user['id']."'");
header("Location:/garage.php");
}
}

echo 
'
<div class="ob-vh">
<br/>
<table><tbody><tr><td><img src="/style/img/upg/candle.png" alt=""> 
<br>  
<center>'
.($my_moto['shina']+1).' ур.</center>  
</td>  
<td><b>Свечи</b><br><br>
<img src="/style/img/power.png" alt=""> <b><font color="#ff8a2d">+ '
.shina_speed($my_moto['shina']).' л.с.</font></b> <br> 
<img src="/style/img/money.png" alt=""> <b><font color="#5ca13a">- '
.shina_cena($my_moto['shina']).'</font></b><br><br>
</td></tr></tbody></table>
<center>'
;


if((
$user['money'] - shina_cena($my_moto['shina'])) < 0){
echo 
'<input class="no-upgrad" type="submit" value="Не хватает денег"></center></div>';
}else{
echo 
'<form method="post" action=""><input class="upgrad" type="submit" name="submit1" value="Улучшить"></form></center></div>';
}
}



if(
$my_moto['tran'] < 5){
if(isset(
$_POST['submit2'])){
if((
$user['money'] - tran_cena($my_moto['tran'])) >= 0){
mysql_query("UPDATE `garage` SET `tran` = `tran`+1, `power` = `power`+'".tran_speed($my_moto['tran'])."' WHERE `id` = '".$my_moto['id']."'");
mysql_query("UPDATE `user` SET `money` = `money`-'".tran_cena($my_moto['tran'])."' WHERE `id` = '".$user['id']."'");
header("Location:/garage.php");
}
}


echo 
'<div class="ob-vh">
<br/>
<table><tbody><tr><td><img src="/style/img/upg/flywheel.png" alt=""> 
<br>  
<center>'
.($my_moto['tran']+1).' ур.</center>  
</td>  
<td><b>Маховик</b><br><br>
<img src="/style/img/power.png" alt=""> <b><font color="#ff8a2d">+ '
.tran_speed($my_moto['tran']).' л.с.</font></b> <br> 
<img src="/style/img/money.png" alt=""> <b><font color="#5ca13a">- '
.tran_cena($my_moto['tran']).'</font></b><br><br>
</td></tr></tbody></table>
<center>'
;



if((
$user['money'] - tran_cena($my_moto['tran'])) < 0){
echo 
'<input class="no-upgrad" type="submit" value="Не хватает денег"></center></div>';
}else{
echo 
'<form method="post" action=""><input class="upgrad" type="submit" name="submit2" value="Улучшить"></form></center></div>';
}
}




if(
$my_moto['porshni'] < 5){
if(isset(
$_POST['porshni'])){
if((
$user['money'] - porshni_cena($my_moto['porshni'])) >= 0){
mysql_query("UPDATE `garage` SET `porshni` = `porshni`+1, `power` = `power`+'".porshni_speed($my_moto['porshni'])."' WHERE `id` = '".$my_moto['id']."'");
mysql_query("UPDATE `user` SET `money` = `money`-'".porshni_cena($my_moto['porshni'])."' WHERE `id` = '".$user['id']."'");
header("Location:/garage.php");
}
}


echo 
'<div class="ob-vh">
<br/>
<table><tbody><tr><td><img src="/style/img/upg/benzonasos.png" alt=""> 
<br>  
<center>'
.($my_moto['porshni']+1).' ур.</center>  
</td>  
<td><b>Бензонасос</b><br><br>
<img src="/style/img/power.png" alt=""> <b><font color="#ff8a2d">+ '
.porshni_speed($my_moto['porshni']).' л.с.</font></b> <br> 
<img src="/style/img/money.png" alt=""> <b><font color="#5ca13a">- '
.porshni_cena($my_moto['porshni']).'</font></b><br><br>
</td></tr></tbody></table>
<center>'
;


if((
$user['money'] - porshni_cena($my_moto['porshni'])) < 0){
echo 
'<input class="no-upgrad" type="submit" value="Не хватает денег"></center></div>';
}else{
echo 
'<form method="post" action=""><input class="upgrad" type="submit" name="porshni" value="Улучшить"></form></center></div>';
}
}




if(
$my_moto['tormoza'] < 5){
if(isset(
$_POST['tormoza'])){
if((
$user['money'] - tormoza_cena($my_moto['tormoza'])) >= 0){
mysql_query("UPDATE `garage` SET `tormoza` = `tormoza`+1, `power` = `power`+'".tormoza_speed($my_moto['tormoza'])."' WHERE `id` = '".$my_moto['id']."'");
mysql_query("UPDATE `user` SET `money` = `money`-'".tormoza_cena($my_moto['tormoza'])."' WHERE `id` = '".$user['id']."'");
header("Location:/garage.php");
}
}


echo 
'<div class="ob-vh">
<br/>
<table><tbody><tr><td><img src="/style/img/upg/piston_upg.png" alt=""> 
<br>  
<center>'
.($my_moto['tormoza']+1).' ур.</center>  
</td>  
<td><b>Поршни</b><br><br>
<img src="/style/img/power.png" alt=""> <b><font color="#ff8a2d">+ '
.tormoza_speed($my_moto['tormoza']).' л.с.</font></b> <br> 
<img src="/style/img/money.png" alt=""> <b><font color="#5ca13a">- '
.tormoza_cena($my_moto['tormoza']).'</font></b><br><br>
</td></tr></tbody></table>
<center>'
;


if((
$user['money'] - tormoza_cena($my_moto['tormoza'])) < 0){
echo 
'<input class="no-upgrad" type="submit" value="Не хватает денег"></center></div>';
}else{
echo 
'<form method="post" action=""><input class="upgrad" type="submit" name="tormoza" value="Улучшить"></form></center></div>';
}
}

require_once 
'inc/foot.php';

?>
Онлайн: 1
Реклама