<?php
	header('Content-Type: text/html; charset=utf-8');

	include('../../../inc/start.php');
	include('../../../inc/protect.php');

	if(!isset($_POST['token']) || $_SESSION['token'] != clean($_POST['token'], null))
		exit(json_encode(array('status' => 'error', 'text' => 'Неверный токен')));

	$tpl = new Template;
	$tpl->dir = '../tpl/ajax/';

	$id = checkJs($_POST['id'], 'int');
	$start = checkStart($_POST['start']);

	$Forum = new Forum($pdo, $tpl);
	$Forum->get_forum($id, $start, 15);
?>