<?php
include '../env.php';
require_once(LIB.'common.inc.php');
require_once(LIB.'Post.class.php');
$post = new Post();
if (! can_action('view') || ! is_login()) {
	echo json_encode(FALSE);
	die;
}

echo json_encode($post->getFavorites(@$_SESSION['user']['id'], @$_GET['ni']));
?>