<?php

require_once('conf/dbc.php');
require_once('conf/session_start.php');
require_once('conf/ban.php');
if ((isset($_SESSION['id'])) and (isset($_SESSION['nick'])))  {
  $page_title = 'Захват';
  require_once('conf/head.php');
  require_once('conf/top.php');
$user_id = abs(intval($_SESSION['id']));
  $query_loc = "update users set location = 'index' where id = '$user_id'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $query = "Select gruppa,lvl,hp from users where id = '$user_id'";
  $result = mysqli_query($dbc, $query) or die ('Ошибка передачи запроса к БД');
  $row = mysqli_fetch_array($result);
  $health = $row['hp'];
  if ($health <= 0) {//Если здоровье равно 0, то ссылкаемся на смерть
  ?>
  <script type="text/javascript">
  document.location.href = "death.php";
  </script>
  <?php
  exit();
}
//Для путеводителя новичкам:)
$usid=abs(intval($_SESSION['id']));
$row=$dbc->query("SELECT * FROM `users` WHERE`id`='$usid' LIMIT 1")->fetch_assoc();
if($row[tainik]=='1'){header('location: tainiki.php');}
  ?><br/>
  <div id="main">
  
  <center><p class="name2">Карта Мира</p>
<?php
if ($row['lvl'] == '3' or $row['lvl'] == '4') { echo '<p style="border-style: double;"><span class="white">Вот он, родимый, Мир!.. Пока для тебя доступна только один мир - Сарум. Зайди туда и убей несколько мутантов... О, сообщение от весника пришло, кажется кому-то нужна моя помощь. На этом твое обучение окончено, может еще увидимся... </span></p>  <div class="stats">';}
?>
<img  width="50%"  alt="Карта мира картинка" src="img/karta2.png" width="240" height="80"></img>
</center>
  </div>
  <?php 
$err = abs(intval($_GET['err']));
  if (!empty($err)) {
  ?>
  <div id="error">
  <?php if ($err == 1) {echo 'Сюда можно только с 10 ур';}?>
  <?php if ($err == 2) {echo 'Сюда можно только с 15 ур';}?>
  <?php if ($err == 3) {echo 'Сюда можно только с 20 ур';}?>
  <?php if ($err == 4) {echo 'Сюда можно только с 25 ур';}?>
  <?php if ($err == 5) {echo 'Сюда можно только с 30 ур';}?>
  <?php if ($err == 6) {echo 'Сюда можно только с 35 ур';}?>
  <?php if ($err == 7) {echo 'Сюда можно только с 40 ур';}?>
  </div>
  <?php
  }
  if ($row['gruppa'] == 'naemniki') {
  ?>
  <div class="stats">
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'base'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?>
  <p><div class="line"></div><div class="player title"><font size="3">
<?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="base.php">Сарум
<?php
if ($row['lvl'] == '3' or $row['lvl'] == '4') { echo '<img src="img/1.gif"/>';}
?></a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'kordon1'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="kordon.php?location=kordon1">Миртос</a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'svalka1'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="svalka.php?location=svalka1">Остров Смерти</a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'agroprom1'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="agroprom.php?location=agroprom1">Манхен</a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'yantar1'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="yantar.php?location=yantar1">Темный лес</a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'voensklad1'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="voensklad.php?location=voensklad1">Катакомбы Ада</a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'pripyat1'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="pripyat.php?location=pripyat1">Портовинктар</a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'aes3'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
 
  <?php
  }
  if ($row['gruppa'] == 'dolg') {
  ?>
  <div class="stats">
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'base'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="base.php">Сарум
<?php
if ($row['lvl'] == '3' or $row['lvl'] == '4') { echo '<img src="img/1.gif"/>';}
?></a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'kordon3'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="kordon.php?location=kordon3">Кордон, АТП</a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'svalka3'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="svalka.php?location=svalka3">Свалка, Северный блокпост</a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'agroprom6'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
   if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="agroprom.php?location=agroprom6">Агропром, Болото</a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'yantar6'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="yantar.php?location=yantar6">Янтарь, Лаборатория Х-16</a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'voensklad7'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="voensklad.php?location=voensklad7">Лаборатория Х-18, комната тушканов</a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'pripyat10'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="pripyat.php?location=pripyat10">Припять, Кинотеатр</a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'aes1'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="soon.php">ЧАЭС, Бункер "О-Сознания"</a></p>
  </div>
  <?php
  }
  if ($row['gruppa'] == 'svoboda') {
    ?>
  <div class="stats">
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'base'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="base.php">Сарум
<?php
if ($row['lvl'] == '3' or $row['lvl'] == '4') { echo '<img src="img/1.gif"/>';}
?></a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'kordon2'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="kordon.php?location=kordon2">Кордон, Элеватор</a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'svalka2'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="svalka.php?location=svalka2">Свалка, Барахолка</a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'agroprom2'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="agroprom.php?location=agroprom2">Агропром, база Долга</a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'yantar2'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="yantar.php?location=yantar2">Янтарь, Заболоченное озеро</a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'voensklad2'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="voensklad.php?location=voensklad2">Лаборатория Х-18, Вход в лабораторию</a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'pripyat2'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
   if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="pripyat.php?location=pripyat2">Припять, Окраина</a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'aes4'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="soon.php">ЧАЭС, Штаб Горизонта</a></p>
  
  <?php
  }
 if ($row['gruppa'] == 'chistoenebo') {
  ?>
  <div class="stats">
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'base'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="base.php">Сарум
<?php
if ($row['lvl'] == '3' or $row['lvl'] == '4') { echo '<img src="img/1.gif"/>';}
?></a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'kordon3'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="kordon.php?location=kordon4">Кордон, Военный блокпост</a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'svalka3'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="svalka.php?location=svalka4">Свалка, Депо</a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'agroprom6'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
   if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="agroprom.php?location=agroprom5">Агропром, Северный комплекс</a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'yantar6'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="yantar.php?location=yantar3">Янтарь, Труба</a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'voensklad7'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="voensklad.php?location=voensklad6">Лаборатория Х-18, комната тушканов</a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'pripyat10'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="pripyat.php?location=pripyat10">Припять, Кинотеатр</a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'aes1'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="soon.php">ЧАЭС, Бункер "О-Сознания"</a></p>
  </div>
  <?php
  }
 if ($row['gruppa'] == 'renegat') {
  ?>
  <div class="stats">
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'base'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="base.php">Сарум
<?php
if ($row['lvl'] == '3' or $row['lvl'] == '4') { echo '<img src="img/1.gif"/>';}
?></a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'kordon3'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="kordon.php?location=kordon4">Кордон, Военный блокпост</a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'svalka3'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="svalka.php?location=svalka4">Свалка, Депо</a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'agroprom6'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
   if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="agroprom.php?location=agroprom3">Агропром, Лагерь на болоте</a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'yantar6'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="yantar.php?location=yantar5">Янтарь, Завод</a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'voensklad7'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="voensklad.php?location=voensklad7">Лаборатория Х-18, комната тушканов</a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'pripyat10'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="pripyat.php?location=pripyat10">Припять, Кинотеатр</a></p>
  <?php
  $query_loc = "Select lvl_need, bp_gruppa from location where location_name = 'aes1'";
  $result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
  $row_loc = mysqli_fetch_array($result_loc);
  ?></font>
</div>
  <p><div class="line"></div><div class="player title"><font size="3"><?php
  if ($row_loc['bp_gruppa'] == 'svoboda') {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'dolg') {?><img src="img/ico/dolgon.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'naemniki') {?><img src="img/ico/naemniki.png" width="12" height="12" alt="o"/><?php }
  if ($row_loc['bp_gruppa'] == 'renegat') {?><img src="img/ico/renegat.png" width="12" height="12" alt="s"/><?php }
  if ($row_loc['bp_gruppa'] == 'chistoenebo') {?><img src="img/ico/chistoenebo.png" width="12" height="12" alt="s"/><?php }
  ?> <a <?php if ($row['lvl'] >= $row_loc['lvl_need']) {?>class="white"<?php } ?> href="soon.php">ЧАЭС, Бункер "О-Сознания"</a></p>
  </div>
  <?php
  }
  require_once('conf/navig.php');
require_once('conf/foot.php');
}
else {
?>
<script type="text/javascript">
  document.location.href = "login.php";
</script>
<?php
}
mysqli_close($dbc);
?>