session_begin(); $auth->acl($user->data); $user->setup(); $sql = "SELECT t.topic_id, t.topic_title, t.topic_replies, t.topic_poster, t.topic_first_post_id, t.topic_first_poster_name, t.topic_first_poster_colour, f.forum_id, f.forum_name, p.post_time, u.user_id, u.username ,u.user_colour FROM ".TOPICS_TABLE." AS t, ".FORUMS_TABLE." AS f, ".POSTS_TABLE ." AS p, ".USERS_TABLE." AS u WHERE t.forum_id = f.forum_id"; $sql .=" AND t.topic_moved_id = 0 AND p.post_id = t.topic_last_post_id AND u.user_id = p.poster_id "; $sql .= " ORDER BY t.topic_last_post_id DESC LIMIT 10"; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { $user_colour = ' style="color:#' . $row['user_colour'] . '"'; $topic_first_poster_colour = ' style="color:#' . $row['topic_first_poster_colour']. '"'; $row['username'] = '' . $row['username'] . ''; $user_poster = '' . $row['username'] . ''; $first_user_poster = '' .$row['topic_first_poster_name'] . ''; echo '