Файл: tjersy.worldbyte.net/inc/standart/tun.moto.php
Строк: 182
<?php
require_once '../system.php';
require_once '../head.php';
no_auth(); //Закроем от юзеров
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;"> Здесь ты можешь затюнинговать свой байк в плане мощности. </b>
</div></div>';
echo '<div class="top-tit"><div class="tit-t">Основной мотоцикл</div></div>
<div class="vhh">';
echo '<center><img src="'.$my_moto['moto_img'].'"> <br/>
<img src="/style/img/power.png"> Мощность: '.$my_moto['power'].' <br/><b>'.$my_moto['moto_name'].' </b> </center></div></div>
<div class="top-tit"><div class="tit-t"> Улучшение мотоцикла</div></div>';
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:/tun.motorcykle?tun");
}
}
echo '
<div class="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:/tun.motorcykle?tun");
}
}
echo '<div class="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:/tun.motorcykle?tun");
}
}
echo '<div class="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:/tun.motorcykle?tun");
}
}
echo '<div class="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 '../foot.php';
?>