Вход Регистрация
Файл: forum/forum/us_t.php
Строк: 15
<?
#####################################
## Автор: PITBULL                  ##                                                                                                                                                                                      ## Сайт: http://profiwm.ru              #                                                      ## ICQ  :  1600416                        #                                             #
#####################################


include'../config.php';


$title='Форум  ';

aut();
head();


if(
intval($_GET['id']==0))header('Location: /index.php?');
if (empty(
$user['max_pr'])) $user['max_pr']=5;
$max $user['max_pr'];
$k_post=$db->sql_fetchfield($db->sql_query("select count(*) as num from forum_t where user_id='".$id."' "),0);
$k_page=k_page($k_post,$max);
$page=page($k_page);
$start=$max*$page-$max;



$q1 = @$db->sql_query( @"select  *  from  `forum_t` where `user_id`='".$id."' limit $start,$max ;" );
while(
$a = @$db->sql_fetchrow($q1)){



$c1 = @$db->sql_query( @"select  *  from  `forum_r` where `id`='".$a['r_id']."' ;" );
$raz = @$db->sql_fetchrow(@$c1);

$b1 = @$db->sql_query( @"select  *  from  `forum_f` where `id`='".$raz['f_id']."' ;" );
$for = @$db->sql_fetchrow(@$b1);

$t1 = @$db->sql_query( @"select  *  from  `forum_msg` where `t_id`='".$a['id']."' order by time desc LIMIT 1 ;" );
$msg = @$db->sql_fetchrow(@$t1);

echo
'<b><div class="links"><img src="'.H.'img/tem.gif" alt="*"/><a href="tema_'.$a['id'].'">'.$a['name'].'</a> </b></br>
       <a href="razdel_'
.$for['id'].'">'.$for['name'].'</a>
       <a href="temes_'
.$raz['id'].'">'.$raz['name'].'</div>
       '
.nik($id).'  
       '
.nik($msg['user_id']).'';



echo
'</br>';
}

if (
$k_page>1){
echo 
"<dl><dt></dt></dl>";
str('us_p'.$id.'?&amp;',$k_page,$page); // Вывод страниц
echo "<br /><dl><dt></dt></dl><br />";

}
echo
'<div class="gb"><a href="/'.$id.'">В анкету</a></div>
     <div class="gb"><a href="/index">На главную</a></div>'
;
foot();





?>
Онлайн: 0
Реклама