<?php
define('NTLCMS', 1);
$module = 'menu';
include ('system/start.php');
include ('system/function.php');
include ('system/antidos.php');
$page_title = 'Личный кабинет - клик клуба ' . strtoupper($_SERVER['HTTP_HOST']);
include ('system/head.php');
if (!$active){
header('Location: '.URL);
$_SESSION['fail'] = 'Вы не авторизированы!';
exit;
}
echo '<div class="title"><b>'.razd.' Личный кабинет '.$ulogin.'</b></div>';
$inputlog = DB :: run() -> querySingle("select count(`id`) from `auth` where `login` = ?", array($ulogin));
$mymail = DB :: run() -> querySingle("select count(`id`) from `message` where `komy` = ?", array($ulogin));
$mynotice = DB :: run() -> querySingle("select count(`id`) from `notice` where `to` = ?", array($ulogin));
$usref = DB :: run() -> querySingle("select count(`id`) from `ref` where `who` = ?", array($ulogin));
echo '<div class="menu"><i class="fa fa-bell-o fa-fw"></i> <a href="'.URL.'/notice">Уведомления</a> <span class="count">'.((int) $mynotice).'</span></div>';
echo '<div class="menu"><i class="fa fa-envelope-o fa-fw"></i> <a href="'.URL.'/messages">Личная почта</a> <span class="count">'.((int) $mymail).'</span></div>';			
echo '<div class="menu"><i class="fa fa-file-text-o fa-fw"></i> <a href="'.URL.'/inputlogs">Логи авторизаций</a> <span class="count">'.((int) $inputlog).'</span></div>';
echo '<div class="menu"><i class="fa fa-users fa-fw"></i> <a href="'.URL.'/referals">Мои рефералы</a> <span class="count">'.((int) $usref).'</span></div>';
echo '<div class="menu"><i class="fa fa-cog fa-fw"></i> <a href="'.URL.'/changes">Мои настройки</a></div>';
echo '<div class="menu"><i class="fa fa-globe fa-fw"></i> <a href="'.URL.'/city">Местонахождение</a></div>';		
echo '<div class="menu"><i class="fa fa-user-circle fa-fw"></i> <a href="'.URL.'/avatar">Мой аватар</a></div>';		
echo '<div class="menu"><i class="fa fa-key fa-fw"></i> <a href="'.URL.'/pass">Смена пароля</a></div>';
echo '<div class="block"><i class="fa fa-home fa-fw"></i> <a href="'.URL.'/cabinet">В кабинет</a></div>';
include ('system/foot.php');
?>