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

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. #declare(strict_types=1);
  3. // Already done in /sections/ajax/index.php
  4. //enforce_login();
  5. if (!check_perms('site_top10')) {
  6. echo json_encode(array('status' => 'failure'));
  7. error();
  8. }
  9. if (empty($_GET['type']) || $_GET['type'] === 'torrents') {
  10. include SERVER_ROOT.'/sections/ajax/top10/torrents.php';
  11. } else {
  12. switch ($_GET['type']) {
  13. case 'users':
  14. include SERVER_ROOT.'/sections/ajax/top10/users.php';
  15. break;
  16. case 'tags':
  17. include SERVER_ROOT.'/sections/ajax/top10/tags.php';
  18. break;
  19. case 'history':
  20. include SERVER_ROOT.'/sections/ajax/top10/history.php';
  21. break;
  22. default:
  23. echo json_encode(array('status' => 'failure'));
  24. break;
  25. }
  26. }