Файл: public_html/forum/my_p.php
Строк: 45
<?
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();
aut(); // форма авторизации
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_p` 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'];
$q=mysql_query("SELECT * FROM `forum_p` WHERE `id_user` = '$user[id]' ORDER BY `time` DESC LIMIT $start, $set[p_str]");
if (mysql_num_rows($q)==0) {
echo "<div class='z'>Вы еще ни разу не писали в форуме</div>n";
}
while ($them = mysql_fetch_array($q))
{
$forum=mysql_fetch_array(mysql_query("SELECT * FROM `forum_f` WHERE `id` = '$them[id_forum]' LIMIT 1"));
$razdel=mysql_fetch_array(mysql_query("SELECT * FROM `forum_r` WHERE `id` = '$them[id_razdel]' LIMIT 1"));
$them1=mysql_fetch_array(mysql_query("SELECT * FROM `forum_t` WHERE `id` = '$them[id_them]' LIMIT 1"));
if($num==1){
echo "<div class='p_m'>";
$num=0;
}else{
echo "<div class='menu'>";
$num=1;}
echo "<img src='/img/razd.gif' alt='' /> ";
echo "$them[msg] (".vremja($them['time']).")<br/>n";
echo "</div>";
}
if ($k_page>1)str("?",$k_page,$page); // Вывод страниц
echo "<div class='foot'>→ <a href='/forum/'>Форум</a></div>";
include_once '../sys/inc/tfoot.php';
?>