<?php
$id = abs(intval($_SESSION['id']));
$query = $pdo->query("Select ban, why_ban, nick from users where id = '$id'");
$row = $query->fetch();
$ban = $row['ban'];
$baned=$dbc->query("SELECT * FROM`us_ban` WHERE`usid`='$id' and `type`='game' and `time`>'".time()."'")->fetch_assoc();
$banmd=$dbc->query("SELECT * FROM`users` WHERE`id`='".$baned['usban']."'")->fetch_assoc();
if($baned['time']>time()){echo'<div style="background-color: #000000;"><span class="red"><p class="zx"></p>Ваш персонаж был заблокирован на игру!<br/>Заблокированы до '.date('d.m.y. H:i:s',$baned['time']).'<br/>Модератор: </span> <a style="text-decoration:none;" href="/user.php?id='.$banmd['id'].'">'.$banmd['nick'].'</a><br/><span class="red">Причина: </span>'.htmlentities($baned['prich']).'<p class="zx"></p>';
  require_once('conf/foot.php');
  
echo'</body>
</html>';
  exit();
}
  if ($ban == 1) { 
echo'<div id="main">
    <div class="stats">
<p class="podmenu">Бан '.$row['nick'].'</p>
    </div>
  <div class="stats">
<p>Причина: '.$row['why_ban'].'</p>
  </div>
  <p><img src="img/ico/point.png" width="12" height="12"/> <a href="exit.php">Выход</a></p>
</div>';
  require_once('conf/foot.php');
  
echo'</body>
</html>';
  exit();
  }
  ?>