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.

index.php 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <?php
  2. #declare(strict_types=1);
  3. enforce_login();
  4. if (!empty($LoggedUser['DisableForums'])) {
  5. error(403);
  6. }
  7. $Forums = Forums::get_forums();
  8. $ForumCats = Forums::get_forum_categories();
  9. if (!empty($_POST['action'])) {
  10. switch ($_POST['action']) {
  11. case 'reply':
  12. require SERVER_ROOT.'/sections/forums/take_reply.php';
  13. break;
  14. case 'new':
  15. require SERVER_ROOT.'/sections/forums/take_new_thread.php';
  16. break;
  17. case 'mod_thread':
  18. require SERVER_ROOT.'/sections/forums/mod_thread.php';
  19. break;
  20. case 'poll_mod':
  21. require SERVER_ROOT.'/sections/forums/poll_mod.php';
  22. break;
  23. case 'add_poll_option':
  24. require SERVER_ROOT.'/sections/forums/add_poll_option.php';
  25. break;
  26. case 'warn':
  27. require SERVER_ROOT.'/sections/forums/warn.php';
  28. break;
  29. case 'take_warn':
  30. require SERVER_ROOT.'/sections/forums/take_warn.php';
  31. break;
  32. case 'take_topic_notes':
  33. require SERVER_ROOT.'/sections/forums/take_topic_notes.php';
  34. break;
  35. default:
  36. error(0);
  37. }
  38. } elseif (!empty($_GET['action'])) {
  39. switch ($_GET['action']) {
  40. case 'viewforum':
  41. // Page that lists all the topics in a forum
  42. require SERVER_ROOT.'/sections/forums/forum.php';
  43. break;
  44. case 'viewthread':
  45. case 'viewtopic':
  46. // Page that displays threads
  47. require SERVER_ROOT.'/sections/forums/thread.php';
  48. break;
  49. case 'ajax_get_edit':
  50. // Page that switches edits for mods
  51. require SERVER_ROOT.'/sections/forums/ajax_get_edit.php';
  52. break;
  53. case 'new':
  54. // Create a new thread
  55. require SERVER_ROOT.'/sections/forums/newthread.php';
  56. break;
  57. case 'takeedit':
  58. // Edit posts
  59. require SERVER_ROOT.'/sections/forums/takeedit.php';
  60. break;
  61. case 'get_post':
  62. // Get posts
  63. require SERVER_ROOT.'/sections/forums/get_post.php';
  64. break;
  65. case 'delete':
  66. // Delete posts
  67. require SERVER_ROOT.'/sections/forums/delete.php';
  68. break;
  69. case 'catchup':
  70. // Catchup
  71. require SERVER_ROOT.'/sections/forums/catchup.php';
  72. break;
  73. case 'search':
  74. // Search posts
  75. require SERVER_ROOT.'/sections/forums/search.php';
  76. break;
  77. case 'change_vote':
  78. // Change poll vote
  79. require SERVER_ROOT.'/sections/forums/change_vote.php';
  80. break;
  81. case 'delete_poll_option':
  82. require SERVER_ROOT.'/sections/forums/delete_poll_option.php';
  83. break;
  84. case 'sticky_post':
  85. require SERVER_ROOT.'/sections/forums/sticky_post.php';
  86. break;
  87. case 'edit_rules':
  88. require SERVER_ROOT.'/sections/forums/edit_rules.php';
  89. break;
  90. case 'thread_subscribe':
  91. break;
  92. case 'warn':
  93. require SERVER_ROOT.'/sections/forums/warn.php';
  94. break;
  95. default:
  96. error(404);
  97. }
  98. } else {
  99. require SERVER_ROOT.'/sections/forums/main.php';
  100. }