|
<?php
if ($t_f['count'] == 0)
{
echo msg('Форум пока пуст!');
}
$forum = $db->query("SELECT * FROM `forum_tema` ORDER BY `up` DESC LIMIT ".$settings['output_forum']);
while ($a = $db->fetch_assoc($forum))
{
$cont = $db->super_query('select count(id) as cnt from `forum_post` WHERE `tema` = "'.$a['id'].'"');
if ($a['status'] == 0)
$icon = 'tem';
elseif ($a['status'] == 1)
$icon = 'close';
elseif ($a['status'] == 2)
$icon = 'top';
echo '<table cols="2" width="100%" cellpadding="0" cellspacing="0" style="font-size:11px;"><tr>
<td class="menudiv" width="95%"><a href="/forum/tema'.$a['id'].'" class="menudiv"><img width="10" height="10" src="/images/'.$icon.'.png" alt="*" /> '.$a['name'].'</a></td>
<td class="menudiv" style="text-align:center;" width="5%"><a href="/forum/tema'.$a['id'].'?selection=top" class="menudiv"><span class="counts_forum"><b>'.$cont['cnt'].'</b></span></td></a>
</tr></table>';
}
?>