Файл: forum/inc/forum-act.tpl
Строк: 21
<?
$forum_s = mysql_fetch_assoc(mysql_query("SELECT * FROM
`forum-s` WHERE `id` = '1'"));
if($forum_s['in-t']==0){
$total =
mysql_result(mysql_query("SELECT COUNT(*) FROM `forum-u`"),
0);
if ($total!=0){
echo '<div
class="main-text">Актуальные темы
форума</div>';
$forum_u_c = mysql_query("SELECT * FROM
`forum-u` ORDER BY `last` DESC LIMIT
".$forum_s['in']."");
while ($forum_u =
mysql_fetch_assoc($forum_u_c)){
$f_m =
mysql_fetch_assoc(mysql_query("SELECT * FROM `forum-m` WHERE
`id-forum-u` = '".int($forum_u['id'])."'"));
$f_m_c =
mysql_result(mysql_query("SELECT COUNT(*) FROM `forum-m` WHERE
`id-forum-u` = '".int($forum_u['id'])."'"), 0);
$f_m_c_n =
mysql_result(mysql_query("SELECT COUNT(*) FROM `forum-m` WHERE
`id-forum-u` = '".int($forum_u['id'])."' and `date` >
'".(time()-86400)."'"), 0);
$l_p =
ceil($f_m_c/$forum_s[tm]);
echo '<a class="main-href"
href="/forum/topic-'.int($forum_u['id']).'.dll?page='.$l_p.'"
title="'.$forum_u['name'].'">';
echo '<table
width="100%" cellspacing="0"
cellpadding="0">';
echo '<tr><td
class="apa-l">';
icons('topic-'.int($forum_u['act']).'');
echo
''.$forum_u['name'].'';
echo '</td>';
echo '<td
class="apa-r">';
echo '<time>'.$f_m_c.'';
if
($f_m_c_n!=0)echo '<new>+'.$f_m_c_n.'</new>';
echo
'</time>';
echo '</td></tr>';
echo '</table>';
echo
'</a>';
}
}
}
?>