Файл: promotion/user.php
Строк: 54
<?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';
$set['title']='Мои обращения';
include_once '../sys/inc/thead.php';
title();
err();
aut();
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `promotion` where `id_user`= '$user[id]'"),0);
$k_page=k_page($k_post,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];
if($k_post==0)
{
echo " <tr>n";
echo " <td class='p_t'>n";
echo "У вас нет обращений к администрации<br />";
echo " </td>n";
echo " </tr>n";
}
$q = mysql_query("select * from `promotion` where `id_user` ='$user[id]' order by `time` desc LIMIT $start, $set[p_str];");
while ($post = mysql_fetch_array($q)){
echo " <tr>n";
echo "Время: ".vremja($post['time'])."n";
echo " <br>n";
if ($post['all']=='0'){echo "<img src=close.png>n";}
echo "".output_text($post['msg'])."<br/><a href='show.php?id=".$post['id']."'>Ответов: ".mysql_result(mysql_query("SELECT COUNT(*) FROM `otvet_tiket` WHERE `id_tiket` = '$post[id]'"),0)."</a><br />n";
echo "<div class=p_t></div>n";
echo " </td>n";
echo " </tr>n";
}
echo "</table>n";
if ($k_page>1)str('?',$k_page,$page); // Вывод страниц
include_once '../sys/inc/tfoot.php';
?>