rendered paste bodypublic function forumIndex() {
echo '<table id="forum-list">';
$catQuery = "SELECT * FROM `runeorb_forum_categories`";
$catResult = mysql_query($catQuery);
if ($catResult >= 1) {
while ($cat = mysql_fetch_assoc($catResult)) {
echo
"\n\t" . '<tr>' .
"\n\t" . '<td><span class="cat-head">' . $cat['Name'] . '</td>' .
"\n\t" . '<td><span class="cat-head">Topics</span></td>' .
"\n\t" . '<td><span class="cat-head">Posts</span></td>' .
"\n\t" . '<td><span class="cat-head">Last post</span></td>' .
"\n\t" . '</tr>';
$forumQuery = "SELECT * FROM `runeorb_forum_forums` WHERE `Category` = '" . $cat['Name'] . "'";
$forumResult = mysql_query($forumQuery);
if ($forumResult >= 1) {
while ($forum = mysql_fetch_assoc($forumResult)) {
echo
"\n\t" . '<tr>' .
"\n\t" . '<td class="forum-name"><span class="name">' . $forum['Name'] . '</span><br /><span class="forum-text">' . $forum['Description'] . '</span></td>' .
"\n\t" . '<td align="center" valign="center" class="posts-topic"><span class="forum-text">' . $forum['Topics'] . '</td>' .
"\n\t" . '<td align="center" valign="center" class="posts-topic"><span class="forum-text">' . $forum['Posts'] . '</td>' .
"\n\t" . '<td><span class="forum-small"><b>In:</b>' . $forum['In'] .'<br /><b>By:</b>' . $forum['By'] . '<br /><b>At:</b>' . $forum['At'] . '</td>' .
"\n\t" . '</tr>';
}
}
}
}
echo '</table';
}