Файл: forum/my_p.php
Строк: 38
<?php
require_once '../sys/inc/start.php';
require_once '../sys/inc/compress.php';
require_once '../sys/inc/sess.php';
require_once '../sys/inc/settings.php';
require_once '../sys/inc/db_connect.php';
require_once '../sys/inc/ipua.php';
require_once '../sys/inc/fnc.php';
require_once '../sys/inc/user.php';
$set['title'] = 'Форум - Мои сообщения';
require_once '../sys/inc/thead.php';
aut();
only_reg();
$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 "<div class = 'menu_razd'>Мои посты</div>";
if ($k_post == 0) {
echo "<table class = 'foot'><tr><td class = 'null'>";
echo "<img src = '/style/icons/bullet_error.png' /> Нет постов";
echo "</td></tr></table>";
}
$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)) {
echo "<table class = 'foot'><tr><td class = 'null'>";
$them['msg'] = stripcslashes(htmlspecialchars($them['msg']));
echo "<img src = '/style/icons/pencil.png' /> $them[msg]<br />";
echo "<img src = '/style/icons/time.png' /> " . vremja($them['time']);
echo "</td></tr></table>";
}
#Вывод страниц
if ($k_page > 1) {
str("?", $k_page, $page);
}
echo "<div class = 'foot'>";
echo "<img src = '/style/icons/left.png' /> <a href = '/forum/'>Форум</a>";
echo "</div>";
require_once '../sys/inc/tfoot.php';