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 505B

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