session_begin(); $auth->acl($user->data); $user->setup(); $bbcode = new bbcode(); header('Content-type: text/html; charset=UTF-8'); function cleanText($intext) { return utf8_normalize_nfc(htmlspecialchars(stripslashes($intext))); } echo << news du site EOM; $sql = 'SELECT t.topic_id, t.forum_id, t.topic_title, t.topic_time, t.topic_first_poster_name, t.topic_last_post_subject, p.post_text, p.post_id, p.post_time, p.bbcode_uid, p.bbcode_bitfield, p.post_subject, p.post_username, p.enable_smilies, p.enable_bbcode FROM ( (' . TOPICS_TABLE . ' t JOIN ' . POSTS_TABLE . ' p ON t.topic_id = p.topic_id ) JOIN ' . USERS_TABLE . ' u ON u.user_id = p.poster_id ) WHERE t.forum_id in ( 2 ) AND t.topic_id in ( 19 ) ORDER BY t.forum_id ASC, topic_time DESC LIMIT 1 , 9 '; $result = $db->sql_query($sql); while($row = $db->sql_fetchrow($result)) { // Parse the message and subject $message = censor_text($row['post_text']); // Second parse bbcode here if ($row['bbcode_bitfield']) { $bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']); } $message = bbcode_nl2br($message); $message = smiley_text($message); $topic_title = censor_text($row["topic_title"]); $topic_author = $row["topic_first_poster_name"]; $topic_time = date("r", $row["topic_time"]); $topic_link = append_sid(generate_board_url() . "/viewtopic.$phpEx", 'f=' . $row['topic_id'] . '&p=' . $row['post_id']) . '#p' . $row['post_id']; echo <<$topic_title

message posté le $topic_time par $topic_author

$message EOM; } while ( $row = $db->sql_fetchrow($result) ); $db->sql_freeresult($result); echo << EOM; ?>