Файл: world-faces.ru/world-faces.ru/forum/my_t.php
Строк: 76
<?
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/dbPDO.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 "<div class="menu">n";
echo "• <a href="index.php" title="Вернуться к подфорумам">Форум</a> / Мои темыn";
echo "</div>n";
$k_post=DB::$dbs->querySingle("SELECT COUNT(*) FROM `forum_t` WHERE `id_user` =?",array($user['id']));
$k_page=k_page($k_post,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];
$q=DB::$dbs->query("SELECT * FROM `forum_t` WHERE `id_user` =? ORDER BY `time` DESC LIMIT $start, $set[p_str]",array($user['id']));
if ($k_post==0) {
echo "Вы еще ни разу не разу не создавали тем на форуме<br/>n";
}
while ($them = $q->fetch())
{
$forum = DB::$dbs->queryFetch("SELECT * FROM `forum_f` WHERE `id` =? LIMIT 1",array($them['id_forum']));
$razdel= DB::$dbs->queryFetch("SELECT * FROM `forum_r` WHERE `id` =? LIMIT 1",array($them['id_razdel']));
if($num==1){
echo "<div class='adm2'>";
$num=0;
}else{
echo "<div class='adm'>";
$num=1;}
if ($set['set_show_icon']==2){
echo "<img src='/img/them_01.gif' /> ";
}
elseif ($set['set_show_icon']==1)
{
echo "<img src='/img/them_01.gif' /> ";
}
echo "<a href='/forum/$forum[id]/$razdel[id]/$them[id]/'>$them[name]</a> <a href='/forum/$forum[id]/$razdel[id]/$them[id]/?page=end'>(".DB::$dbs->querySingle("SELECT COUNT(*) FROM `forum_p` WHERE `id_forum` =? AND `id_razdel` =? AND `id_them` =?",array($forum['id'],$razdel['id'],$them['id'])).")</a><br/>n";
echo "<a href='/forum/$forum[id]/'>$forum[name]</a> > <a href='/forum/$forum[id]/$razdel[id]/'>$razdel[name]</a><br />n";
$post1=DB::$dbs->queryFetch("SELECT * FROM `forum_p` WHERE `id_them` =? AND `id_razdel` =? AND `id_forum` =? ORDER BY `time` ASC LIMIT 1",array($them['id'],$razdel['id'],$forum['id']));
$ank=DB::$dbs->queryFetch("SELECT * FROM `user` WHERE `id` =? LIMIT 1",array($post1['id_user']));
echo "Автор: <a href='/info.php?id=$ank[id]' title='Анкета "$ank[nick]"'>$ank[nick]</a> (".vr($them['time_create']).")<br />n";
$post=DB::$dbs->queryFetch("SELECT * FROM `forum_p` WHERE `id_them` =? AND `id_razdel` =? AND `id_forum` =? ORDER BY `time` DESC LIMIT 1",array($them['id'],$razdel['id'],$forum['id']));
$ank2=DB::$dbs->queryFetch("SELECT * FROM `user` WHERE `id` = $post[id_user] LIMIT 1",array($post['id_user']));
echo "Посл.: <a href='/info.php?id=$ank2[id]' title='Анкета "$ank2[nick]"'>$ank2[nick]</a> (".vr($post['time']).")<br />n";
echo'</div>';
}
if ($k_page>1)str("?",$k_page,$page); // Вывод страниц
include_once '../sys/inc/tfoot.php';
?>