Parašė Kelmas· 2008 Rugs. 19 13:09:57
#4
Nu jokšimat, asilų apsimeta. :|
openside("Naujausi pranesimai");
$result = dbquery("
SELECT * FROM ".$db_prefix."threads
INNER JOIN ".$db_prefix."forums ON ".$db_prefix."threads.forum_id=".$db_prefix."forums.forum_id
WHERE ".groupaccess('forum_access')." ORDER BY thread_lastpost DESC LIMIT 5
");
if (dbrows($result) != 0) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>";
while ($data = dbarray($result)) {
$a = $data['thread_replies']-1;
echo "<tr>
<td class='small'>
<img src='".THEME."images/bullet.gif' alt=''> <a href='".FORUM."viewthread.php?forum_id=".$data['forum_id']."&thread_id=".$data['thread_id']."' title='".$data['thread_subject']."' class='side'>".$data['thread_subject']."</a>
</td>
<td align='right'>$a</td>
</tr>";
}
echo "</table>";
} else {
echo "<div style='text-align:center'>".$locale['004']."</div>\n";
}
echo "";
closeside();
Redagavo Kelmas· 2008 Rugs. 19 13:09:22