Файл: my.net.ru/users/account/journal/index.php
Строк: 50
<?php
html::title('Журнал');
acms_header();
access('users');
require_once (ROOT.'/users/account/journal/plugins/read.php');
require_once (ROOT.'/users/account/journal/plugins/delete.php');
?>
<div class='list'>
<a href='/account/journal/?get=delete_all&<?=TOKEN_URL?>' class='btn'><?=icons('trash', 15, 'fa-fw')?> <?=lg('Очистить журнал')?></a>
<a href='/account/journal/settings/' style='float: right; margin-top: 5px'><?=icons('gear', 25, 'fa-fw')?></a>
</div>
<div id='notif'>
<?
$column = db::get_column("SELECT COUNT(`ID`) FROM `NOTIFICATIONS` WHERE `USER_ID` = ?", [user('ID')]);
$spage = SPAGE($column, PAGE_SETTINGS);
$page = PAGE($spage);
$limit = PAGE_SETTINGS * $page - PAGE_SETTINGS;
if ($column == 0){
html::empty('Нет событий');
}else{
?><div class='list-body'><?
}
$data = db::get_string_all("SELECT * FROM `NOTIFICATIONS` WHERE `USER_ID` = ? ORDER BY `TIME` DESC LIMIT ".$limit.", ".PAGE_SETTINGS, [user('ID')]);
while ($list = $data->fetch()){
?><div class='list-menu'><?
if (is_file(ROOT.'/users/account/journal/components/'.$list['TYPE'].'.php')){
require (ROOT.'/users/account/journal/components/'.$list['TYPE'].'.php');
}else{
?><font color='red'><?=icons('exclamation-triangle', 15, 'fa-fw')?> <b><?=lg('Ошибка')?> <?=$list['TYPE']?></b>: <?=lg('компонент не обнаружен')?></font><?
}
?>
<div style='position: absolute; bottom: 8px; right: 8px;'><span onclick="request('/account/journal/?delete_one=<?=$list['ID']?>&page=<?=$page?>&<?=TOKEN_URL?>', '#notif')"><?=icons('times', 18, 'fa-fw')?></span></div>
</div>
<?
}
if ($column > 0){
?></div><?
}
get_page('/account/journal/?', $spage, $page, 'list');
?></div><?
acms_footer();