<?php
define('IN_PHPBB', true);
define('BB_SCRIPT', 'index');
define('BB_ROOT', './');
$phpEx = substr(strrchr(__FILE__, '.'), 1);
require(BB_ROOT ."common.php");
//
// Start session management
//
$user->session_start();
//
// End session management
//
$post_id = $_GET['id'] ? $_GET['id'] : 0;
$post_id = (int) $post_id;
// Get Post Data
$post_data = DB()->query("SELECT post_html FROM ".BB_POSTS_HTML." WHERE post_id = $post_id LIMIT 1");
$post = DB()->sql_fetchrow($post_data);
// Get Post Data
// Construct Post HTML
$html =('<script type="text/javascript">');
$html .=('var postImgAligned_MaxWidth = screen.height - 390;');
$html .=('initPostBBCode("div#post_ajax");');
$html .=('var maxH = screen.height - 190;');
$html .=('var maxW = screen.width - 60;');
$html .=('var $post = $(\'div#post_ajax\');');
$html .=('$post.css({ maxWidth: maxW, maxHeight: maxH });');
$html .=('</script>');
$html .=('<div id="post_ajax">'.$post['post_html'].'<br />');
// Print Post
print $html;