Файл: app/admin/index.php
Строк: 51
<?php
Core::only('level', 1);
$smarty->header('Панель управления');
if ($user['level'] >= 3)
{
$listing[] = [
'title' => Lang::word('Статус платформы'),
'url' => '/admin/status',
'icon' => 'info',
'div' => 'block'
];
}
if ($user['level'] == 4)
{
$listing[] = [
'title' => Lang::word('Техническая поддержка'),
'url' => '/admin/support',
'icon' => 'lifebuoy',
'div' => 'block'
];
}
if ($user['level'] >= 3)
{
$listing[] = [
'title' => Lang::word('Новости'),
'url' => '/admin/news',
'icon' => 'newspaper',
'div' => 'menu',
'count' => $db->query("SELECT `id` FROM `news` ")->rowCount()
];
}
if ($user['level'] == 4)
{
$listing[] = [
'title' => Lang::word('Параметры системы'),
'url' => '/admin/settings/main',
'icon' => 'cogs',
'div' => 'menu',
];
}
if ($user['level'] >= 1)
{
$listing[] = [
'title' => Lang::word('Список заблокированных'),
'url' => '/admin/list/banned',
'icon' => 'user-minus',
'div' => 'menu',
'count' => $db->query("SELECT `id` FROM `users_block` WHERE `time_ban` > '" . time() ."' ")->rowCount()
];
$listing[] = [
'title' => Lang::word('Список администрации'),
'url' => '/admin/list/admins',
'icon' => 'user-tie',
'div' => 'menu',
'count' => $db->query("SELECT `id` FROM `users` WHERE `level` != '0'")->rowCount()
];
}
$smarty->assign([
'listing' => $listing
]);
$smarty->display('listing.tpl');
$smarty->footer();