mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-18 20:21:37 +00:00
32 lines
560 B
PHP
32 lines
560 B
PHP
|
<?
|
||
|
|
||
|
include(SERVER_ROOT . "/sections/forums/functions.php");
|
||
|
|
||
|
$PostID = (int) $_POST['postid'];
|
||
|
|
||
|
if (empty($PostID)) {
|
||
|
json_die("error", "empty postid");
|
||
|
}
|
||
|
|
||
|
$DB->query("
|
||
|
SELECT
|
||
|
t.ForumID, p.Body
|
||
|
FROM forums_posts AS p
|
||
|
JOIN forums_topics AS t
|
||
|
ON p.TopicID = t.ID
|
||
|
WHERE p.ID = '$PostID'");
|
||
|
|
||
|
if (!$DB->has_results()) {
|
||
|
json_die("error", "no results");
|
||
|
}
|
||
|
|
||
|
list($ForumID, $Body) = $DB->next_record();
|
||
|
$Forums = get_forums();
|
||
|
if (!check_forumperm($ForumID)) {
|
||
|
json_die("error", "assholes");
|
||
|
}
|
||
|
|
||
|
json_die("success", array("body" => nl2br($Body)));
|
||
|
|
||
|
?>
|