BioTorrents.de’s version of Gazelle
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

raw_bbcode.php 531B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. #declare(strict_types=1);
  3. $PostID = (int) $_GET['postid'];
  4. if (empty($PostID)) {
  5. json_die('error', 'empty postid');
  6. }
  7. $DB->query("
  8. SELECT
  9. t.`ForumID`,
  10. p.`Body`
  11. FROM
  12. `forums_posts` AS p
  13. JOIN `forums_topics` AS t
  14. ON
  15. p.`TopicID` = t.`ID`
  16. WHERE
  17. p.`ID` = '$PostID'
  18. ");
  19. if (!$DB->has_results()) {
  20. json_die('error', 'no results');
  21. }
  22. list($ForumID, $Body) = $DB->next_record();
  23. if (!Forums::check_forumperm($ForumID)) {
  24. json_die('error', 'assholes');
  25. }
  26. json_die('success', array('body' => nl2br($Body)));