Файл: plugins/user/mail/index.php
Строк: 6
<?php
$title = 'Почта';
require (SYS.'head.php');
$all = core::count('mail', 'id_profile', '= '.$user['id']);;
$pages = new pages($all, $set['user_pages']);
$query = $db->query("SELECT * FROM `mail` WHERE `id_profile` = '".$user['id']."' ORDER BY `id` DESC LIMIT $start, $set[user_pages]");
while ($list = $query->fetch_assoc())
{
$posts[] = [
'div' => $list['read'] != 1 ? 'listing2' : NULL,
'url' => '/mail/'.$list['id_user'].'/',
'image' => user::photo($list['id_user']),
'title' => user::login($list['id_user'], 0),
'time' => core::time($list['time']),
'post' => core::output($list['text'])
];
}
if ($all == 0)
$posts[] = [
'title' => 'Нет сообщений.'
];
$smarty->assign('post', $posts);
$smarty->display('posts.tpl');
$pages->view('?');
require (SYS.'foot.php');