Parašė Lordcraft· 2008 Rugs. 13 02:09:09
#1
Kaip padaryti maza panele kur yra ten naujausi forumo pranesimai ir kad sone rodytu kiek atsakymu? va pati panel:
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)) {
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'>".($data['thread_replies']-1)."</td>
</tr>";
}
echo "</table>";
} else {
echo "<div style='text-align:center'>".$locale['004']."</div>\n";
}
echo "";
closeside();
irasius koda ".($data['thread_replies']-1)." man visalaiko rodo -1 o pvz irasius ".$data['thread_views']." viskas buna gerai. kaip reikia padayti kad rodytu ne perziuras o atsakymus normaliai o ne -1 ?