Файл: forum/my_p.php
Строк: 59
<?
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(); // форма авторизации
echo "<center><a href='/forum/my_t.php/'>Мои темы</a>n";
echo "» Мои посты </center>n";
$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]");
$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";
$them['msg']=stripcslashes(htmlspecialchars($them['msg']));
echo "$them[msg] (".vremja($them['time']).")<br/>n";
echo " </td>n";
echo " </tr>n";
}
if (mysql_num_rows($q)==0) {
echo " <tr>n";
echo " <td class='p_t'>n";
echo "Ваших постов нет в форуме<br/>n";
echo " </td>n";
}
echo "</table>n";
if ($k_page>1)str("?",$k_page,$page); // Вывод страниц
echo "<div class="foot">n";
echo "»<a href='/forum/'>В форум</a><br />n";
echo "</div>n";
include_once '../sys/inc/tfoot.php';
?>