Oppaitime'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

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