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 20KB

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