Файл: forum/my_tt.php
Строк: 88
<?
include_once '../sys/inc/start.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';
if (isset($user))$ank['id']=$user['id'];
if (isset($_GET['id']))$ank['id']=intval($_GET['id']);
$ank=get_user($ank['id']);
$set['title']="$ank[nick] [Темы]";
include_once '../sys/inc/thead.php';
title();
aut();
if(!$ank){header("Location: /index.php?".SID);exit;}
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_t` WHERE `id_user` = '$ank[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_t` WHERE `id_user` = '$ank[id]' ORDER BY `time` DESC LIMIT $start, $set[p_str]");
echo "<table class='post'>n";
if (mysql_num_rows($q)==0) {
echo " <tr>n";
echo " <td class='p_t'>n";
echo "Нет тем на форумеn";
echo " </td>n";
echo " </tr>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"));
echo " <tr>n";
if ($set['set_show_icon']==2){
echo " <td class='icon14'>n";
avatar2($ank['id']);
echo " </td>n";
}
elseif ($set['set_show_icon']==1)
{
echo " <td class='icon14'>n";
echo "".status($ank['id'])."";
echo " </td>n";
}
echo " <td class='p_t'>n";
echo "<a href='/info.php?id=$ank[id]'>$ank[nick]</a>".online($ank['id'])." (".vremja($them['time']).")<br />n";
echo " </td>n";
echo " </tr>n";
echo " <tr>n";
if ($set['set_show_icon'])echo " <td class='p_m' colspan='2'>n"; else echo " <td class='p_m'>n";
echo "<a href='/forum/$forum[id]/$razdel[id]/$them[id]/'>$them[name]</a> <a href='/forum/$forum[id]/$razdel[id]/$them[id]/?page=end'>(".mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_p` WHERE `id_forum` = '$forum[id]' AND `id_razdel` = '$razdel[id]' AND `id_them` = '$them[id]'"),0).")</a><br />n";
echo " </td>n";
echo " </tr>n";
}
echo "</table>n";
if ($k_page>1)str("?id=$ank[id]&",$k_page,$page); // Вывод страниц
include_once '../sys/inc/tfoot.php';
?>