function bb_quote_message() {
global $bbdb, $topic;
$post_id = (int)$_GET['quote'];
$the_author = $_GET['author'];
$the_author = str_replace('!~', ' ', $the_author);
if ($post_id) {
$row = $bbdb->get_row("SELECT * FROM $bbdb->posts WHERE post_id={$post_id} AND topic_id={$topic->topic_id} AND post_status=0");
$row->post_text = rtrim(preg_replace( '(<p>|</p>)', '', $row->post_text));
if ($row) echo ($the_author.' said:<br />'.htmlentities('<blockquote>'.$row->post_text.'</blockquote>', ENT_COMPAT, 'UTF-8')."\n");
}
}