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.

single.php 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. if (($Results = $Cache->get_value('better_single_groupids')) === false) {
  3. $DB->query("
  4. SELECT
  5. t.ID AS TorrentID,
  6. t.GroupID AS GroupID
  7. FROM xbt_files_users AS x
  8. JOIN torrents AS t ON t.ID=x.fid
  9. GROUP BY x.fid
  10. HAVING COUNT(x.uid) = 1
  11. LIMIT 30");
  12. $Results = $DB->to_pair('GroupID', 'TorrentID', false);
  13. $Cache->cache_value('better_single_groupids', $Results, 30 * 60);
  14. }
  15. $Groups = Torrents::get_groups(array_keys($Results));
  16. View::show_header('Single seeder torrents');
  17. ?>
  18. <div class="header">
  19. <h2>
  20. Torrents with only one seeder
  21. </h2>
  22. <div class="linkbox">
  23. <a href="better.php" class="brackets">Back to better.php list</a>
  24. </div>
  25. </div>
  26. <table width="100%" class="torrent_table">
  27. <tr class="colhead">
  28. <td>
  29. Torrent
  30. </td>
  31. </tr>
  32. <?php
  33. foreach ($Results as $GroupID => $TorrentID) {
  34. if (!isset($Groups[$GroupID])) {
  35. continue;
  36. }
  37. $Group = $Groups[$GroupID];
  38. extract(Torrents::array_group($Group));
  39. $TorrentTags = new Tags($TagList);
  40. if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5]) || !empty($ExtendedArtists[6])) {
  41. unset($ExtendedArtists[2]);
  42. unset($ExtendedArtists[3]);
  43. $DisplayName = Artists::display_artists($ExtendedArtists);
  44. } else {
  45. $DisplayName = '';
  46. }
  47. $DisplayName .= "<a href='torrents.php?id=$GroupID&amp;torrentid=$TorrentID' class='torrent_title'>$GroupName</a>";
  48. if ($GroupYear > 0) {
  49. $DisplayName .= " [$GroupYear]";
  50. }
  51. $ExtraInfo = Torrents::torrent_info($Torrents[$TorrentID]);
  52. if ($ExtraInfo) {
  53. $DisplayName .= "<br />$ExtraInfo";
  54. } ?>
  55. <tr
  56. class="torrent torrent_row<?=$Torrents[$TorrentID]['IsSnatched'] ? ' snatched_torrent' : ''?>">
  57. <td>
  58. <span class="torrent_links_block">
  59. <a href="torrents.php?action=download&amp;id=<?=$TorrentID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>"
  60. title="Download" class="brackets tooltip">DL</a>
  61. </span>
  62. <?= $DisplayName ?>
  63. <div class="tags">
  64. <?= $TorrentTags->format() ?>
  65. </div>
  66. </td>
  67. </tr>
  68. <?php
  69. } ?>
  70. </table>
  71. </div>
  72. <?php View::show_footer();