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.

screenshots.php 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <?php
  2. declare(strict_types=1);
  3. $All = (!empty($_GET['filter']) && $_GET['filter'] === 'all');
  4. $Join = $All
  5. ? ''
  6. : (
  7. 'JOIN torrents AS t ON t.GroupID=tg.ID
  8. JOIN xbt_snatched AS x ON x.fid = t.ID AND x.uid = '
  9. . $LoggedUser['ID']
  10. );
  11. View::show_header('Torrent groups with no publications');
  12. $DB->query("
  13. SELECT SQL_CALC_FOUND_ROWS
  14. tg.`ID`
  15. FROM
  16. `torrents_group` AS tg
  17. $Join
  18. WHERE
  19. tg.`ID` NOT IN(
  20. SELECT DISTINCT
  21. `TorrentID`
  22. FROM
  23. `torrents_screenshots`
  24. )
  25. ORDER BY
  26. RAND()
  27. LIMIT 20
  28. ");
  29. $Groups = $DB->to_array('ID', MYSQLI_ASSOC);
  30. $DB->query('SELECT FOUND_ROWS()');
  31. list($NumResults) = $DB->next_record();
  32. $Results = Torrents::get_groups(array_keys($Groups));
  33. ?>
  34. <div class="header">
  35. <?php if ($All) { ?>
  36. <h2>
  37. All groups with no publications
  38. </h2>
  39. <?php } else { ?>
  40. <h2>
  41. Torrent groups with no publications that you have snatched
  42. </h2>
  43. <?php } ?>
  44. <div class="linkbox">
  45. <a href="better.php" class="brackets">Back to better.php list</a>
  46. <?php if ($All) { ?>
  47. <a href="better.php?method=screenshots" class="brackets">Show only those you have snatched</a>
  48. <?php } else { ?>
  49. <a href="better.php?method=screenshots&amp;filter=all" class="brackets">Show all</a>
  50. <?php } ?>
  51. </div>
  52. </div>
  53. <div class="box pad">
  54. <h3>
  55. There are <?=number_format($NumResults)?> groups remaining
  56. </h3>
  57. <table class="torrent_table">
  58. <?php
  59. foreach ($Results as $Result) {
  60. extract($Result);
  61. $LangName = $Name ? $Name : ($Title2 ? $Title2 : $NameJP);
  62. $TorrentTags = new Tags($TagList);
  63. $DisplayName = "<a href='torrents.php?id=$ID' ";
  64. if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
  65. $DisplayName .= 'data-cover="'.ImageTools::process($WikiImage, 'thumb').'" ';
  66. }
  67. $DisplayName .= ">$LangName</a>";
  68. if ($Year > 0) {
  69. $DisplayName .= " [$Year]";
  70. } ?>
  71. <tr class="torrent">
  72. <td>
  73. <div class="<?=Format::css_category($CategoryID)?>"></div>
  74. </td>
  75. <td>
  76. <?=$DisplayName?>
  77. <div class="tags"><?=$TorrentTags->format()?>
  78. </div>
  79. </td>
  80. </tr>
  81. <?php
  82. } ?>
  83. </table>
  84. </div>
  85. <?php View::show_footer();