Файл: mob-lave.ru/moduls/forum/my_them.php
Строк: 44
<?php
require_once '../../core/set.php';
$set['title'] = 'Мои темы';
require_once H.'core/head.php';
require_once H.'core/panel.php';
reg();
echo '<div class="navig">'.$home. $z.'<a href="/moduls/forum/">Форум</a>'.$z. $set['title'].'</div>';
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `$system[perfix]_forum_them` WHERE `avtor` = '$user[id]'"),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) echo '<div class="menu">Тем нет</div>';
$q = mysql_query("SELECT * FROM `$system[perfix]_forum_them` WHERE `avtor` = '$user[id]' ORDER BY `id` DESC LIMIT $start, $set[p_str]");
while($forum = mysql_fetch_assoc($q)){
$count = mysql_result(mysql_query("SELECT COUNT(*) FROM `$system[perfix]_forum_komm` WHERE `id_them` = '$forum[id]'"),0);
$count_new = mysql_result(mysql_query("SELECT COUNT(*) FROM `$system[perfix]_forum_komm` WHERE `time` > '".$ftime."' && `id_them` = '$forum[id]'"), 0);
if ($count_new==0)$count_new=NULL;
else $count_new='<font color=red><smile><sup>+'. $count_new.'</sup></smile></font>';
$avtor = mysql_fetch_assoc(mysql_query("SELECT `id`,`login` FROM `$system[perfix]_users` WHERE `id` = '$forum[avtor]'"));
echo '<div class="menu_touch"><a href="/moduls/forum/'.$razd.'/'.$podrazdel.'/'.$forum['id'].'">';
if($forum['sort'] == 0 && $forum['close'] == 1) echo ' <img src="/design/images/site/them_close.png" alt="Тема закрыта"/> ';
else if($forum['sort'] == 0 && $forum['close'] == 0) echo ' <img src="/design/images/site/them.png" alt="Тема открыта"/>';
else if($forum['sort'] > 0 && $forum
['close'] == 0) echo ' <img src="/design/
images/site/them_top.png" alt="Тема
закреплена"/> ';
else if($forum['sort'] > 0 && $forum['close'] == 1) echo ' <img src="/design/images/site/them_top_close.png" alt="Тема закреплена и закрыта"/> ';
if($post['screen1'] != 0 or $post['screen2'] != 0 or $post['screen3'] != 0) echo '<img src="/design/images/site/anchor.png"/> ';
echo '<b>'.htmlspecialchars($forum['title']).'</b> ('.$count.') '.$count_new.'<br/>';
echo online($avtor['id']).' '.$avtor['login'].'('.vremja($forum['time']).')';
echo '</a> </div>';
}
if ($k_page>1)str('?',$k_page,$page); // Вывод страниц
echo '<div class="navig">'.$home. $z.'<a href="/moduls/forum/">Форум</a>'.$z. $set['title'].'</div>';
require_once H.'core/foot.php';
?>