<?php
require_once('../classes/body.class.php');
require_once('../classes/db.class.php');
require_once('../classes/system.class.php');
$title= new Body;
$title->SetTitle(''.homeurl.' - Мой кабинет');

///Подключаем шапку
$title->GetHeader();


echo'<div class="tile"><div class="t-header th-alt bg-teal"><div class="th-title"><i class="zmdi zmdi-widgets"></i><a href="/"style="text-decoration:none; color:white;"> Главная</a> :: Мой кабинет</div></div></div>';

if ($b == false) {
header('location: /');
die();
}
$count_letter = DB::$dbs->querySingle("SELECT COUNT(id) FROM `letters` WHERE `idwho` = ? AND `read` = ?", [$b['id'],0]);
$notice = DB::$dbs->querySingle("SELECT COUNT(id) FROM jurnal WHERE user_id = ? AND type = ?", [$b['id'],1]);

echo '<div class="tile"><div class="t-header th-alt bg-teal"><div class="th-title"><i class="zmdi zmdi-format-list-bulleted"></i> Почта / Контакты </div></div></div>

<div class="list-group-item media"><a href="/messages"><span class="glyphicon glyphicon-envelope"> </span>&nbsp; Личные сообщения'; if (!empty($count_letter)) {echo' (+'.$count_letter.')';} echo'</a></div>
<div class="list-group-item media"><a href="/notebook/"><span class="glyphicon glyphicon-book"></span>&nbsp; Личный блокнот</a></div>
<div class="list-group-item media"><a href="/journal"><span class="glyphicon glyphicon-bullhorn"> </span>&nbsp; Оповещения'; if (!empty($notice)) {echo' +'.$notice.')';} echo'</a> </div>
<div class="list-group-item media"><a href="/ignor"><span class="glyphicon glyphicon-alert"></span>&nbsp; Черный список</a> </div>
<div class="tile"><div class="t-header th-alt bg-teal"><div class="th-title"><i class="zmdi zmdi-format-list-bulleted"></i> Анкета / Настройки </div></div></div>
<div class="list-group-item media"><a href="/setting"><span class="glyphicon glyphicon-send"></span>&nbsp; Личные настройки</a> </div>
<div class="list-group-item media"><a href="/wmid"><span class="glyphicon glyphicon-phone"></span>&nbsp; Мои реквизиты</a> </div>
<div class="list-group-item media"><a href="/logs"><span class="glyphicon glyphicon-log-out"></span>&nbsp; История авторизаций</a> </div>
<div class="list-group-item media"><a href="/gallery/personal.html?id=' . $b['id'] . '"><span class="glyphicon glyphicon-camera"> </span>&nbsp; Персональная галерея</a> </div>
<div class="tile"><div class="t-header th-alt bg-teal"><div class="th-title"><i class="zmdi zmdi-format-list-bulleted"></i> Сервисы сайта</div></div></div>
<div class="list-group-item media"><a href="/search"><span class="glyphicon glyphicon-search"> Поиск пользователя</a> </div>
<div class="list-group-item media"><a href="/billing"><span class="glyphicon glyphicon-usd"> Биллинг панель</a> </div>
<div class="list-group-item media"><a href="/support/"><span class="glyphicon glyphicon-link"> Служба поддержки</a> </div>
<div class="list-group-item media"><a href="/smiles"><span class="glyphicon glyphicon-move"> Список смайлов / BB</a> </div>
<div class="list-group-item media"><a href="/logout"><span class="glyphicon glyphicon-share"> Выйти из кабинета</a> </div>';


///Подключаем меню
$title->GetMenu();

///Подключаем футер
$title->GetFooter();
?>
