<?php
include '../env.php';
require_once(LIB.'common.inc.php');
if (can_action('view')) {
	try_update_session();
	require_once(LIB.'Post.class.php');
	$post = new Post();
	echo json_encode($post->getNew(@$_GET['id'], $_GET));
}
?>