2013-07-14 08:00:49 +00:00
|
|
|
<?
|
|
|
|
|
2013-07-24 08:00:46 +00:00
|
|
|
$PostID = (int)$_POST['postid'];
|
2013-07-14 08:00:49 +00:00
|
|
|
|
|
|
|
if (empty($PostID)) {
|
|
|
|
json_die("error", "empty postid");
|
|
|
|
}
|
|
|
|
|
|
|
|
$DB->query("
|
2013-07-17 08:00:52 +00:00
|
|
|
SELECT t.ForumID, p.Body
|
2013-07-14 08:00:49 +00:00
|
|
|
FROM forums_posts AS p
|
2013-07-17 08:00:52 +00:00
|
|
|
JOIN forums_topics AS t ON p.TopicID = t.ID
|
2013-07-14 08:00:49 +00:00
|
|
|
WHERE p.ID = '$PostID'");
|
|
|
|
|
|
|
|
if (!$DB->has_results()) {
|
|
|
|
json_die("error", "no results");
|
|
|
|
}
|
|
|
|
|
|
|
|
list($ForumID, $Body) = $DB->next_record();
|
2013-10-01 23:08:42 +00:00
|
|
|
if (!Forums::check_forumperm($ForumID)) {
|
2013-07-14 08:00:49 +00:00
|
|
|
json_die("error", "assholes");
|
|
|
|
}
|
|
|
|
|
|
|
|
json_die("success", array("body" => nl2br($Body)));
|
|
|
|
|
|
|
|
?>
|