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

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. #declare(strict_types=1);
  3. // Already done in /sections/ajax/index.php
  4. //enforce_login();
  5. if (!empty($LoggedUser['DisableForums'])) {
  6. echo json_encode(array('status' => 'failure'));
  7. error();
  8. } else {
  9. // Replace the old hard-coded forum categories
  10. $ForumCats = Forums::get_forum_categories();
  11. // This variable contains all our lovely forum data
  12. $Forums = Forums::get_forums();
  13. if (empty($_GET['type']) || $_GET['type'] === 'main') {
  14. include SERVER_ROOT.'/sections/ajax/forum/main.php';
  15. } else {
  16. switch ($_GET['type']) {
  17. case 'viewforum':
  18. include SERVER_ROOT.'/sections/ajax/forum/forum.php';
  19. break;
  20. case 'viewthread':
  21. include SERVER_ROOT.'/sections/ajax/forum/thread.php';
  22. break;
  23. default:
  24. echo json_encode(array('status' => 'failure'));
  25. break;
  26. }
  27. }
  28. }