<?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');
if ((isset($_SESSION['id'])) and (isset($_SESSION['nick'])))  {

$user_id = abs(intval($_SESSION['id']));
  /////////////////////////////////
  ////////////////////////////////////Записали локацию
  $query = "Select  location from users where id = '$user_id'  limit 1";
  $result = mysqli_query($dbc, $query) or die ('Ошибка передачи запроса к БД6');
  $row = mysqli_fetch_array($result);
$query_loc = "update users set location = 'baza_chn' where id = '$user_id' limit 1";
$result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
require_once('conf/top.php');
$H=getenv("HTTP_REFERER");
//////////////////////////////////////
?><br/>
<div class="profile"><center>Город Тогор</center></div>
<img width="100%"  src="img/baza_chn.png"></img> 
<center> <p class="name2" style="border-top:1px solid #444e4f; background-color:#1c252f ;">Пройти к :</p></center> 
<div class="inoy">
<a href="syslov.php"><img src="img/ico/link.png" width="12" height="12"/></img>Лами</a>
<a href="bar.php"><img src="img/ico/link.png" width="12" height="12"/></img>Таверна <span class="red">New</span></a>

<a href="saharov.php"><img src="img/ico/link.png" width="12" height="12"/></img>Владиан</a>


</div><div class="foot"><center><p><a href="<?php echo "$H" ?>" class="foot"><img src="img/ico/left.png" alt="."/> Выйти</a></p></center></div>
<?php
}


//////////////////////////////////////

require_once('conf/navig.php');
require_once('conf/foot.php');
?>
</body>
</html>