Файл: tankon.mobi/tanks/surprizsssse.php
Строк: 112
<?
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';
err();
aut();
echo '<link rel="stylesheet" type="text/css" href="style.css"/>';
include_once 'function.php';
if($tanks_code['mart']!=0){header ("location: / ");}
else{
if(isset($_GET['world'])){
if(isset($_GET['id'])){
if($_GET['id']!=57){
$coding_tanks = mysql_fetch_array(mysql_query("SELECT * FROM `tanks_magazin` WHERE `id`='".intval($_GET['id'])."'"));
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `tanks_angar` WHERE `user` = '".$tanks_code['id_u']."' AND `tank` = '".$coding_tanks['id']."'"), 0)==0){
mysql_query("INSERT INTO `tanks_angar` (`user`,`leveltank`,`ataka`,`bron`,`toch`,`proch`,`tank`) VALUES ('$tanks_code[id_u]','$coding_tanks[level]','$coding_tanks[ataka]','$coding_tanks[bron]','$coding_tanks[toch]','$coding_tanks[proch]','$coding_tanks[id]')");
mysql_query("UPDATE `tanks` SET `angars`=`angars`+'1' WHERE `id_u`='".$user['id']."' ");
mysql_query("UPDATE `tanks` SET `mart`='1' WHERE `id_u`='".$user['id']."' ");
header("Location: /");
}
else{
err_game('У вас в ангаре есть такой танк');
}
}
}
}
$tank_1 = mysql_query("SELECT * FROM `tanks_magazin` WHERE `strana`='0' AND `id`='102'");
while($tanks = mysql_fetch_array($tank_1)) {
echo '<div class="trnt-block">
<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">
<div class="small bold cD2 cntr sh_b pb5 pt5">'.$tanks['name'].'</div>
<table >
<tbody>
<tr>
<td>
<img class="tank-img" style="width:160px; height:100px;" alt="tank" src="/tanks/images/tanks/'.$tanks['screen'].'">
</td><td style = " width : 125px ; " ><div class="white small sh_b bold mb10">'.$tanks['level'].' уровень<br>'.$tanks['ataka'].' атака<br>'.$tanks['bron'].' броня<br>'.$tanks['toch'].' точность<br>'.$tanks['proch'].' прочность<br>'.$tanks['type'].'</div></td>
</tr>
</tbody>
</table>';
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `tanks_angar` WHERE `user` = '".$tanks_code['id_u']."' AND `tank` = '$tanks[id]'"), 0)==0){
echo'<div class="bot">
<a class="simple-but border" href="?world&id='.$tanks['id'].'">
<span>
<span>+1 ангар и танк
</span>
</span>
</a>';
}
echo' </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div></div>
</div>';
}
echo'</div>';
}
?>