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.

all_comments.php 2.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?php
  2. declare(strict_types = 1);
  3. /**********|| Page to show individual threads || ********************************\
  4. Things to expect in $_GET:
  5. ThreadID: ID of the forum curently being browsed
  6. page: The page the user's on.
  7. page = 1 is the same as no page
  8. ********************************************************************************/
  9. //---------- Things to sort out before it can start printing/generating content
  10. // Check for lame SQL injection attempts
  11. if (!is_number($_GET['collageid'])) {
  12. error(0);
  13. }
  14. $CollageID = (int)$_GET['collageid'];
  15. list($NumComments, $Page, $Thread, $LastRead) = Comments::load('collages', $CollageID);
  16. $DB->query("
  17. SELECT Name
  18. FROM collages
  19. WHERE ID = '$CollageID'");
  20. list($Name) = $DB->next_record();
  21. // Start printing
  22. View::show_header(
  23. "Comments for collage $Name",
  24. 'comments,bbcode,subscriptions,vendor/easymde.min',
  25. 'vendor/easymde.min'
  26. );
  27. ?>
  28. <div>
  29. <div class="header">
  30. <h2>
  31. <a href="collages.php">Collages</a> &rsaquo;
  32. <a href="collages.php?id=<?=$CollageID?>"><?=$Name?></a>
  33. </h2>
  34. <div class="linkbox">
  35. <a href="#" id="subscribelink_collages<?=$CollageID?>"
  36. class="brackets"
  37. onclick="SubscribeComments('collages', <?=$CollageID?>); return false;"><?=Subscriptions::has_subscribed_comments('collages', $CollageID) !== false ? 'Unsubscribe' : 'Subscribe'?></a>
  38. <?php
  39. $Pages = Format::get_pages($Page, $NumComments, TORRENT_COMMENTS_PER_PAGE, 9);
  40. if ($Pages) {
  41. echo '<br /><br />' . $Pages;
  42. }
  43. ?>
  44. </div>
  45. </div>
  46. <?php
  47. //---------- Begin printing
  48. CommentsView::render_comments($Thread, $LastRead, "collages.php?action=comments&amp;collageid=$CollageID");
  49. if (!$ThreadInfo['IsLocked'] || check_perms('site_moderate_forums')) {
  50. if ($ThreadInfo['MinClassWrite'] <= $LoggedUser['Class'] && !$LoggedUser['DisablePosting']) {
  51. View::parse('generic/reply/quickreply.php', array(
  52. 'InputName' => 'pageid',
  53. 'InputID' => $CollageID,
  54. 'Action' => 'comments.php?page=collages',
  55. 'InputAction' => 'take_post',
  56. 'TextareaCols' => 90,
  57. 'SubscribeBox' => true
  58. ));
  59. }
  60. }
  61. ?>
  62. <div class="linkbox">
  63. <?=$Pages?>
  64. </div>
  65. </div>
  66. <?php View::show_footer();