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.

browse.php 42KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100
  1. <?php
  2. #declare(strict_types = 1);
  3. $ENV = ENV::go();
  4. require_once SERVER_ROOT.'/sections/torrents/functions.php';
  5. // The "order by x" links on columns headers
  6. function header_link($SortKey, $DefaultWay = 'desc')
  7. {
  8. global $OrderBy, $OrderWay;
  9. if ($SortKey === $OrderBy) {
  10. if ($OrderWay === 'desc') {
  11. $NewWay = 'asc';
  12. } else {
  13. $NewWay = 'desc';
  14. }
  15. } else {
  16. $NewWay = $DefaultWay;
  17. }
  18. return "torrents.php?order_way=$NewWay&amp;order_by=$SortKey&amp;".Format::get_url(['order_way', 'order_by']);
  19. }
  20. if (!empty($_GET['searchstr']) || !empty($_GET['groupname'])) {
  21. if (!empty($_GET['searchstr'])) {
  22. $InfoHash = $_GET['searchstr'];
  23. } else {
  24. $InfoHash = $_GET['groupname'];
  25. }
  26. // Search by info hash
  27. if ($InfoHash = is_valid_torrenthash($InfoHash)) {
  28. $InfoHash = db_string(pack('H*', $InfoHash));
  29. $DB->query("
  30. SELECT ID, GroupID
  31. FROM torrents
  32. WHERE info_hash = '$InfoHash'");
  33. if ($DB->has_results()) {
  34. list($ID, $GroupID) = $DB->next_record();
  35. header("Location: torrents.php?id=$GroupID&torrentid=$ID");
  36. error();
  37. }
  38. }
  39. }
  40. // Setting default search options
  41. if (!empty($_GET['setdefault'])) {
  42. $UnsetList = ['page', 'setdefault'];
  43. $UnsetRegexp = '/(&|^)('.implode('|', $UnsetList).')=.*?(&|$)/i';
  44. $DB->query("
  45. SELECT SiteOptions
  46. FROM users_info
  47. WHERE UserID = ?", $LoggedUser['ID']);
  48. list($SiteOptions) = $DB->next_record(MYSQLI_NUM, false);
  49. $SiteOptions = json_decode($SiteOptions, true) ?? [];
  50. $SiteOptions['DefaultSearch'] = preg_replace($UnsetRegexp, '', $_SERVER['QUERY_STRING']);
  51. $DB->query("
  52. UPDATE users_info
  53. SET SiteOptions = ?
  54. WHERE UserID = ?", json_encode($SiteOptions), $LoggedUser['ID']);
  55. $Cache->begin_transaction("user_info_heavy_$UserID");
  56. $Cache->update_row(false, ['DefaultSearch' => $SiteOptions['DefaultSearch']]);
  57. $Cache->commit_transaction(0);
  58. // Clearing default search options
  59. } elseif (!empty($_GET['cleardefault'])) {
  60. $DB->query("
  61. SELECT SiteOptions
  62. FROM users_info
  63. WHERE UserID = ?", $LoggedUser['ID']);
  64. list($SiteOptions) = $DB->next_record(MYSQLI_NUM, false);
  65. $SiteOptions = json_decode($SiteOptions, true) ?? [];
  66. $SiteOptions['DefaultSearch'] = '';
  67. $DB->query("
  68. UPDATE users_info
  69. SET SiteOptions = ?
  70. WHERE UserID = ?", json_encode($SiteOptions), $LoggedUser['ID']);
  71. $Cache->begin_transaction("user_info_heavy_$UserID");
  72. $Cache->update_row(false, ['DefaultSearch' => '']);
  73. $Cache->commit_transaction(0);
  74. // Use default search options
  75. } elseif (empty($_SERVER['QUERY_STRING']) || (count($_GET) === 1 && isset($_GET['page']))) {
  76. if (!empty($LoggedUser['DefaultSearch'])) {
  77. if (!empty($_GET['page'])) {
  78. $Page = $_GET['page'];
  79. parse_str($LoggedUser['DefaultSearch'], $_GET);
  80. $_GET['page'] = $Page;
  81. } else {
  82. parse_str($LoggedUser['DefaultSearch'], $_GET);
  83. }
  84. }
  85. }
  86. // Terms were not submitted via the search form
  87. if (isset($_GET['searchsubmit'])) {
  88. $GroupResults = !empty($_GET['group_results']);
  89. } else {
  90. $GroupResults = !$LoggedUser['DisableGrouping2'];
  91. }
  92. if (!empty($_GET['order_way']) && $_GET['order_way'] === 'asc') {
  93. $OrderWay = 'asc';
  94. } else {
  95. $OrderWay = 'desc';
  96. }
  97. if (empty($_GET['order_by']) || !isset(TorrentSearch::$SortOrders[$_GET['order_by']])) {
  98. $OrderBy = 'time'; // For header links
  99. } else {
  100. $OrderBy = $_GET['order_by'];
  101. }
  102. $Page = !empty($_GET['page']) ? (int) $_GET['page'] : 1;
  103. $Search = new TorrentSearch($GroupResults, $OrderBy, $OrderWay, $Page, TORRENTS_PER_PAGE);
  104. # Three profile toggle options
  105. if (isset($LoggedUser['HideLolicon']) && $LoggedUser['HideLolicon'] === 1) {
  106. $Search->insert_hidden_tags('!lolicon !shotacon !toddlercon');
  107. }
  108. # 2
  109. if (isset($LoggedUser['HideScat']) && $LoggedUser['HideScat'] === 1) {
  110. $Search->insert_hidden_tags('!scat');
  111. }
  112. # 3
  113. if (isset($LoggedUser['HideSnuff']) && $LoggedUser['HideSnuff'] === 1) {
  114. $Search->insert_hidden_tags('!snuff');
  115. }
  116. $Results = $Search->query($_GET);
  117. $Groups = $Search->get_groups();
  118. $NumResults = $Search->record_count();
  119. $HideFilter = isset($LoggedUser['ShowTorFilter']) && $LoggedUser['ShowTorFilter'] === 0;
  120. // This is kinda ugly, but the enormous if paragraph was really hard to read
  121. $AdvancedSearch = !empty($_GET['action']) && $_GET['action'] === 'advanced';
  122. $AdvancedSearch |= !empty($LoggedUser['SearchType']) && (empty($_GET['action']) || $_GET['action'] === 'advanced');
  123. $AdvancedSearch &= check_perms('site_advanced_search');
  124. if ($AdvancedSearch) {
  125. $Action = 'action=advanced';
  126. $HideBasic = ' hidden';
  127. $HideAdvanced = '';
  128. } else {
  129. $Action = 'action=basic';
  130. $HideBasic = '';
  131. $HideAdvanced = ' hidden';
  132. }
  133. # Start the search form
  134. # Fortunately it's very easy to search via
  135. # torrentsearch.class.php
  136. View::show_header('Browse Torrents', 'browse');
  137. ?>
  138. <div>
  139. <div class="header">
  140. <h2>Torrents</h2>
  141. </div>
  142. <form class="search_form" name="torrents" method="get" onsubmit="$(this).disableUnset();">
  143. <div class="box filter_torrents">
  144. <div class="head">
  145. <strong>
  146. <span id="ft_basic" class="<?=$HideBasic?>">Basic Search
  147. (<a class="clickable" onclick="toggleTorrentSearch('advanced')">Advanced</a>)</span>
  148. <span id="ft_advanced" class="<?=$HideAdvanced?>">Advanced
  149. Search (<a class="clickable" onclick="toggleTorrentSearch('basic')">Basic</a>)</span>
  150. </strong>
  151. <span class="float_right">
  152. <a onclick="return toggleTorrentSearch(0);" id="ft_toggle" class="brackets"><?=$HideFilter ? 'Show' : 'Hide'?></a>
  153. </span>
  154. </div>
  155. <div id="ft_container"
  156. class="pad<?=$HideFilter ? ' hidden' : ''?>">
  157. <?php
  158. # Three profile toggles
  159. if ((isset($LoggedUser['HideLolicon']) && $LoggedUser['HideLolicon'] === 1)
  160. || (isset($LoggedUser['HideScat']) && $LoggedUser['HideScat'] === 1)
  161. || (isset($LoggedUser['HideSnuff']) && $LoggedUser['HideSnuff'] === 1)
  162. ) { ?>
  163. <svg title="Your profile settings exclude some results" class="search_warning tooltip" width="10" height="15">
  164. <rect x=3 width="4" height="10" rx="2" ry="2" />
  165. <circle cx="5" cy="13" r="2" />
  166. </svg>
  167. <?php
  168. } ?>
  169. <table class="layout torrent_search">
  170. <tr id="numbers" class="ftr_advanced<?=$HideAdvanced?>">
  171. <td class="label">
  172. <!--
  173. Accession Number / Version
  174. -->
  175. </td>
  176. <td class="ft_numbers">
  177. <input type="search" size="30" name="numbers" class="inputtext smallest fti_advanced"
  178. placeholder="Accession Number / Version" value="<?Format::form('numbers')?>" />
  179. </td>
  180. </tr>
  181. <tr id="album_torrent_title"
  182. class="ftr_advanced<?=$HideAdvanced?>">
  183. <td class="label">
  184. <!-- Torrent Title / Organism / Strain or Variety -->
  185. </td>
  186. <td class="ft_groupname">
  187. <input type="search" spellcheck="false" size="65" name="advgroupname"
  188. class="inputtext smaller fti_advanced" placeholder="Torrent Title / Organism / Strain or Variety"
  189. value="<?Format::form('advgroupname')?>" />
  190. </td>
  191. </tr>
  192. <tr id="artist_name"
  193. class="ftr_advanced<?=$HideAdvanced?>">
  194. <td class="label">
  195. <!-- Artist Name -->
  196. </td>
  197. <td class="ft_artistname">
  198. <input type="search" spellcheck="false" size="65" id="artist" name="artistname"
  199. class="inputtext smaller fti_advanced" placeholder="Author (ORCiD pending)"
  200. value="<?Format::form('artistname')?>" <?php Users::has_autocomplete_enabled('other'); ?>/>
  201. </td>
  202. </tr>
  203. <tr id="location" class="ftr_advanced<?=$HideAdvanced?>">
  204. <td class="label">
  205. <!-- Studio / Series -->
  206. </td>
  207. <td class="ft_location">
  208. <input type="search" name="location" class="inputtext smallest fti_advanced"
  209. placeholder="Department or Lab / Location" value="<?Format::form('location')?>" size="40" />
  210. <!-- Year -->
  211. <input type="search" name="year" class="inputtext smallest fti_advanced" placeholder="Year"
  212. value="<?Format::form('year')?>" size="20" />
  213. </td>
  214. </tr>
  215. <tr id="torrent_description"
  216. class="ftr_advanced<?=$HideAdvanced?>">
  217. <td class="label">
  218. <!-- Torrent Description -->
  219. </td>
  220. <td class="ft_description">
  221. <input type="search" spellcheck="false" size="65" name="description" class="inputtext fti_advanced"
  222. placeholder="Torrent Description"
  223. value="<?php Format::form('description') ?>" /><br /><br />
  224. Search torrent descriptions (not group information)
  225. </td>
  226. </tr>
  227. <tr id="file_list" class="ftr_advanced<?=$HideAdvanced?>">
  228. <td class="label">
  229. <!-- File List -->
  230. </td>
  231. <td class="ft_filelist">
  232. <input type="search" spellcheck="false" size="65" name="filelist" class="inputtext fti_advanced"
  233. placeholder="File List" value="<?Format::form('filelist')?>" /><br /><br />
  234. Universal Search finds info hashes
  235. </td>
  236. </tr>
  237. <!-- Platforms -->
  238. <tr id="rip_specifics"
  239. class="ftr_advanced<?=$HideAdvanced?>">
  240. <td class="label">Platforms</td>
  241. <td class="nobr ft_ripspecifics">
  242. <select name="media" class="ft_media fti_advanced">
  243. <option value="">Sequences</option>
  244. <?php foreach ($ENV->META->Platforms->Sequences as $Platform) { ?>
  245. <option
  246. value="<?=display_str($Platform); # pcs-comment-start; keep quote?>"
  247. <?Format::selected('media', $Platform)?>><?=display_str($Platform); ?>
  248. </option>
  249. <?php } ?>
  250. </select>
  251. <select name="media" class="ft_media fti_advanced">
  252. <option value="">Graphs</option>
  253. <?php foreach ($ENV->META->Platforms->Graphs as $Platform) { ?>
  254. <option
  255. value="<?=display_str($Platform); # pcs-comment-start; keep quote?>"
  256. <?Format::selected('media', $Platform)?>><?=display_str($Platform); ?>
  257. </option>
  258. <?php } ?>
  259. </select>
  260. <select name="media" class="ft_media fti_advanced">
  261. <option value="">Images</option>
  262. <?php foreach ($ENV->META->Platforms->Images as $Platform) { ?>
  263. <option
  264. value="<?=display_str($Platform); # pcs-comment-start; keep quote?>"
  265. <?Format::selected('media', $Platform)?>><?=display_str($Platform); ?>
  266. </option>
  267. <?php } ?>
  268. </select>
  269. <select name="media" class="ft_media fti_advanced">
  270. <option value="">Documents</option>
  271. <?php foreach ($ENV->META->Platforms->Documents as $Platform) { ?>
  272. <option
  273. value="<?=display_str($Platform); # pcs-comment-start; keep quote?>"
  274. <?Format::selected('media', $Platform)?>><?=display_str($Platform); ?>
  275. </option>
  276. <?php } ?>
  277. </select>
  278. </td>
  279. </tr>
  280. <!-- Formats -->
  281. <tr id="rip_specifics"
  282. class="ftr_advanced<?=$HideAdvanced?>">
  283. <td class="label">Formats</td>
  284. <td class="nobr ft_ripspecifics">
  285. <select id=" container" name="container" class="ft_container fti_advanced">
  286. <option value="">NucleoSeq</option>
  287. <?php foreach (array_merge($SeqFormats, $PlainFormats) as $Key => $Container) { ?>
  288. <option value="<?=display_str($Key);?>"
  289. <?Format::selected('container', $Key)?>><?=display_str($Key);?>
  290. </option>
  291. <?php } ?>
  292. </select>
  293. <select id=" container" name="container" class="ft_container fti_advanced">
  294. <option value="">ProtSeq</option>
  295. <?php foreach (array_merge($ProtFormats, $PlainFormats) as $Key => $Container) { ?>
  296. <option value="<?=display_str($Key);?>"
  297. <?Format::selected('container', $Key)?>><?=display_str($Key);?>
  298. </option>
  299. <?php } ?>
  300. </select>
  301. <select id=" container" name="container" class="ft_container fti_advanced">
  302. <option value="">XMLs</option>
  303. <?php foreach (array_merge($GraphXmlFormats, $GraphTxtFormats, $PlainFormats) as $Key => $Container) { ?>
  304. <option value="<?=display_str($Key);?>"
  305. <?Format::selected('container', $Key)?>><?=display_str($Key);?>
  306. </option>
  307. <?php } ?>
  308. </select>
  309. <select id=" container" name="container" class="ft_container fti_advanced">
  310. <option value="">Raster</option>
  311. <?php foreach (array_merge($ImgFormats, $MapRasterFormats, $PlainFormats) as $Key => $Container) { ?>
  312. <option value="<?=display_str($Key);?>"
  313. <?Format::selected('container', $Key)?>><?=display_str($Key);?>
  314. </option>
  315. <?php } ?>
  316. </select>
  317. <select id=" container" name="container" class="ft_container fti_advanced">
  318. <option value="">Vector</option>
  319. <?php foreach (array_merge($MapVectorFormats, $PlainFormats) as $Key => $Container) { ?>
  320. <option value="<?=display_str($Key);?>"
  321. <?Format::selected('container', $Key)?>><?=display_str($Key);?>
  322. </option>
  323. <?php } ?>
  324. </select>
  325. <select id=" container" name="container" class="ft_container fti_advanced">
  326. <option value="">Extras</option>
  327. <?php foreach (array_merge($BinDocFormats, $CpuGenFormats, $PlainFormats) as $Key => $Container) { ?>
  328. <option value="<?=display_str($Key);?>"
  329. <?Format::selected('container', $Key)?>><?=display_str($Key);?>
  330. </option>
  331. <?php } ?>
  332. </select>
  333. </td>
  334. </tr>
  335. <!-- Misc -->
  336. <tr id="misc" class="ftr_advanced<?=$HideAdvanced?>">
  337. <td class="label">Misc</td>
  338. <td class="nobr ft_misc">
  339. <select name="resolution" class="ft_resolution fti_advanced">
  340. <option value="">Scope</option>
  341. <?php foreach ($Resolutions as $Resolution) { ?>
  342. <option
  343. value="<?=display_str($Resolution); # pcs-comment-start; keep quote?>"
  344. <?Format::selected('resolution', $Resolution)?>><?=display_str($Resolution); ?>
  345. </option>
  346. <?php } ?>
  347. </select>
  348. <!-- Aligned/Censored -->
  349. <select name=" censored" class="ft_censored fti_advanced">
  350. <option value="">Alignment</option>
  351. <option value="1" <?Format::selected('censored', 1)?>>Aligned
  352. </option>
  353. <option value="0" <?Format::selected('censored', 0)?>>Not Aligned
  354. </option>
  355. </select>
  356. <!-- Leech Status -->
  357. <select name="freetorrent" class="ft_freetorrent fti_advanced">
  358. <option value="">Leech Status</option>
  359. <option value="1" <?Format::selected('freetorrent', 1)?>>Freeleech</option>
  360. <option value="2" <?Format::selected('freetorrent', 2)?>>Neutral Leech</option>
  361. <option value="3" <?Format::selected('freetorrent', 3)?>>Either</option>
  362. <option value="0" <?Format::selected('freetorrent', 0)?>>Normal</option>
  363. </select>
  364. <!-- Codec/License -->
  365. <select name="codec" class="ft_codec fti_advanced">
  366. <option value="">License</option>
  367. <?php foreach ($ENV->META->Licenses as $License) { ?>
  368. <option value="<?=display_str($License); ?>"
  369. <?Format::selected('codec', $License)?>><?=display_str($License); ?>
  370. </option>
  371. <?php } ?>
  372. </select>
  373. </td>
  374. </tr>
  375. <!-- Size -->
  376. <tr id="size" class="ftr_advanced<?=$HideAdvanced?>">
  377. <td class="label">Size</td>
  378. <td class="ft_size">
  379. <input type="size_min" spellcheck="false" size="6" name="size_min" class="inputtext smaller fti_advanced"
  380. placeholder="Min" value="<?Format::form('size_min')?>" />
  381. &ndash;
  382. <input type="size_max" spellcheck="false" size="6" name="size_max" class="inputtext smaller fti_advanced"
  383. placeholder="Max" value="<?Format::form('size_max')?>" />
  384. <select name="size_unit" class="ft_size fti_advanced">
  385. <option value="">Unit</option>
  386. <option value="0" <?Format::selected('size_unit', 0)?>>B
  387. </option>
  388. <option value="1" <?Format::selected('size_unit', 1)?>>KiB
  389. </option>
  390. <option value="2" <?Format::selected('size_unit', 2)?>>MiB
  391. </option>
  392. <option value="3" <?Format::selected('size_unit', 3)?>>GiB
  393. </option>
  394. <option value="4" <?Format::selected('size_unit', 4)?>>TiB
  395. </option>
  396. </select>
  397. </td>
  398. </tr>
  399. <!-- Start basic search options -->
  400. <tr id="search_terms" class="ftr_basic<?=$HideBasic?>">
  401. <td class="label">
  402. <!-- Universal Search -->
  403. </td>
  404. <td class="ftb_searchstr">
  405. <input type="search" spellcheck="false" size="48" name="searchstr" class="inputtext fti_basic"
  406. placeholder="Universal Search" value="<?Format::form('searchstr')?>" aria-label="Terms to search">
  407. </td>
  408. </tr>
  409. <tr id="tagfilter">
  410. <td class="label">
  411. <!-- Tags (comma-separated) -->
  412. </td>
  413. <td class="ft_taglist">
  414. <input type="search" size="37" id="tags" name="taglist" class="inputtext smaller"
  415. placeholder="Tags (comma-separated)"
  416. value="<?=display_str($Search->get_terms('taglist'))?>"
  417. <?php Users::has_autocomplete_enabled('other'); ?>
  418. aria-label="Tags to search">&nbsp;
  419. <input type="radio" name="tags_type" id="tags_type0" value="0" <?Format::selected(
  420. 'tags_type',
  421. 0,
  422. 'checked'
  423. )?>
  424. /><label for="tags_type0"> Any</label>&nbsp;&nbsp;
  425. <input type="radio" name="tags_type" id="tags_type1" value="1" <?Format::selected(
  426. 'tags_type',
  427. 1,
  428. 'checked'
  429. )?>
  430. /><label for="tags_type1"> All</label><br /><br />
  431. Use !tag to exclude tags
  432. </td>
  433. </tr>
  434. <!-- Order By -->
  435. <tr id="order">
  436. <td class="label">Order By</td>
  437. <td class="ft_order">
  438. <select name="order_by" style="width: auto;" class="ft_order_by" aria-label="Property to order by">
  439. <option value="time" <?Format::selected('order_by', 'time')?>>Time
  440. Added</option>
  441. <option value="year" <?Format::selected('order_by', 'year')?>>Year
  442. </option>
  443. <option value="size" <?Format::selected('order_by', 'size')?>>Size
  444. </option>
  445. <option value="snatched" <?Format::selected('order_by', 'snatched')?>>Snatched
  446. </option>
  447. <option value="seeders" <?Format::selected('order_by', 'seeders')?>>Seeders
  448. </option>
  449. <option value="leechers" <?Format::selected('order_by', 'leechers')?>>Leechers
  450. </option>
  451. <option value="cataloguenumber" <?Format::selected('order_by', 'cataloguenumber')?>>Accession
  452. Number</option>
  453. <option value="random" <?Format::selected('order_by', 'random')?>>Random
  454. </option>
  455. </select>
  456. <select name="order_way" class="ft_order_way" aria-label="Direction to order">
  457. <option value="desc" <?Format::selected('order_way', 'desc')?>>Descending
  458. </option>
  459. <option value="asc" <?Format::selected('order_way', 'asc')?>>Ascending
  460. </option>
  461. </select>
  462. </td>
  463. </tr>
  464. <!-- Use torrent groups? -->
  465. <tr id="search_group_results">
  466. <td class="label">
  467. <label for="group_results">Group Torrents</label>
  468. </td>
  469. <td class="ft_group_results">
  470. <input type="checkbox" value="1" name="group_results" id="group_results" <?=$GroupResults ? ' checked="checked"' : ''?>
  471. />
  472. </td>
  473. </tr>
  474. </table>
  475. <table class="layout cat_list ft_cat_list">
  476. <?php
  477. $x = 0;
  478. reset($Categories);
  479. foreach ($Categories as $CatKey => $CatName) {
  480. if ($x % 7 === 0) {
  481. if ($x > 0) {
  482. ?>
  483. </tr>
  484. <?php
  485. } ?>
  486. <tr>
  487. <?php
  488. }
  489. $x++; ?>
  490. <td>
  491. <input type="checkbox"
  492. name="filter_cat[<?=($CatKey + 1)?>]"
  493. id="cat_<?=($CatKey + 1)?>" value="1" <?php if (isset($_GET['filter_cat'][$CatKey + 1])) { ?>
  494. checked="checked"<?php } ?> />
  495. <label for="cat_<?=($CatKey + 1)?>"><?=$CatName?></label>
  496. </td>
  497. <?php
  498. } ?>
  499. </tr>
  500. </table>
  501. <table
  502. class="layout cat_list<?php if (empty($LoggedUser['ShowTags'])) { ?> hidden<?php } ?>"
  503. id="taglist">
  504. <tr>
  505. <?php
  506. $GenreTags = $Cache->get_value('genre_tags');
  507. if (!$GenreTags) {
  508. $DB->query('
  509. SELECT Name
  510. FROM tags
  511. WHERE TagType = \'genre\'
  512. ORDER BY Name');
  513. $GenreTags = $DB->collect('Name');
  514. $Cache->cache_value('genre_tags', $GenreTags, 3600 * 6);
  515. }
  516. $x = 0;
  517. foreach ($GenreTags as $Tag) {
  518. ?>
  519. <td><a href="#"
  520. onclick="add_tag('<?=$Tag?>'); return false;"><?=$Tag?></a></td>
  521. <?php
  522. $x++;
  523. if ($x % 7 === 0) {
  524. ?>
  525. </tr>
  526. <tr>
  527. <?php
  528. }
  529. }
  530. if ($x % 7 !== 0) { // Padding
  531. ?>
  532. <td colspan="<?=(7 - ($x % 7))?>"> </td>
  533. <?php } ?>
  534. </tr>
  535. </table>
  536. <!-- Categories -->
  537. <table class="layout cat_list">
  538. <tr>
  539. <td class="label">
  540. <a class="brackets" data-toggle-target="#taglist"
  541. data-toggle-replace="<?=(empty($LoggedUser['ShowTags']) ? 'Hide tags' : 'View tags')?>"><?=(empty($LoggedUser['ShowTags']) ? 'View tags' : 'Hide tags')?></a>
  542. </td>
  543. </tr>
  544. </table>
  545. <!-- Result count, submit, and reset -->
  546. <div class="submit ft_submit">
  547. <span class="float_left">
  548. <?=number_format($NumResults)?>
  549. Results
  550. </span>
  551. <input type="submit" value="Search" class="button-primary"/>
  552. <input type="hidden" name="action" id="ft_type"
  553. value="<?=($AdvancedSearch ? 'advanced' : 'basic')?>" />
  554. <input type="hidden" name="searchsubmit" value="1" />
  555. <input type="button" value="Reset" <input type="button" value="Reset"
  556. onclick="window.location.href = 'torrents.php<?php if (isset($_GET['action']) && $_GET['action'] === 'advanced') { ?>?action=advanced<?php } ?>'" />
  557. &emsp;
  558. <?php if ($Search->has_filters()) { ?>
  559. <input type="submit" name="setdefault" value="Make Default" />
  560. <?php }
  561. if (!empty($LoggedUser['DefaultSearch'])) { ?>
  562. <input type="submit" name="cleardefault" value="Clear Default" />
  563. <?php } ?>
  564. </div>
  565. </div>
  566. </div>
  567. </form>
  568. <!-- No results message -->
  569. <?php if ($NumResults === 0) { ?>
  570. <div class="torrents_nomatch box pad" align="center">
  571. <h2>Your search did not match anything</h2>
  572. <p>Make sure all names are spelled correctly, or try making your search less specific</p>
  573. </div>
  574. </div>
  575. <?php
  576. View::show_footer();
  577. die();
  578. }
  579. if ($NumResults < ($Page - 1) * TORRENTS_PER_PAGE + 1) {
  580. $LastPage = ceil($NumResults / TORRENTS_PER_PAGE);
  581. $Pages = Format::get_pages(0, $NumResults, TORRENTS_PER_PAGE); ?>
  582. <div class="torrents_nomatch box pad" align="center">
  583. <h2>The requested page contains no matches</h2>
  584. <p>You are requesting page <?=$Page?>, but the search returned only
  585. <?=number_format($LastPage) ?> pages
  586. </p>
  587. </div>
  588. <div class="linkbox">Go to page <?=$Pages?>
  589. </div>
  590. </div>
  591. <?php
  592. View::show_footer();
  593. error();
  594. }
  595. // List of pages
  596. $Pages = Format::get_pages($Page, $NumResults, TORRENTS_PER_PAGE);
  597. $Bookmarks = Bookmarks::all_bookmarks('torrent');
  598. ?>
  599. <div class="linkbox"><?=$Pages?>
  600. </div>
  601. <!-- Results table headings -->
  602. <table
  603. class="box torrent_table cats <?=$GroupResults ? 'grouping' : 'no_grouping'?>"
  604. id="torrent_table">
  605. <tr class="colhead">
  606. <?php if ($GroupResults) { ?>
  607. <td class="small"></td>
  608. <?php } ?>
  609. <td class="small cats_col"></td>
  610. <td>Name / <a
  611. href="<?=header_link('year')?>">Year</a>
  612. </td>
  613. <td>Files</td>
  614. <td><a
  615. href="<?=header_link('time')?>">Time</a>
  616. </td>
  617. <td><a
  618. href="<?=header_link('size')?>">Size</a>
  619. </td>
  620. <td class="sign snatches">
  621. <a href="<?=header_link('snatched')?>"
  622. aria-label="Sort by snatches">
  623. </a>
  624. </td>
  625. <td class="sign seeders">
  626. <a href="<?=header_link('seeders')?>"
  627. aria-label="Sort by seeders">
  628. &uarr;
  629. </a>
  630. </td>
  631. <td class="sign leechers">
  632. <a href="<?=header_link('leechers')?>"
  633. aria-label="Sort by leechers">
  634. &darr;
  635. </a>
  636. </td>
  637. </tr>
  638. <?php
  639. // Start printing torrent list
  640. foreach ($Results as $Key => $GroupID) {
  641. $GroupInfo = $Groups[$GroupID];
  642. if (empty($GroupInfo['Torrents'])) {
  643. continue;
  644. }
  645. $CategoryID = $GroupInfo['CategoryID'];
  646. $GroupYear = $GroupInfo['Year'];
  647. $Artists = $GroupInfo['Artists'];
  648. $GroupCatalogueNumber = $GroupInfo['CatalogueNumber'];
  649. $GroupStudio = $GroupInfo['Studio'];
  650. $GroupName = empty($GroupInfo['Name']) ? (empty($GroupInfo['Title2']) ? $GroupInfo['NameJP'] : $GroupInfo['Title2']) : $GroupInfo['Name'];
  651. $GroupTitle2 = $GroupInfo['Title2'];
  652. $GroupNameJP = $GroupInfo['NameJP'];
  653. if ($GroupResults) {
  654. $Torrents = $GroupInfo['Torrents'];
  655. $GroupTime = $MaxSize = $TotalLeechers = $TotalSeeders = $TotalSnatched = 0;
  656. foreach ($Torrents as $T) {
  657. $GroupTime = max($GroupTime, strtotime($T['Time']));
  658. $MaxSize = max($MaxSize, $T['Size']);
  659. $TotalLeechers += $T['Leechers'];
  660. $TotalSeeders += $T['Seeders'];
  661. $TotalSnatched += $T['Snatched'];
  662. }
  663. } else {
  664. $TorrentID = $Key;
  665. $Torrents = [$TorrentID => $GroupInfo['Torrents'][$TorrentID]];
  666. }
  667. $TorrentTags = new Tags($GroupInfo['TagList']);
  668. # Start making $DisplayName (first torrent result line)
  669. $DisplayName = '';
  670. /*
  671. if (isset($Artists)) {
  672. $DisplayName = '<div class="torrent_artists">'.Artists::display_artists($Artists).'</div> ';
  673. } else {
  674. $DisplayName = '';
  675. }
  676. */
  677. $SnatchedGroupClass = $GroupInfo['Flags']['IsSnatched'] ? ' snatched_group' : '';
  678. # Similar to the logic down the page, and on
  679. # torrents.class.php and sections/artist/artist.php
  680. if ($GroupResults && (count($Torrents) > 1 && isset($GroupedCategories[$CategoryID - 1]))) {
  681. // These torrents are in a group
  682. $CoverArt = $GroupInfo['WikiImage'];
  683. $DisplayName .= "<a class='torrent_title' href='torrents.php?id=$GroupID' ";
  684. # No cover art
  685. if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
  686. $DisplayName .= 'data-cover="'.ImageTools::process($CoverArt, 'thumb').'" ';
  687. }
  688. # Japanese
  689. $DisplayName .= "dir='ltr'>$GroupName</a>";
  690. # Year
  691. if ($GroupYear) {
  692. $Label = '<br />📅&nbsp;';
  693. $DisplayName .= $Label."<a href='torrents.php?".Format::get_url($_GET)."&year=$GroupYear'>$GroupYear</a>";
  694. }
  695. # Studio
  696. if ($GroupStudio) {
  697. $Label = '&ensp;📍&nbsp;';
  698. $DisplayName .= $Label."<a href='torrents.php?".Format::get_url($_GET)."&location=$GroupStudio'>$GroupStudio</a>";
  699. }
  700. # Catalogue Number
  701. if ($GroupCatalogueNumber) {
  702. $Label = '&ensp;🔑&nbsp;';
  703. $DisplayName .= $Label."<a href='torrents.php?".Format::get_url($_GET)."&numbers=$GroupCatalogueNumber'>$GroupCatalogueNumber</a>";
  704. }
  705. # Organism
  706. if ($GroupTitle2) {
  707. $Label = '&ensp;🦠&nbsp;';
  708. $DisplayName .= $Label."<a href='torrents.php?".Format::get_url($_GET)."&advgroupname=$GroupTitle2'><em>$GroupTitle2</em></a>";
  709. }
  710. # Strain/Variety
  711. if ($GroupNameJP) {
  712. $Label = '&nbsp;';
  713. $DisplayName .= $Label."<a href='torrents.php?".Format::get_url($_GET)."&advgroupname=$GroupNameJP'>$GroupNameJP</a>";
  714. }
  715. # Authors
  716. if (isset($Artists)) {
  717. # Emoji in classes/astists.class.php
  718. $Label = '&ensp;';
  719. $DisplayName .= $Label.'<div class="torrent_artists">'.Artists::display_artists($Artists).'</div>';
  720. } ?>
  721. <tr class="group<?=$SnatchedGroupClass?>">
  722. <?php
  723. $ShowGroups = !(!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] === 1); ?>
  724. <td class="center">
  725. <div id="showimg_<?=$GroupID?>"
  726. class="<?=($ShowGroups ? 'hide' : 'show')?>_torrents">
  727. <a class="tooltip show_torrents_link"
  728. onclick="toggle_group(<?=$GroupID?>, this, event)"
  729. title="Toggle this group (Hold &quot;Shift&quot; to toggle all groups)"></a>
  730. </div>
  731. </td>
  732. <!-- Category icon -->
  733. <td class="center cats_col">
  734. <div title="<?=Format::pretty_category($CategoryID)?>"
  735. class="tooltip <?=Format::css_category($CategoryID)?>">
  736. </div>
  737. </td>
  738. <!-- [ DL | RP ] and [Bookmark] -->
  739. <td colspan="2" class="big_info">
  740. <div class="group_info clear">
  741. <?=$DisplayName?>
  742. <?php if (in_array($GroupID, $Bookmarks)) { ?>
  743. <span class="remove_bookmark float_right">
  744. <a href="#" id="bookmarklink_torrent_<?=$GroupID?>"
  745. class="brackets"
  746. onclick="Unbookmark('torrent', <?=$GroupID?>, 'Bookmark'); return false;">Remove
  747. bookmark</a>
  748. </span>
  749. <?php } else { ?>
  750. <span class="add_bookmark float_right">
  751. <a href="#" id="bookmarklink_torrent_<?=$GroupID?>"
  752. class="brackets"
  753. onclick="Bookmark('torrent', <?=$GroupID?>, 'Remove bookmark'); return false;">Bookmark</a>
  754. </span>
  755. <?php } ?>
  756. <br />
  757. <!-- Tags -->
  758. <div class="tags"><?=$TorrentTags->format('torrents.php?'.$Action.'&amp;taglist=')?>
  759. </div>
  760. </div>
  761. </td>
  762. <!-- Time -->
  763. <td class="nobr"><?=time_diff($GroupTime, 1)?>
  764. </td>
  765. <!-- Size -->
  766. <td class="number_column nobr"><?=Format::get_size($MaxSize)?>(Max)</td>
  767. <!-- Snatches, seeders, and leechers -->
  768. <td class="number_column"><?=number_format($TotalSnatched)?>
  769. </td>
  770. <td
  771. class="number_column<?=($TotalSeeders === 0 ? ' r00' : '')?>">
  772. <?=number_format($TotalSeeders)?>
  773. </td>
  774. <td class="number_column"><?=number_format($TotalLeechers)?>
  775. </td>
  776. </tr>
  777. <?php
  778. foreach ($Torrents as $TorrentID => $Data) {
  779. $Data['CategoryID'] = $CategoryID;
  780. // All of the individual torrents in the group
  781. // Get report info for each torrent, use the cache if available, if not, add to it
  782. $Reported = false;
  783. $Reports = Torrents::get_reports($TorrentID);
  784. if (count($Reports) > 0) {
  785. $Reported = true;
  786. }
  787. $SnatchedTorrentClass = $Data['IsSnatched'] ? ' snatched_torrent' : '';
  788. $TorrentDL = "torrents.php?action=download&amp;id=".$TorrentID."&amp;authkey=".$LoggedUser['AuthKey']."&amp;torrent_pass=".$LoggedUser['torrent_pass'];
  789. if (!($TorrentFileName = $Cache->get_value('torrent_file_name_'.$TorrentID))) {
  790. $TorrentFile = file_get_contents(TORRENT_STORE.$TorrentID.'.torrent');
  791. $Tor = new BencodeTorrent($TorrentFile, false, false);
  792. $TorrentFileName = $Tor->Dec['info']['name'];
  793. $Cache->cache_value('torrent_file_name_'.$TorrentID, $TorrentFileName);
  794. } ?>
  795. <tr
  796. class="group_torrent groupid_<?=$GroupID?> <?=$SnatchedTorrentClass . $SnatchedGroupClass . (!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] === 1 ? ' hidden' : '')?>">
  797. <td colspan="3">
  798. <span>
  799. [ <a href="<?=$TorrentDL?>" class="tooltip"
  800. title="Download"><?=$Data['HasFile'] ? 'DL' : 'Missing'?></a>
  801. <?php
  802. if (Torrents::can_use_token($Data)) { ?>
  803. | <a
  804. href="torrents.php?action=download&amp;id=<?=$TorrentID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>&amp;usetoken=1"
  805. class="tooltip" title="Use a FL Token"
  806. onclick="return confirm('Are you sure you want to use a freeleech token here?');">FL</a>
  807. <?php } ?>
  808. | <a
  809. href="reportsv2.php?action=report&amp;id=<?=$TorrentID?>"
  810. class="tooltip" title="Report">RP</a> ]
  811. </span>
  812. <a href="torrents.php?id=<?=$GroupID?>&amp;torrentid=<?=$TorrentID?>#torrent<?=$TorrentID?>"
  813. class="torrent_label tl_reported tooltip search_link"><strong>Details</strong></a>
  814. | <?=Torrents::torrent_info($Data)?>
  815. <?php if ($Reported) { ?>
  816. | <strong class="torrent_label tl_reported tooltip search_link important_text"
  817. title="Type: <?=ucfirst($Reports[0]['Type'])?><br>
  818. Comment: <?=htmlentities(htmlentities($Reports[0]['UserComment']))?>">Reported</strong><?php } ?>
  819. </td>
  820. <td class="number_column"><?=$Data['FileCount']?>
  821. </td>
  822. <td class="nobr"><?=time_diff($Data['Time'], 1)?>
  823. </td>
  824. <td class="number_column nobr"><?=Format::get_size($Data['Size'])?>
  825. </td>
  826. <td class="number_column"><?=number_format($Data['Snatched'])?>
  827. </td>
  828. <td
  829. class="number_column<?=($Data['Seeders'] === 0) ? ' r00' : ''?>">
  830. <?=number_format($Data['Seeders'])?>
  831. </td>
  832. <td class="number_column"><?=number_format($Data['Leechers'])?>
  833. </td>
  834. </tr>
  835. <?php
  836. }
  837. } else {
  838. // Viewing a type that does not require grouping
  839. $TorrentID = key($Torrents);
  840. $Data = current($Torrents);
  841. $Reported = false;
  842. $Reports = Torrents::get_reports($TorrentID);
  843. if (count($Reports) > 0) {
  844. $Reported = true;
  845. }
  846. # Main search result title link
  847. # These are the main torrent search results
  848. $Data['CategoryID'] = $CategoryID;
  849. $CoverArt = $GroupInfo['WikiImage'];
  850. $DisplayName .= "<a class='torrent_title' href='torrents.php?id=$GroupID&amp;torrentid=$TorrentID' ";
  851. if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
  852. $DisplayName .= 'data-cover="'.ImageTools::process($CoverArt, 'thumb').'" ';
  853. }
  854. # Japanese
  855. $DisplayName .= "dir='ltr'>$GroupName</a>";
  856. if (isset($GroupedCategories[$CategoryID - 1])) {
  857. # Year
  858. # Sh!t h4x; Year is mandatory
  859. if ($GroupYear) {
  860. $Label = '<br />📅&nbsp;';
  861. $DisplayName .= $Label."<a href='torrents.php?".Format::get_url($_GET)."&year=$GroupYear'>$GroupYear</a>";
  862. }
  863. # Studio
  864. if ($GroupStudio) {
  865. $DisplayName .= "&nbsp;&nbsp;📍&nbsp;<a href='torrents.php?".Format::get_url($_GET)."&location=$GroupStudio'>$GroupStudio</a>";
  866. }
  867. # Catalogue Number
  868. if ($GroupCatalogueNumber) {
  869. $Label = '&ensp;🔑&nbsp;';
  870. $DisplayName .= $Label."<a href='torrents.php?".Format::get_url($_GET)."&numbers=$GroupCatalogueNumber'>$GroupCatalogueNumber</a>";
  871. }
  872. # Organism
  873. if ($GroupTitle2) {
  874. $Label = '&ensp;🦠&nbsp;';
  875. $DisplayName .= $Label."<a href='torrents.php?".Format::get_url($_GET)."&advgroupname=$GroupTitle2'><em>$GroupTitle2</em></a>";
  876. }
  877. # Strain/Variety
  878. if ($GroupNameJP) {
  879. $Label = '&nbsp;';
  880. $DisplayName .= $Label."<a href='torrents.php?".Format::get_url($_GET)."&advgroupname=$GroupNameJP'>$GroupNameJP</a>";
  881. }
  882. # Authors
  883. if (isset($Artists)) {
  884. # Emoji in classes/astists.class.php
  885. $Label = '&ensp;';
  886. $DisplayName .= $Label.'<div class="torrent_artists">'.Artists::display_artists($Artists).'</div>';
  887. }
  888. $ExtraInfo = Torrents::torrent_info($Data, true, true);
  889. } elseif ($Data['IsSnatched']) {
  890. $ExtraInfo = Format::torrent_label('Snatched!');
  891. } else {
  892. $ExtraInfo = '';
  893. }
  894. $SnatchedTorrentClass = $Data['IsSnatched'] ? ' snatched_torrent' : '';
  895. $TorrentDL = "torrents.php?action=download&amp;id=".$TorrentID."&amp;authkey=".$LoggedUser['AuthKey']."&amp;torrent_pass=".$LoggedUser['torrent_pass'];
  896. if (!($TorrentFileName = $Cache->get_value('torrent_file_name_'.$TorrentID))) {
  897. $TorrentFile = file_get_contents(TORRENT_STORE.$TorrentID.'.torrent');
  898. $Tor = new BencodeTorrent($TorrentFile, false, false);
  899. $TorrentFileName = $Tor->Dec['info']['name'];
  900. $Cache->cache_value('torrent_file_name_'.$TorrentID, $TorrentFileName);
  901. } ?>
  902. <tr
  903. class="torrent<?=$SnatchedTorrentClass . $SnatchedGroupClass?>">
  904. <?php if ($GroupResults) { ?>
  905. <td></td>
  906. <?php } ?>
  907. <td class="center cats_col">
  908. <div title="<?=Format::pretty_category($CategoryID)?>"
  909. class="tooltip <?=Format::css_category($CategoryID)?>"></div>
  910. </td>
  911. <td class="big_info">
  912. <div class="group_info clear">
  913. <div class="float_right">
  914. <span>
  915. [ <a href="<?=$TorrentDL?>" class="tooltip"
  916. title="Download">DL</a>
  917. <?php
  918. if (Torrents::can_use_token($Data)) { ?>
  919. | <a
  920. href="torrents.php?action=download&amp;id=<?=$TorrentID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>&amp;usetoken=1"
  921. class="tooltip" title="Use a FL Token"
  922. onclick="return confirm('Are you sure you want to use a freeleech token here?');">FL</a>
  923. <?php } ?>
  924. | <a
  925. href="reportsv2.php?action=report&amp;id=<?=$TorrentID?>"
  926. class="tooltip" title="Report">RP</a> ]
  927. </span>
  928. <br />
  929. <?php if (in_array($GroupID, $Bookmarks)) { ?>
  930. <span class="remove_bookmark float_right">
  931. <a href="#" id="bookmarklink_torrent_<?=$GroupID?>"
  932. class="brackets"
  933. onclick="Unbookmark('torrent', <?=$GroupID?>, 'Bookmark'); return false;">Remove
  934. bookmark</a>
  935. </span>
  936. <?php } else { ?>
  937. <span class="add_bookmark float_right">
  938. <a href="#" id="bookmarklink_torrent_<?=$GroupID?>"
  939. class="brackets"
  940. onclick="Bookmark('torrent', <?=$GroupID?>, 'Remove bookmark'); return false;">Bookmark</a>
  941. </span>
  942. <?php } ?>
  943. </div>
  944. <?=$DisplayName?>
  945. <br />
  946. <div style="display: inline;" class="torrent_info"><?=$ExtraInfo?><?php if ($Reported) { ?>
  947. / <strong class="torrent_label tl_reported tooltip important_text"
  948. title="Type: <?=ucfirst($Reports[0]['Type'])?><br>Comment: <?=htmlentities(htmlentities($Reports[0]['UserComment']))?>">Reported</strong><?php } ?>
  949. </div>
  950. <div class="tags"><?=$TorrentTags->format("torrents.php?$Action&amp;taglist=")?>
  951. </div>
  952. </div>
  953. </td>
  954. <td class="number_column"><?=$Data['FileCount']?>
  955. </td>
  956. <td class="nobr"><?=time_diff($Data['Time'], 1)?>
  957. </td>
  958. <td class="number_column nobr"><?=Format::get_size($Data['Size'])?>
  959. </td>
  960. <td class="number_column"><?=number_format($Data['Snatched'])?>
  961. </td>
  962. <td
  963. class="number_column<?=($Data['Seeders'] === 0) ? ' r00' : ''?>">
  964. <?=number_format($Data['Seeders'])?>
  965. </td>
  966. <td class="number_column"><?=number_format($Data['Leechers'])?>
  967. </td>
  968. </tr>
  969. <?php
  970. }
  971. }
  972. ?>
  973. </table>
  974. <div class="linkbox"><?=$Pages?>
  975. </div>
  976. </div>
  977. <?php
  978. View::show_footer();