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.8KB

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