Файл: mylaf.ru/forums/my.thems.php
Строк: 52
<?php
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 `forums_thems`"),0);
$k_page=k_page($k_post,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];
if($k_post==0)
{
msg("У вас пока нет ни одной темы");
}
$q=mysql_query("SELECT * FROM `forums_thems` WHERE `id_user` = '$user[id]' ORDER BY `up` DESC,`time` DESC LIMIT $start, $set[p_str]");
while ($them=mysql_fetch_array($q)){
$ank=get_user($them['id_user']);
echo "<a href='them.php?id=".$them['id']."'><div class='forum'><img src='img/t.png'> ".output_text($them['name'])." n";
echo" <span style='float:right;border:1px solid gray;backgraund:whitesmoke;border-radius:10px'><b>".mysql_result(mysql_query("SELECT COUNT(*) FROM `forums_post` WHERE `id_them` = '$them[id]'"),0)."</b></span><br/>";
echo "<b>$ank[nick]</b> | <b>".vremja($them['time'])."</b>";
echo "</div></a>n";
}
if ($k_page>1)str('?',$k_page,$page);
echo "<a href='index.php?cid=".rand(100000000000000,999999999999999)."'><div class='gmenu'><img src='/style/glavnaya.gif'> Вернуться в форум</div></a>";
include_once '../sys/inc/tfoot.php';
?>