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

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