<?
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();

$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'];
echo "<table class='post'>\n";
$q=mysql_query("SELECT * FROM `forum_t` WHERE `id_user` = '$user[id]' ORDER BY `time` DESC  LIMIT $start, $set[p_str]");

if (mysql_num_rows($q)==0) {
echo "   <tr>\n";

}

$q=mysql_query("SELECT * FROM `forum_p` WHERE `id_user` = '$user[id]' ORDER BY `time` DESC  LIMIT $start, $set[p_str]");
while ($them = mysql_fetch_array($q))
{
if ($set['set_show_icon']==1)echo "  <td class='p_m' colspan='2'>\n"; else echo "  <td class='p_m'>\n";

echo "$them[msg] (".vremja($them['time']).")<br/>\n";

echo "  </td>\n";
echo "   </tr>\n";
}
echo "</table>\n";
if ($k_page>1)str("?",$k_page,$page); // Вывод страниц
echo "<div class=\"foot\">\n";
echo " <a href='/forum/'>Форум</a>\n";
echo "</div>\n";

include_once '../sys/inc/tfoot.php';
?>