<?php

include 'conf/dbc.php';
include 'conf/session_start.php';
$page_title = 'Админ-панель';
include 'conf/head.php';
include 'conf/top.php';
$user_id = abs(intval($_SESSION['id']));
$query = $pdo->query("Select location from users where id = '$user_id' limit 1");
$row = $query->fetch();
$location = $row['location'];
if ($location == 'adminka') {}else {
$pdo->exec("update users set location = 'adminka' where id = '$user_id' limit 1");
}
$user_id=abs(intval($_SESSION['id']));
$row=$dbc->query("SELECT * FROM `users` WHERE`id`='$user_id' LIMIT 1")->fetch_assoc();
if($row['admin']<'1'){header('location: /');}

echo '<center><p class="name2">Модер-панель</p></center>';
echo'<div class="menu3"><div class="menu3_text">';
echo "<a class='touch' style='text-decoration:none;' href='ad_smile.php'><img src='inc/arrow.png'>Добавить смайл <span class='bonus'>(new)</span></a><p>
<a class='touch' style='text-decoration:none;' href='adm_chat.php'><img src='inc/arrow.png'>Комната совещаний</a><p>
<a class='touch' style='text-decoration:none;' href='blist.php'><img src='inc/arrow.png'>Список заблокированных</a><p>";
echo'</div></div>';
require_once('conf/navig.php');
require_once('conf/foot.php');
mysqli_close($dbc);
?>