Файл: soc-set/panel/ticket.php
Строк: 12
<?php
require_once('../core/start.php');
check_auth();
if (privilegy('ticket') == FALSE) {
header("Location: ".HOME."/panel/");
exit();
}
head('Тикеты');
echo DIV_TITLE . 'Тикеты' . CLOSE_DIV;
echo DIV_BLOCK . '<b>Новые сообщения</b>' . CLOSE_DIV;
$all = DB::$dbs->querySingle("SELECT COUNT(*) FROM ".TOUCH_MSG." WHERE `status` = ? ", array(1));
if ($all == 0) {
echo DIV_BLOCK . 'Сообщений нет' . CLOSE_DIV;
} else {
$n = new Navigator($all,5,'');
$sql = DB::$dbs->query("SELECT * FROM ".TOUCH_MSG." WHERE `status` = ? ORDER BY `time` DESC LIMIT {$n->start()}, 5", array(1));
while($ticket = $sql -> fetch()){
echo DIV_BLOCK . vrem($ticket['time']) . ' / ' . vrem($ticket['time']) . '<br /><a href="'.HOME.'/touch/ticket/'.$ticket['touch_id'].'/"><b>Перейти в тикет</b></a>' . CLOSE_DIV;
}
echo $n->navi();
}
echo DIV_GO . '<a href="'.HOME.'/">Главная</a> / <a href="'.HOME.'/panel/">Панель управления</a> / <b>Тикеты</b>' . CLOSE_DIV;
require_once('../core/stop.php');
?>