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

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