Файл: tiket/list.php
Строк: 66
<?php
include_once '../sys/inc/start.php';
include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
include_once '../sys/inc/user.php';
if (isset($user))$ank['id']=$user['id'];
if (isset($_GET['id']))$ank['id']=intval($_GET['id']);
$ank=get_user($ank['id']);
$set['title']='Тикеты';
include_once '../sys/inc/thead.php';
title();
err();
aut();
echo "<div class='p_m'>";
echo "История тикетов $ank[nick]";
echo "</div>n";
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `tiket` WHERE `id_user` = '$ank[id]'"),0);
$k_page=k_page($k_post,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];
$lim=" LIMIT $start, $set[p_str]";
$q=mysql_query("SELECT * FROM `tiket` WHERE `id_user` = '$ank[id]' ORDER BY `time` DESC $lim");
if (mysql_num_rows($q)==0) {
echo "<div class='p_m'>n";
echo "У $ank[nick] нет тикетовn";
echo "</div>";
}
while ($list = mysql_fetch_assoc($q))
{
echo "<div class='p_m'>n";
echo "<span style='float : right;'>n";
echo "<font color='red'>".vremja($list['time'])."</font>n";
echo " </span>";
echo " <a href='tiket.php?id=$list[id]'>$list[name]</a> <font color='red'>+".mysql_result(mysql_query("SELECT COUNT(*) FROM `tiket_kom` WHERE `id_list` = '$list[id]'"),0)."</font>";
echo "</div>n";
}
if ($ank['id']==$user['id']) {
echo "<div class='p_m'>";
echo "<a href='add.php'>Создать тикет</a>";
echo "</div>";
}
if ($k_page>1)str('?id='.$ank['id'].'&',$k_page,$page); // Вывод страниц
include_once '../sys/inc/tfoot.php';
?>