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.

user.php 19KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635
  1. <?php
  2. #declare(strict_types = 1);
  3. $ENV = ENV::go();
  4. $Orders = ['Time', 'Name', 'Seeders', 'Leechers', 'Snatched', 'Size'];
  5. $Ways = ['DESC' => 'Descending', 'ASC' => 'Ascending'];
  6. // The "order by x" links on columns headers
  7. function header_link($SortKey, $DefaultWay = 'DESC')
  8. {
  9. global $Order, $Way;
  10. if ($SortKey === $Order) {
  11. if ($Way === 'DESC') {
  12. $NewWay = 'ASC';
  13. } else {
  14. $NewWay = 'DESC';
  15. }
  16. } else {
  17. $NewWay = $DefaultWay;
  18. }
  19. return "torrents.php?way=$NewWay&amp;order=$SortKey&amp;" . Format::get_url(array('way','order'));
  20. }
  21. $UserID = $_GET['userid'];
  22. if (!is_number($UserID)) {
  23. error(0);
  24. }
  25. if (!empty($_GET['page']) && is_number($_GET['page']) && $_GET['page'] > 0) {
  26. $Page = $_GET['page'];
  27. $Limit = ($Page - 1) * TORRENTS_PER_PAGE.', '.TORRENTS_PER_PAGE;
  28. } else {
  29. $Page = 1;
  30. $Limit = TORRENTS_PER_PAGE;
  31. }
  32. if (!empty($_GET['order']) && in_array($_GET['order'], $Orders)) {
  33. $Order = $_GET['order'];
  34. } else {
  35. $Order = 'Time';
  36. }
  37. if (!empty($_GET['way']) && array_key_exists($_GET['way'], $Ways)) {
  38. $Way = $_GET['way'];
  39. } else {
  40. $Way = 'DESC';
  41. }
  42. $SearchWhere = [];
  43. if (!empty($_GET['format'])) {
  44. if (in_array($_GET['format'], $Formats)) {
  45. $SearchWhere[] = "t.Format = '".db_string($_GET['format'])."'";
  46. }
  47. }
  48. # Get release specifics
  49. if (isset($_GET['container'])
  50. && in_array($_GET['container'], $ENV-flatten($ENV->META->Formats))) {
  51. $SearchWhere[] = "t.Container = '".db_string($_GET['container'])."'";
  52. }
  53. if (isset($_GET['bitrate'])
  54. && in_array($_GET['bitrate'], $Bitrates)) {
  55. $SearchWhere[] = "t.Encoding = '".db_string($_GET['bitrate'])."'";
  56. }
  57. if (isset($_GET['media'])
  58. && in_array($_GET['media'], $ENV-flatten($ENV->META->Platforms))) {
  59. $SearchWhere[] = "t.Media = '".db_string($_GET['media'])."'";
  60. }
  61. if (isset($_GET['codec'])
  62. && in_array($_GET['codec'], $ENV->META->Licenses)) {
  63. $SearchWhere[] = "t.Codec = '".db_string($_GET['codec'])."'";
  64. }
  65. if (isset($_GET['version'])) {
  66. $SearchWhere[] = "t.Version = '".db_string($_GET['version'])."'";
  67. }
  68. if (isset($_GET['resolution'])
  69. && in_array($_GET['resolution'], $ENV->flatten($ENV->META->Scopes))) {
  70. $SearchWhere[] = "t.Resolution = '".db_string($_GET['resolution'])."'";
  71. }
  72. if (isset($_GET['censored'])
  73. && in_array($_GET['censored'], array(1, 0))) {
  74. $SearchWhere[] = "t.Censored = '".db_string($_GET['censored'])."'";
  75. }
  76. if (!empty($_GET['categories'])) {
  77. $Cats = [];
  78. foreach (array_keys($_GET['categories']) as $Cat) {
  79. if (!is_number($Cat)) {
  80. error(0);
  81. }
  82. $Cats[] = "tg.CategoryID = '".db_string($Cat)."'";
  83. }
  84. $SearchWhere[] = '('.implode(' OR ', $Cats).')';
  85. }
  86. if (!isset($_GET['tags_type'])) {
  87. $_GET['tags_type'] = '1';
  88. }
  89. if (!empty($_GET['tags'])) {
  90. $Tags = explode(',', $_GET['tags']);
  91. $TagList = [];
  92. foreach ($Tags as $Tag) {
  93. $Tag = trim(str_replace('.', '_', $Tag));
  94. if (empty($Tag)) {
  95. continue;
  96. }
  97. if ($Tag[0] === '!') {
  98. $Tag = ltrim(substr($Tag, 1));
  99. if (empty($Tag)) {
  100. continue;
  101. }
  102. $TagList[] = "tg.TagList NOT RLIKE '[[:<:]]".db_string($Tag)."(:[^ ]+)?[[:>:]]'";
  103. } else {
  104. $TagList[] = "tg.TagList RLIKE '[[:<:]]".db_string($Tag)."(:[^ ]+)?[[:>:]]'";
  105. }
  106. }
  107. if (!empty($TagList)) {
  108. if (isset($_GET['tags_type']) && $_GET['tags_type'] !== '1') {
  109. $_GET['tags_type'] = '0';
  110. $SearchWhere[] = '('.implode(' OR ', $TagList).')';
  111. } else {
  112. $_GET['tags_type'] = '1';
  113. $SearchWhere[] = '('.implode(' AND ', $TagList).')';
  114. }
  115. }
  116. }
  117. $SearchWhere = implode(' AND ', $SearchWhere);
  118. if (!empty($SearchWhere)) {
  119. $SearchWhere = " AND $SearchWhere";
  120. }
  121. $User = Users::user_info($UserID);
  122. $Perms = Permissions::get_permissions($User['PermissionID']);
  123. $UserClass = $Perms['Class'];
  124. switch ($_GET['type']) {
  125. case 'snatched':
  126. if (!check_paranoia('snatched', $User['Paranoia'], $UserClass, $UserID)) {
  127. error(403);
  128. }
  129. $Time = 'xs.tstamp';
  130. $UserField = 'xs.uid';
  131. $ExtraWhere = '';
  132. $From = "
  133. xbt_snatched AS xs
  134. JOIN torrents AS t ON t.ID = xs.fid";
  135. break;
  136. case 'seeding':
  137. if (!check_paranoia('seeding', $User['Paranoia'], $UserClass, $UserID)) {
  138. error(403);
  139. }
  140. $Time = '(xfu.mtime - xfu.timespent)';
  141. $UserField = 'xfu.uid';
  142. $ExtraWhere = '
  143. AND xfu.active = 1
  144. AND xfu.Remaining = 0';
  145. $From = "
  146. xbt_files_users AS xfu
  147. JOIN torrents AS t ON t.ID = xfu.fid";
  148. break;
  149. case 'contest':
  150. $Time = 'unix_timestamp(t.Time)';
  151. $UserField = 't.UserID';
  152. $ExtraWhere = "
  153. AND t.ID IN (
  154. SELECT TorrentID
  155. FROM library_contest
  156. WHERE UserID = $UserID
  157. )";
  158. $From = 'torrents AS t';
  159. break;
  160. case 'leeching':
  161. if (!check_paranoia('leeching', $User['Paranoia'], $UserClass, $UserID)) {
  162. error(403);
  163. }
  164. $Time = '(xfu.mtime - xfu.timespent)';
  165. $UserField = 'xfu.uid';
  166. $ExtraWhere = '
  167. AND xfu.active = 1
  168. AND xfu.Remaining > 0';
  169. $From = "
  170. xbt_files_users AS xfu
  171. JOIN torrents AS t ON t.ID = xfu.fid";
  172. break;
  173. case 'uploaded':
  174. if ((empty($_GET['filter']) || $_GET['filter'] !== 'perfectflac') && !check_paranoia('uploads', $User['Paranoia'], $UserClass, $UserID)) {
  175. error(403);
  176. }
  177. $Time = 'unix_timestamp(t.Time)';
  178. $UserField = 't.UserID';
  179. $ExtraWhere = '';
  180. $From = "torrents AS t";
  181. break;
  182. case 'downloaded':
  183. if (!check_perms('site_view_torrent_snatchlist')) {
  184. error(403);
  185. }
  186. $Time = 'unix_timestamp(ud.Time)';
  187. $UserField = 'ud.UserID';
  188. $ExtraWhere = '';
  189. $From = "
  190. users_downloads AS ud
  191. JOIN torrents AS t ON t.ID = ud.TorrentID";
  192. break;
  193. default:
  194. error(404);
  195. }
  196. if (empty($GroupBy)) {
  197. $GroupBy = 't.ID';
  198. }
  199. if ((empty($_GET['search'])
  200. || trim($_GET['search']) === '')) { // && $Order !== 'Name') {
  201. $SQL = "
  202. SELECT
  203. SQL_CALC_FOUND_ROWS
  204. t.GroupID,
  205. t.ID AS TorrentID,
  206. $Time AS Time,
  207. COALESCE(NULLIF(tg.Name, ''), NULLIF(tg.Title2, ''), tg.NameJP) AS Name,
  208. tg.CategoryID
  209. FROM $From
  210. JOIN torrents_group AS tg ON tg.ID = t.GroupID
  211. WHERE $UserField = '$UserID'
  212. $ExtraWhere
  213. $SearchWhere
  214. GROUP BY $GroupBy
  215. ORDER BY $Order $Way
  216. LIMIT $Limit";
  217. } else {
  218. $DB->query("
  219. CREATE TEMPORARY TABLE temp_sections_torrents_user (
  220. GroupID int(10) unsigned not null,
  221. TorrentID int(10) unsigned not null,
  222. Time int(12) unsigned not null,
  223. CategoryID int(3) unsigned,
  224. Seeders int(6) unsigned,
  225. Leechers int(6) unsigned,
  226. Snatched int(10) unsigned,
  227. Name mediumtext,
  228. Size bigint(12) unsigned,
  229. PRIMARY KEY (TorrentID)) CHARSET=utf8");
  230. $DB->query("
  231. INSERT IGNORE INTO temp_sections_torrents_user
  232. SELECT
  233. t.GroupID,
  234. t.ID AS TorrentID,
  235. $Time AS Time,
  236. tg.CategoryID,
  237. t.Seeders,
  238. t.Leechers,
  239. t.Snatched,
  240. CONCAT_WS(' ', GROUP_CONCAT(ag.Name SEPARATOR ' '), ' ', COALESCE(NULLIF(tg.Name,''), NULLIF(tg.Title2,''), tg.NameJP), ' ', tg.Year, ' ') AS Name,
  241. t.Size
  242. FROM $From
  243. JOIN torrents_group AS tg ON tg.ID = t.GroupID
  244. LEFT JOIN torrents_artists AS ta ON ta.GroupID = tg.ID
  245. LEFT JOIN artists_group AS ag ON ag.ArtistID = ta.ArtistID
  246. WHERE $UserField = '$UserID'
  247. $ExtraWhere
  248. $SearchWhere
  249. GROUP BY TorrentID, Time");
  250. if (!empty($_GET['search']) && trim($_GET['search']) !== '') {
  251. $Words = array_unique(explode(' ', db_string($_GET['search'])));
  252. }
  253. $SQL = "
  254. SELECT
  255. SQL_CALC_FOUND_ROWS
  256. GroupID,
  257. TorrentID,
  258. Time,
  259. CategoryID
  260. FROM temp_sections_torrents_user";
  261. if (!empty($Words)) {
  262. $SQL .= "
  263. WHERE Name LIKE '%".implode("%' AND Name LIKE '%", $Words)."%'";
  264. }
  265. $SQL .= "
  266. ORDER BY $Order $Way
  267. LIMIT $Limit";
  268. }
  269. $DB->query($SQL);
  270. $GroupIDs = $DB->collect('GroupID');
  271. $TorrentsInfo = $DB->to_array('TorrentID', MYSQLI_ASSOC);
  272. $DB->query('SELECT FOUND_ROWS()');
  273. list($TorrentCount) = $DB->next_record();
  274. $Results = Torrents::get_groups($GroupIDs);
  275. $Action = display_str($_GET['type']);
  276. $User = Users::user_info($UserID);
  277. View::show_header($User['Username']."'s $Action torrents", 'browse');
  278. $Pages = Format::get_pages($Page, $TorrentCount, TORRENTS_PER_PAGE);
  279. ?>
  280. <div>
  281. <div class="header">
  282. <h2>
  283. <a href="user.php?id=<?= $UserID ?>"><?= $User['Username'] ?></a>
  284. <?= "'s $Action torrents" ?>
  285. </h2>
  286. </div>
  287. <div class="box pad">
  288. <form class="search_form" name="torrents" action="" method="get">
  289. <table class="layout">
  290. <!-- Terms -->
  291. <tr>
  292. <td class="label"><strong>Search Terms</strong></td>
  293. <td>
  294. <input type="hidden" name="type"
  295. value="<?= $_GET['type'] ?>" />
  296. <input type="hidden" name="userid"
  297. value="<?= $UserID ?>" />
  298. <input type="search" name="search" size="60"
  299. value="<?php Format::form('search') ?>" />
  300. </td>
  301. </tr>
  302. <!--
  303. Specifics
  304. todo: Make like the Seq/Img Format fields in browse.php
  305. -->
  306. <tr>
  307. <td class="label"><strong>Specifics</strong></td>
  308. <td class="nobr" colspan="3">
  309. <select id="container" name="container" class="ft_container">
  310. <option value="">Format</option>
  311. <?php foreach ($Containers as $Key => $ContainerName) { ?>
  312. <option value="<?= display_str($Key); ?>" <?php Format::selected('container', $Key) ?>><?= display_str($Key); ?>
  313. </option>
  314. <?php } ?>
  315. </select>
  316. <select id="codec" name="codec" class="ft_codec">
  317. <option value="">License</option>
  318. <?php foreach ($ENV->META->Licenses as $License) { ?>
  319. <option value="<?= display_str($License); ?>" <?php Format::selected('codec', $License) ?>><?= display_str($License); ?>
  320. </option>
  321. <?php } ?>
  322. </select>
  323. <select id="resolution" name="resolution" class="ft_resolution">
  324. <option value="">Scope</option>
  325. <?php foreach ($Resolutions as $ResolutionName) { ?>
  326. <option value="<?= display_str($ResolutionName); ?>"
  327. <?php Format::selected('resolution', $ResolutionName) ?>><?= display_str($ResolutionName); ?>
  328. </option>
  329. <?php } ?>
  330. </select>
  331. <select name="media" class="ft_media">
  332. <option value="">Platform</option>
  333. <?php foreach ($Media as $MediaName) { ?>
  334. <option value="<?= display_str($MediaName); ?>" <?php Format::selected('media', $MediaName) ?>><?= display_str($MediaName); ?>
  335. </option>
  336. <?php } ?>
  337. </select>
  338. </td>
  339. </tr>
  340. <!-- Misc -->
  341. <tr>
  342. <td class="label"><strong>Misc</strong></td>
  343. <td class="nobr" colspan="3">
  344. <select name="censored" class="ft_censored">
  345. <option value="3">Alignment</option>
  346. <option value="1" <?Format::selected('censored', 1)?>>
  347. Aligned
  348. </option>
  349. <option value="0" <?Format::selected('censored', 0)?>>
  350. Not Aligned
  351. </option>
  352. </select>
  353. </td>
  354. </tr>
  355. <!-- Tags -->
  356. <tr>
  357. <td class="label"><strong>Tags</strong></td>
  358. <td>
  359. <input type="search" name="tags" size="60"
  360. value="<?php Format::form('tags') ?>" />&nbsp;
  361. <input type="radio" name="tags_type" id="tags_type0" value="0" <?php Format::selected('tags_type', 0, 'checked') ?>
  362. /><label for="tags_type0"> Any</label>&nbsp;&nbsp;
  363. <input type="radio" name="tags_type" id="tags_type1" value="1" <?php Format::selected('tags_type', 1, 'checked') ?>
  364. /><label for="tags_type1"> All</label><br />
  365. Use !tag to exclude tags
  366. </td>
  367. </tr>
  368. <!-- Order By -->
  369. <tr>
  370. <td class="label"><strong>Order By</strong></td>
  371. <td>
  372. <select name="order" class="ft_order_by">
  373. <?php foreach ($Orders as $OrderText) { ?>
  374. <option value="<?= $OrderText ?>" <?php Format::selected('order', $OrderText) ?>><?= $OrderText ?>
  375. </option>
  376. <?php } ?>
  377. </select>
  378. <select name="way" class="ft_order_way">
  379. <?php foreach ($Ways as $WayKey=>$WayText) { ?>
  380. <option value="<?= $WayKey ?>" <?php Format::selected('way', $WayKey) ?>><?= $WayText ?>
  381. </option>
  382. <?php } ?>
  383. </select>
  384. </td>
  385. </tr>
  386. </table>
  387. <!-- Categories -->
  388. <table class="layout cat_list">
  389. <?php
  390. $x = 0;
  391. reset($Categories);
  392. foreach ($Categories as $CatKey => $CatName) {
  393. if ($x % 7 === 0) {
  394. if ($x > 0) { ?>
  395. </tr>
  396. <?php } ?>
  397. <tr>
  398. <?php
  399. }
  400. $x++; ?>
  401. <td>
  402. <input type="checkbox"
  403. name="categories[<?= ($CatKey+1) ?>]"
  404. id="cat_<?= ($CatKey+1) ?>" value="1" <?php if (isset($_GET['categories'][$CatKey + 1])) { ?>
  405. checked="checked"<?php } ?> />
  406. <label for="cat_<?= ($CatKey + 1) ?>"><?= $CatName ?></label>
  407. </td>
  408. <?php
  409. } ?>
  410. </tr>
  411. </table>
  412. <!-- Submit -->
  413. <div class="submit">
  414. <span class="float_left">
  415. <?= number_format($TorrentCount) ?>
  416. Results
  417. </span>
  418. <input type="submit" value="Search" />
  419. </div>
  420. </form>
  421. </div>
  422. <!-- Results table -->
  423. <?php if (count($GroupIDs) === 0) { ?>
  424. <div class="center">
  425. Nothing found!
  426. </div>
  427. <?php } else { ?>
  428. <div class="linkbox">
  429. <?=$Pages?>
  430. </div>
  431. <div class="box">
  432. <table class="torrent_table cats" width="100%">
  433. <tr class="colhead">
  434. <td class="cats_col"></td>
  435. <td>
  436. <a
  437. href="<?= header_link('Name', 'ASC') ?>">Torrent</a>
  438. </td>
  439. <td>
  440. <a
  441. href="<?= header_link('Time') ?>">Time</a>
  442. </td>
  443. <td>
  444. <a
  445. href="<?= header_link('Size') ?>">Size</a>
  446. </td>
  447. <td class="sign snatches">
  448. <a
  449. href="<?= header_link('Snatched') ?>">↻</a>
  450. </td>
  451. <td class="sign seeders">
  452. <a
  453. href="<?= header_link('Seeders') ?>">&uarr;</a>
  454. </td>
  455. <td class="sign leechers">
  456. <a
  457. href="<?= header_link('Leechers') ?>">&darr;</a>
  458. </td>
  459. </tr>
  460. <!-- Results list -->
  461. <?php
  462. $PageSize = 0;
  463. foreach ($TorrentsInfo as $TorrentID => $Info) {
  464. list($GroupID, , $Time) = array_values($Info);
  465. extract(Torrents::array_group($Results[$GroupID]));
  466. $Torrent = $Torrents[$TorrentID];
  467. $TorrentTags = new Tags($TagList);
  468. # This is the torrent list formatting!
  469. $DisplayName = '';
  470. $DisplayName .= '<a class="torrent_title" href="torrents.php?id='.$GroupID.'&amp;torrentid='.$TorrentID.'" ';
  471. # No cover art
  472. if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
  473. $DisplayName .= 'data-cover="'.ImageTools::process($WikiImage, 'thumb').'" ';
  474. }
  475. # Old concatenated title: EN, JP, RJ
  476. #$GroupName = empty($GroupName) ? (empty($GroupTitle2) ? $GroupNameJP : $GroupTitle2) : $GroupName;
  477. $DisplayName .= 'dir="ltr">'.$GroupName.'</a>';
  478. # Year
  479. if ($GroupYear) {
  480. $Label = '<br />📅&nbsp;';
  481. $DisplayName .= $Label."<a href='torrents.php?action=search&year=$GroupYear'>$GroupYear</a>";
  482. }
  483. # Studio
  484. if ($GroupStudio) {
  485. $Label = '&ensp;📍&nbsp;';
  486. $DisplayName .= $Label."<a href='torrents.php?action=search&location=$GroupStudio'>$GroupStudio</a>";
  487. }
  488. # Catalogue Number
  489. if ($GroupCatalogueNumber) {
  490. $Label = '&ensp;🔑&nbsp;';
  491. $DisplayName .= $Label."<a href='torrents.php?action=search&numbers=$GroupCatalogueNumber'>$GroupCatalogueNumber</a>";
  492. }
  493. # Organism
  494. if ($GroupTitle2) {
  495. $Label = '&ensp;🦠&nbsp;';
  496. $DisplayName .= $Label."<a href='torrents.php?action=search&advgroupname=$GroupTitle2'><em>$GroupTitle2</em></a>";
  497. }
  498. # Strain/Variety
  499. if ($GroupNameJP) {
  500. $Label = '&nbsp;';
  501. $DisplayName .= $Label."<a href='torrents.php?action=search&advgroupname=$GroupNameJP'>$GroupNameJP</a>";
  502. }
  503. # Authors
  504. if (isset($Artists)) {
  505. # Emoji in classes/astists.class.php
  506. $Label = '&ensp;';
  507. $DisplayName .= $Label.'<div class="torrent_artists">'.Artists::display_artists($Artists).'</div>';
  508. }
  509. ?>
  510. <tr
  511. class="torrent torrent_row<?= ($Torrent['IsSnatched'] ? ' snatched_torrent' : '') . ($GroupFlags['IsSnatched'] ? ' snatched_group' : '') ?>">
  512. <td class="center cats_col">
  513. <div
  514. title="<?= Format::pretty_category($GroupCategoryID) ?>"
  515. class="tooltip <?= Format::css_category($GroupCategoryID) ?>">
  516. </div>
  517. </td>
  518. <td class="big_info">
  519. <div class="group_info clear">
  520. <span class="torrent_links_block">
  521. [ <a
  522. href="torrents.php?action=download&amp;id=<?= $TorrentID ?>&amp;authkey=<?= $LoggedUser['AuthKey'] ?>&amp;torrent_pass=<?= $LoggedUser['torrent_pass'] ?>"
  523. class="tooltip" title="Download">DL</a>
  524. | <a
  525. href="reportsv2.php?action=report&amp;id=<?= $TorrentID ?>"
  526. class="tooltip" title="Report">RP</a> ]
  527. </span>
  528. <?= "$DisplayName\n"; ?>
  529. <?php
  530. $ExtraInfo = Torrents::torrent_info($Torrent);
  531. if ($ExtraInfo) {
  532. echo "<br />$ExtraInfo";
  533. } ?>
  534. <div class="tags"><?= $TorrentTags->format('torrents.php?type='.$Action.'&amp;userid='.$UserID.'&amp;tags=') ?>
  535. </div>
  536. </div>
  537. </td>
  538. <td class="nobr"><?= time_diff($Time, 1) ?>
  539. </td>
  540. <td class="number_column nobr"><?= Format::get_size($Torrent['Size']) ?>
  541. </td>
  542. <td class="number_column"><?= number_format($Torrent['Snatched']) ?>
  543. </td>
  544. <td
  545. class="number_column<?= (($Torrent['Seeders'] === 0) ? ' r00' : '') ?>">
  546. <?= number_format($Torrent['Seeders']) ?>
  547. </td>
  548. <td class="number_column"><?= number_format($Torrent['Leechers']) ?>
  549. </td>
  550. </tr>
  551. <?php
  552. } ?>
  553. </table>
  554. </div>
  555. <?php } ?>
  556. <div class="linkbox"><?= $Pages ?>
  557. </div>
  558. </div>
  559. <?php View::show_footer();