Файл: tankon.mobi/tanks/barracks.php
Строк: 37
<?
if(isset($_GET['ok']) && $mcu['status']<=2 && $mc['scholl']<100 && $mc['scholl_level']<$time){
if($mc['serebro']<10000000){
err_game('В кассе клана не хватает ресурсов!');
}else{
mysql_query("UPDATE `collective` SET `scholl` = '".($mc['scholl']+1)."' WHERE `id` = '$mc[id]' LIMIT 1");
mysql_query("UPDATE `collective` SET `serebro` = '".($mc['serebro']-10000000)."' WHERE `id` = '$mc[id]' LIMIT 1");
header ("Location: /myclan?barracks");
}
}
if(isset($_GET['bonus']) && $mcu['status']<=2 && $mc['scholl']>0 && $mc['scholl_times']>0 && $mc['scholl_level']<$time){
$timeplus=14400+$time;
mysql_query("UPDATE `collective` SET `scholl_level` = '".$timeplus."', `scholl_times` = '0' WHERE `id` = '$mc[id]' LIMIT 1");
header ("Location: /myclan?barracks");
}
if($mc['scholl_level']>=$time){
$scholl_level=time_left($mc['scholl_level']-$time);
err_sms('<center>Бонус к экипажу на '.$scholl_level.'</center>');
}
echo '<div class="trnt-block" style="margin-bottom:3px">
<div class="wrap1">
<div class="wrap2">
<div class="wrap3">
<div class="wrap4">
<div class="wrap5">
<div class="wrap6">
<div class="wrap7">
<div class="wrap8">
<div class="wrap-content">';
echo "<div class='white sh_b bold cntr'>Казарма</div>";
echo '<div class="thumb fl"><img width="50" height="50" src="/images/barracks.png"><span class="mask2"></span></div>
<div class="ml58 small white sh_b bold">
<span class="green2">Казарма клана - цена 10m серебра</span><br>
Бонус к опыту экипажа<br> Уровень казармы: '.$mc['scholl'].'</div>
';
echo'</div>';echo'</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>';
if ($mcu['status']<=2 && $mc['scholl']<100 && $mc['scholl_level']<$time){
echo '<div class="bot"><table><tbody><tr>';
echo'<td class="w100 pr1"><a class="simple-but border" href="/myclan?barracks&ok"><span><span>Улучшить +1</span></span></td>';
echo'</tr></tbody></table></div>';}
if ($mcu['status']<=2 && $mc['scholl']>0 && $mc['scholl_times']>0 && $mc['scholl_level']<$time){
echo '<div class="bot"><table><tbody><tr>';
echo'<td class="w100 pr1"><a class="simple-but border" href="/myclan?barracks&bonus"><span><span>Включить бонус</span></span></td>';
echo'</tr></tbody></table></div>';}
echo'<a class="simple-but gray mb10" href="/myclan"><span><span>Назад</span></span></a></div>';
include_once 'foots.php';
exit;
?>