Просмотр файла ticket/close.php

Размер файла: 2.44Kb
<?php
#######################################
### Тикет система для JohnCMS 3.2.2 ###
###       Автор скрипта: desay      ###
###         ICQ: 640-976-131        ###
#######################################
defined('_IN_JOHNCMS') or die('Error: restricted access');

$headmod = 'ticket';
$textl = 'Закрытые тикеты';

if ($rights<7)
{
    header('Location: index.php');
    exit;
}

echo '<div class="phdr"><a href="index.php"><b>Тикеты</b></a> | Закрытые</div>';

        $total = mysql_result(mysql_query("SELECT COUNT(*) FROM `ticket` where `user`='$user_id' and `status`='3' AND `type`='1';"), 0);
        
$req = mysql_query("SELECT * FROM `ticket` where `user`='$user_id' and `status`='3' and `type`='1' order by `time` DESC LIMIT $start, $kmess;");

if ($total != '0') {
    

    while ($arr = mysql_fetch_array($req)) {
        echo ($i % 2) ? '<div class="list1">' : '<div class="list2">';
        
        echo 'Добавлен: ' . date("d.m.Y / H:i", $arr['time'] + $set_user['sdvig'] * 3600) . '<br/>';
        $prior = array (
        1 => 'Низкий',
        2 => 'Средний',
        3 => 'Высокий');
        echo 'Приоритет: '.$prior[$arr[prior]].'<br />';
                        $text = $arr['text'];
                        if(mb_strlen($text) > 100){
                        $text = mb_substr($text, 0, 95);
                        $text = checkout($text, 1, 0);
                        $text = notags($text);
                        $text = preg_replace('#\[c\](.*?)\[/c\]#si', '<div class="quote">\1</div>', $text);
                       }else {$text = checkout($text, 1, 0);
                        $text = notags($text);}

        echo '<a href="index.php?act=read&amp;id=' . $arr['id'] . '">' .$text.'  &gt;&gt;</a><br/>';
        
        echo '</div>';
        ++$i;
    }
	        if ($total > $kmess) {
            echo '<p>' . pagenav('index.php?act=close&amp;', $start, $total, $kmess) .
                '</p>';
            echo '<p><form action="index.php?act=close&amp;" method="post"><input type="text" name="page" size="2"/><input type="submit" value="К странице &gt;&gt;"/></form></p>';
        }


    
}else {echo '<div class="rmenu">Не найдено закрытых тикетов!</div>';}

echo '<div class="phdr">Всего: ' . $total . '</div>';
echo '<p><a href="index.php">Назад</a></p>';

?>