<?php
	header('Content-Type: text/html; charset=utf-8');

	include('../../../inc/start.php');
	include('../../../inc/protect.php');

	if(!isset($_POST['token']) || $_SESSION['token'] != clean($_POST['token'], null))
		exit(json_encode(array('status' => 'error', 'text' => 'Неверный токен')));

	if(!strripos($users_groups[$sessionrights]['rights'], "i") !== false)
		exit('0');

	$query = $pdo->query('SELECT `id` FROM `bans` WHERE `status`="0" LIMIT 1');
			 $query->setFetchMode(PDO::FETCH_OBJ);

	if(count($query->fetchAll()))
		exit('1');

	exit('0');
?>