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

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