Файл: tankon.mobi/tanks/eki.php
Строк: 252
<?
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 '../sys/inc/thead.php';
title();
err();
aut();
echo '<link rel="stylesheet" href="style.css" type="text/css" />';
include_once 'function.php';
$cena1=5000;
$cena2=5000;
$cena3=5000;
$cena4=5000;
if(isset($_GET['obuch'])){
if($_GET['obuch']==1 && $tanks_code['e1']<=99){
if($tanks_code['serrating']>=$cena1){
mysql_query("UPDATE `tanks` SET `e1`='".($tanks_code['e1']+1)."', `serrating`='".($tanks_code['serrating']-$cena1)."' WHERE `id_u`='".$user['id']."'");
mysql_query("UPDATE `tanks_angar` SET `e1`='".($tanks_code['e1']+1)."' WHERE `user`='".$user['id']."' AND `tank`='".$tanks_code['tank']."'");
header("Location: /eki");
}else{err_game('Не хватает серебряного опыта');}
}
elseif($_GET['obuch']==2 && $tanks_code['e2']<=99){
if($tanks_code['serrating']>=$cena2){
mysql_query("UPDATE `tanks` SET `e2`='".($tanks_code['e2']+1)."', `serrating`='".($tanks_code['serrating']-$cena2)."' WHERE `id_u`='".$user['id']."'");
mysql_query("UPDATE `tanks_angar` SET `e2`='".($tanks_code['e2']+1)."' WHERE `user`='".$user['id']."' AND `tank`='".$tanks_code['tank']."'");
header("Location: /eki");
}else{err_game('Не хватает серебряного опыта');}
}
elseif($_GET['obuch']==3 && $tanks_code['e3']<=99){
if($tanks_code['serrating']>=$cena3){
mysql_query("UPDATE `tanks` SET `e3`='".($tanks_code['e3']+1)."', `serrating`='".($tanks_code['serrating']-$cena3)."' WHERE `id_u`='".$user['id']."'");
mysql_query("UPDATE `tanks_angar` SET `e3`='".($tanks_code['e3']+1)."' WHERE `user`='".$user['id']."' AND `tank`='".$tanks_code['tank']."'");
header("Location: /eki");
}else{err_game('Не хватает серебряного опыта');}
}
elseif($_GET['obuch']==4 && $tanks_code['e4']<=99){
if($tanks_code['serrating']>=$cena4){
mysql_query("UPDATE `tanks_angar` SET `e4`='".($tanks_code['e4']+1)."' WHERE `user`='".$user['id']."' AND `tank`='".$tanks_code['tank']."'");
mysql_query("UPDATE `tanks` SET `e4`='".($tanks_code['e4']+1)."', `serrating`='".($tanks_code['serrating']-$cena4)."' WHERE `id_u`='".$user['id']."'");
header("Location: /eki");
}else{err_game('Не хватает серебряного опыта');}
}
else{header("Location:/eki");}
}
if($tank_lin['strana']==1){$eki_ava='ger';}
elseif($tank_lin['strana']==2){$eki_ava='sssr';}
elseif($tank_lin['strana']==3){$eki_ava='ame';}
elseif($tank_lin['strana']==4){$eki_ava='fra';}
elseif($tank_lin['strana']==5){
if($tank_lin['orud']=='Германия'){$eki_ava='ger';}
elseif($tank_lin['orud']=='СССР'){$eki_ava='sssr';}
elseif($tank_lin['orud']=='США'){$eki_ava='ame';}
elseif($tank_lin['orud']=='Франция'){$eki_ava='fra';}
}
echo '<div class="trnt-block p5" style="margin-bottom:5px;">';
echo "<div class='white sh_b bold cntr'>Экипаж <img src='/tanks/images/exps.png'><font color='grey'>".$tanks_code['serrating']."</font></div>";
echo'</div>';
if($mc['scholl_level']>=$time){
$schsol=$mc['scholl'];
}else{
$schsol=0;
}
echo'<table style="width:100%;margin-bottom:3px;border-collapse:collapse;border-spacing:0;"><tbody><tr><td>';
echo '<div class="trnt-block p5" style="margin-bottom:3px;">';
echo '<div class="thumb fl"><img width="50" height="50" src="/images/eki/'.$eki_ava.'/eki1.png"><span class="mask2"></span></div>
<div class="ml58 small white sh_b bold">
<span class="green2">Командир <img src="/tanks/images/exps.png"><font color="grey">'.$cena1.'</font></span><br>
Бонус к атаке<br> Процент умений: <span class="green2">'.($tanks_code['e1']+$schsol).' %</span></div>';
echo'</div>';
echo'</td><td style="width:52px;padding-left:3px;">';
if($tanks_code['e1']<=99){echo'<a href="/eki?obuch=1"><img src="/tanks/images/plusgo.png"></a>';}
else{echo'<img src="/tanks/images/okays.png">';}echo'</td></tr></tbody></table>';
echo'<table style="width:100%;margin-bottom:3px;border-collapse:collapse;border-spacing:0;"><tbody><tr><td>';
echo '<div class="trnt-block p5" style="margin-bottom:3px;">';
echo '<div class="thumb fl"><img width="50" height="50" src="/images/eki/'.$eki_ava.'/eki2.png"><span class="mask2"></span></div>
<div class="ml58 small white sh_b bold">
<span class="green2">Тех.сервис <img src="/tanks/images/exps.png"><font color="grey">'.$cena2.'</font></span><br>
Бонус к броне<br> Процент умений: <span class="green2">'.($tanks_code['e2']+$schsol).' %</span></div>';
echo'</div>';
echo'</td><td style="width:52px;padding-left:3px;">';
if($tanks_code['e2']<=99){echo'<a href="/eki?obuch=2"><img src="/tanks/images/plusgo.png"></a>';}
else{echo'<img src="/tanks/images/okays.png">';}echo'</td></tr></tbody></table>';
echo'<table style="width:100%;margin-bottom:3px;border-collapse:collapse;border-spacing:0;"><tbody><tr><td>';
echo '<div class="trnt-block p5" style="margin-bottom:3px;">';
echo '<div class="thumb fl"><img width="50" height="50" src="/images/eki/'.$eki_ava.'/eki3.png"><span class="mask2"></span></div>
<div class="ml58 small white sh_b bold">
<span class="green2">Наводчик <img src="/tanks/images/exps.png"><font color="grey">'.$cena3.'</font></span><br>
Бонус к точности<br> Процент умений: <span class="green2">'.($tanks_code['e3']+$schsol).' %</span></div>';
echo'</div>';
echo'</td><td style="width:52px;padding-left:3px;">';
if($tanks_code['e3']<=99){echo'<a href="/eki?obuch=3"><img src="/tanks/images/plusgo.png"></a>';}
else{echo'<img src="/tanks/images/okays.png">';}
echo'</td></tr></tbody></table>';
echo'<table style="width:100%;margin-bottom:3px;border-collapse:collapse;border-spacing:0;"><tbody><tr><td>';
echo '<div class="trnt-block p5" style="margin-bottom:3px;">';
echo '<div class="thumb fl"><img width="50" height="50" src="/images/eki/'.$eki_ava.'/eki4.png"><span class="mask2"></span></div>
<div class="ml58 small white sh_b bold">
<span class="green2">Механик-водитель <img src="/tanks/images/exps.png"><font color="grey">'.$cena4.'</font></span><br>
Бонус к прочности<br> Процент умений: <span class="green2">'.($tanks_code['e4']+$schsol).' %</span></div>';
echo'</div>';
echo'</td><td style="width:52px;padding-left:3px;">';
if($tanks_code['e4']<=99){echo'<a href="/eki?obuch=4"><img src="/tanks/images/plusgo.png"></a>';}
else{echo'<img src="/tanks/images/okays.png">';}echo'</td></tr></tbody></table>';
echo'
<a style="margin-bottom:3px;" class="simple-but gray mb10" href="/profile">
<span>
<span>Назад в профиль</span>
</span>
</a>
</div>';
include_once 'foots.php';
?>