define('IN_PHPBB', true); $phpbb_root_path = './forums/'; include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'common.'.$phpEx); include($phpbb_root_path . 'includes/bbcode.'.$phpEx); $sql = 'SELECT t.topic_id, t.topic_time, t.topic_title, pt.post_text, u.username, u.user_id, u.user_rank, u.user_posts, t.topic_replies, pt.bbcode_uid, t.forum_id, t.topic_poster, t.topic_first_post_id, t.topic_status, pt.post_id, p.post_id, p.enable_smilies FROM ' . TOPICS_TABLE . ' AS t, ' . USERS_TABLE . ' AS u, ' . POSTS_TEXT_TABLE . ' AS pt, ' . POSTS_TABLE . ' AS p WHERE t.forum_id IN (58) AND t.topic_time <= ' . time() . ' AND t.topic_poster = u.user_id AND t.topic_first_post_id = pt.post_id AND t.topic_first_post_id = p.post_id AND t.topic_status <> 8 ORDER BY t.topic_time DESC'; if ($number_of_posts != 0) { $sql .= 'LIMIT 0,10'; } if(!($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, 'Could not query announcements information', '', __LINE__, __FILE__, $sql); } while($row = $db->sql_fetchrow($result)){ $tresc = nl2br(stripslashes($row['post_text'])); echo '