Файл: stalkerus.tk/odinochka.php
Строк: 125
<?php
require_once('conf/dbc.php');
require_once('conf/session_start.php');
require_once('conf/ban.php');
if ((!isset($_SESSION['id'])) or (!isset($_SESSION['nick']))) {
?>
<script type="text/javascript">
document.location.href = "reg.php?err_login=1";
</script>
<?php
}
$page_title = 'Мирон';
require_once('conf/head.php');
require_once('conf/top.php');
$user_id = $_SESSION['id'];
$query = "Select lvl,money, habar from users where id = '$user_id'";
$result = mysqli_query($dbc, $query) or die ('Ошибка передачи запроса к БД');
$row = mysqli_fetch_array($result);
$money = $row['money'];
$vip = $row['vip'];
$habar = $row['habar'];
$lvl = $row['lvl'];
$type = $_GET['type'];
$type = mysqli_real_escape_string($dbc, trim($type));
if ($vip == 1){
$type = 11;
}
if ($type <> 7 and $type <> 8 and $type <> 9 and $type <> 10 and $type <> 11 and $type <> 6) {
if ($lvl >=25) {$type = 9;}
if ($lvl <25) {$type = 8;}
if ($lvl <16) {$type = 7;}
}
?>
<div id="main">
<div class="stats">
<p class="podmenu">Мирон</p>
</div>
<div class="stats">
<p><img src="img/ico/selesman.png"/></p>
</div>
<div class="stats">
<p class="podmenu"><?php
if ($type == 7) {?><img src="img/ico/class1.png" width="12" height="12"/> Одиночки<?php }
if ($type == 8) {?><img src="img/ico/class2.png" width="12" height="12"/> Бывалый<?php }
if ($type == 9) {?><img src="img/ico/class3.png" width="12" height="12"/> Ветеран<?php }
if ($type == 11) {?><img src="img/ico/class3.png" width="12" height="12"/> VIP<?php }
if ($type == 10) {?><img src="img/ico/class4.png" width="12" height="12"/> Легенда<?php }?>
</p>
</div>
</div>
<p class="white" style="background-color:#1e2833;"><b>[Одежда]</b></p>
<?php
$query_c = "Select name,clothes_id,price, price_hab,lvl_need,screen,klass from clothes where klass = '$type'";
$result_c = mysqli_query($dbc, $query_c) or die ('Ошибка передачи запроса к БД');
while ($row_cl = mysqli_fetch_array($result_c)) {?>
<div class="zx">
<table width="190" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td width="54" valign="top"><img src="img/clothes/<?php echo $row_cl['screen'];?>" alt="Слот №1" /></td>
<td width="136" valign="top">
<div class="clothes">
<p>
<?php
if ($row_cl['klass'] == 1) {?><img src="img/ico/class1.png" width="12" height="12"/><?php }
if ($row_cl['klass'] == 2) {?><img src="img/ico/class2.png" width="12" height="12"/><?php }
if ($row_cl['klass'] == 3) {?><img src="img/ico/class3.png" width="12" height="12"/><?php }
if ($row_cl['klass'] == 4) {?><img src="img/ico/class4.png" width="12" height="12"/><?php }
if ($row_cl['klass'] == 5) {?><img src="img/ico/class4.png" width="12" height="12"/><?php }
if ($row_cl['klass'] == 6) {?><img src="img/ico/class4.png" width="12" height="12"/><?php }
?><a class="white" href="sale_thing.php?thing=<?php echo $row_cl['clothes_id'];?>&type=1"><?php echo $row_cl['name'];?></a></p>
<p><span class="white"><?php echo $row_cl['lvl_need'];?></span> ур, новый</p>
<p>Цена:
<?php $pr=0; if ($row_cl['price_hab'] >=0) { $pr=1;?>[<img src="img/ico/materials.png" width="12" height="12"/> <span class="white"><?php echo $row_cl['price_hab'];?></span>]<br /><?php }?>
<?php if ($row_cl['price'] >=0) {$pr=1;?>[<img src="img/ico/money.png" width="12" height="12"/> <span class="white"><?php echo $row_cl['price'];?></span>]<?php }?>
<?php
if ($pr==0) {?>[не продаётся, но можно купить у админа]<?php }?></p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<?php
}
////////////////////Конец одежде.
////////////////////Пистолет
?>
</div>
<div class="stats">
<p class="white" style="background-color:#1e2833;"><b>[Пистолеты]</b></p>
<?php
$query_c = "Select name,pistols_id,price, price_hab,lvl_need,screen,klass from pistols where klass = '$type'";
$result_c = mysqli_query($dbc, $query_c) or die ('Ошибка передачи запроса к БД');
while ($row_cl = mysqli_fetch_array($result_c)) {?>
<div class="zx">
<table width="190" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td width="54" valign="top"><img src="img/weapons/<?php echo $row_cl['screen'];?>" alt="Слот №1" /></td>
<td width="136" valign="top">
<div class="clothes">
<p>
<?php
if ($row_cl['klass'] == 1) {?><img src="img/ico/class1.png" width="12" height="12"/><?php }
if ($row_cl['klass'] == 2) {?><img src="img/ico/class2.png" width="12" height="12"/><?php }
if ($row_cl['klass'] == 3) {?><img src="img/ico/class3.png" width="12" height="12"/><?php }
if ($row_cl['klass'] == 4) {?><img src="img/ico/class4.png" width="12" height="12"/><?php }
if ($row_cl['klass'] == 5) {?><img src="img/ico/class4.png" width="12" height="12"/><?php }
?><a class="white" href="sale_thing.php?thing=<?php echo $row_cl['pistols_id'];?>&type=2"><?php echo $row_cl['name'];?></a></p>
<p><span class="white"><?php echo $row_cl['lvl_need'];?></span> ур, новый</p>
<p>Цена:
<?php $pr=0; if ($row_cl['price_hab'] >=0) { $pr=1;?>[<img src="img/ico/materials.png" width="12" height="12"/> <span class="white"><?php echo $row_cl['price_hab'];?></span>]<br /><?php }?>
<?php if ($row_cl['price'] >=0) {$pr=1;?>[<img src="img/ico/money.png" width="12" height="12"/> <span class="white"><?php echo $row_cl['price'];?></span>]<?php }?>
<?php
if ($pr==0) {?>[не продаётся, но можно купить у админа]<?php }?></p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<?php
}
?>
</div>
<div class="stats">
<p class="white" style="background-color:#1e2833;"><b>[Автоматы]</b></p>
<?php
$query_c = "Select name,weapons_id,price, price_hab,lvl_need,screen,klass from weapons where klass = '$type' order by max_stats_yron ASC";
$result_c = mysqli_query($dbc, $query_c) or die ('Ошибка передачи запроса к БД');
while ($row_cl = mysqli_fetch_array($result_c)) {?>
<div class="zx">
<p class="clothes">
<?php
if ($row_cl['klass'] == 1) {?><img src="img/ico/class1.png" width="12" height="12"/><?php }
if ($row_cl['klass'] == 2) {?><img src="img/ico/class2.png" width="12" height="12"/><?php }
if ($row_cl['klass'] == 3) {?><img src="img/ico/class3.png" width="12" height="12"/><?php }
if ($row_cl['klass'] == 4) {?><img src="img/ico/class4.png" width="12" height="12"/><?php }
if ($row_cl['klass'] == 5) {?><img src="img/ico/class4.png" width="12" height="12"/><?php }
?><a class="white" href="sale_thing.php?thing=<?php echo $row_cl['weapons_id'];?>&type=3"><?php echo $row_cl['name'];?></a></p>
<img src="img/weapons/<?php echo $row_cl['screen'];?>" alt="Слот №1" /></td>
<div class="clothes">
<p><span class="white"><?php echo $row_cl['lvl_need'];?></span> ур, новый</p>
<p>Цена:
<?php $pr=0; if ($row_cl['price_hab'] >=0) { $pr=1;?>[<img src="img/ico/materials.png" width="12" height="12"/> <span class="white"><?php echo $row_cl['price_hab'];?></span>]<br /><?php }?>
<?php if ($row_cl['price'] >=0) {$pr=1;?>[<img src="img/ico/money.png" width="12" height="12"/> <span class="white"><?php echo $row_cl['price'];?></span>]<?php }?>
<?php
if ($pr==0) {?>[не продаётся, но можно купить у админа]<?php }?></p>
</div>
</div>
<?php
}
}
?>
</div>
</div>
<?php
require_once('conf/navig.php');
require_once('conf/foot.php');
mysqli_close($dbc);
?>
</body>
</html>