Файл: modules/black_list/index.php
Строк: 37
<?php
/**
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) 2013, Taras Chornyi, Sergiy Mazurenko, Ivan Kotliar
* @link http://perf-engine.net
* @package PerfEngine
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
if(!User::logged())
{
go('/');
}
$title = _t('black_list');
include_header($title);
$black_list = $db->query("SELECT * FROM `black_list` WHERE `user_id` = '". $user['id'] ."'")->rowCount();
$tpl->div('title', _t('black_list').' ('.$black_list.')');
$pages = new Paginator($black_list, $ames);
if($black_list == 0)
{
$tpl->div('menu', _t('users_empty'));
}
else
{
$black_list_q = $db->query("SELECT * FROM `black_list` WHERE `user_id` = '". $user['id'] ."' ORDER BY id DESC LIMIT $start, $ames");
while($list = $black_list_q->fetch())
{
echo '<div class="post">
'. nick($list['block_id'], '<a href="/black_list/unblock/'.$list['block_id'].'/">'.img('delete.png') .'</a>') .'
</div>';
}
$pages->view();
}
$tpl->div('block', NAV.' <a href="/black_list/i_list/">'._t('black_list_i').'</a> ('.$db->query("SELECT * FROM `black_list` WHERE `block_id` = '". $user['id'] ."'")->rowCount().')<br/> '
. NAV . ' <a href="/user/panel/">'._t('user_panel').'</a><br/> '
. HICO. ' <a href="/">'. _t('home') .'</a>');
include_footer();
?>