mirror of
https://github.com/OPSnet/Gazelle.git
synced 2026-10-05 22:13:03 -04:00
24 lines
419 B
PHP
24 lines
419 B
PHP
<?php
|
|
|
|
if (!$Viewer->permitted('users_warn')) {
|
|
error(403);
|
|
}
|
|
$postId = (int)$_POST['postid'];
|
|
if (!$postId) {
|
|
error(404);
|
|
}
|
|
|
|
[$body, $userId] = $DB->row("
|
|
SELECT Body, AuthorID FROM comments WHERE ID = ?
|
|
", $postId
|
|
);
|
|
if (is_null($body)) {
|
|
error(404);
|
|
}
|
|
|
|
echo $Twig->render('comment/warn.twig', [
|
|
'body' => $body,
|
|
'post_id' => $postId,
|
|
'user' => new Gazelle\User($userId),
|
|
]);
|