<?php
 
include_once 'session_start.php';
$id = filter(isset($_SESSION['id']));
$query = $pdo->query("Select ban, why_ban, nick from users where id = '$id'");
$row = $query->fetch();
$ban = $row['ban'];
if ($ban == 1) { 
echo'<script type="text/javascript">
  document.location.href = "index.php";
</script>';
exit();
}
?>