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.

torrent_form.class.php 21KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665
  1. <?php
  2. // This class is used in upload.php to display the upload form, and the edit
  3. // section of torrents.php to display a shortened version of the same form
  4. class TorrentForm
  5. {
  6. public $UploadForm = '';
  7. public $Categories = [];
  8. #var $Formats = [];
  9. #var $Bitrates = [];
  10. public $Media = [];
  11. public $MediaManga = [];
  12. public $Containers = [];
  13. public $ContainersGames = [];
  14. public $Codecs = [];
  15. public $Resolutions = [];
  16. #var $AudioFormats = [];
  17. #var $Subbing = [];
  18. #var $Languages = [];
  19. #var $Platform = [];
  20. public $NewTorrent = false;
  21. public $Torrent = [];
  22. public $Error = false;
  23. public $TorrentID = false;
  24. public $Disabled = '';
  25. public $DisabledFlag = false;
  26. public function __construct($Torrent = false, $Error = false, $NewTorrent = true)
  27. {
  28. $this->NewTorrent = $NewTorrent;
  29. $this->Torrent = $Torrent;
  30. $this->Error = $Error;
  31. global $UploadForm, $Categories, $Media, $MediaManga, $TorrentID, $Containers, $ContainersGames, $Codecs, $Resolutions, $Archives;
  32. #global $UploadForm, $Categories, $Formats, $Bitrates, $Media, $MediaManga, $TorrentID, $Containers, $ContainersGames, $Codecs, $Resolutions, $AudioFormats, $Subbing, $Languages, $Platform, $Archives, $ArchivesManga;
  33. $this->UploadForm = $UploadForm;
  34. $this->Categories = $Categories;
  35. #$this->Formats = $Formats;
  36. #$this->Bitrates = $Bitrates;
  37. $this->Media = $Media;
  38. $this->MediaManga = $MediaManga;
  39. $this->Containers = $Containers;
  40. $this->ContainersGames = $ContainersGames;
  41. $this->Codecs = $Codecs;
  42. $this->Resolutions = $Resolutions;
  43. #$this->AudioFormats = $AudioFormats;
  44. #$this->Subbing = $Subbing;
  45. #$this->Languages = $Languages;
  46. $this->TorrentID = $TorrentID;
  47. #$this->Platform = $Platform;
  48. $this->Archives = $Archives;
  49. #$this->ArchivesManga = $ArchivesManga;
  50. if ($this->Torrent && $this->Torrent['GroupID']) {
  51. $this->Disabled = ' readonly="readonly"';
  52. $this->DisabledFlag = true;
  53. }
  54. }
  55. public function head()
  56. {
  57. G::$DB->query("
  58. SELECT COUNT(ID)
  59. FROM torrents
  60. WHERE UserID = ?", G::$LoggedUser['ID']);
  61. list($Uploads) = G::$DB->next_record(); ?>
  62. <!-- Everything until the catalogue number field-->
  63. <div class="thin">
  64. <?php if ($this->NewTorrent) { ?>
  65. <p style="text-align: center;">
  66. If you would like to use your own torrent file, add the following to it.
  67. Otherwise, add none of it and redownload the torrent file after uploading it.
  68. All of the above data will be added to it by the site.
  69. <strong>If you never have before, be sure to read this list of
  70. <a href="wiki.php?action=article&name=uploadingpitfalls">uploading pitfalls</a></strong>.
  71. </p>
  72. <p style="text-align: center;">
  73. <?php
  74. $Announces = call_user_func_array('array_merge', ANNOUNCE_URLS);
  75. foreach ($Announces as $Announce) {
  76. # Loop through tracker URLs?>
  77. <strong>Announce</strong>
  78. <?php
  79. # Buying into the shit coding style
  80. # Just trying to mirror content on a Tier 2 public tracker
  81. if (!strstr($Announce, 'openbittorrent')) {
  82. ?>
  83. <input type="text"
  84. value="<?= $Announce . '/' . G::$LoggedUser['torrent_pass'] . '/announce' ?>"
  85. size="74" onclick="this.select();" readonly="readonly" /> <br />
  86. <?php
  87. } else { ?>
  88. <input type="text" value="<?= $Announce ?>" size="74"
  89. onclick="this.select();" readonly="readonly" /> <br />
  90. <?php
  91. }
  92. } ?>
  93. <strong>Source</strong>
  94. <input type="text" value="<?= Users::get_upload_sources()[0] ?>"
  95. size="20" onclick="this.select();" readonly="readonly" />
  96. </p>
  97. <!-- Error display -->
  98. <p style="text-align: center;">
  99. <?php
  100. }
  101. if ($this->Error) {
  102. echo "\t".'<p style="color: red; text-align: center;">' . $this->Error . "</p>\n";
  103. } ?>
  104. </p>
  105. <!-- Torrent form hidden values -->
  106. <form class="create_form box pad" name="torrent" action="" enctype="multipart/form-data" method="post"
  107. onsubmit="$('#post').raw().disabled = 'disabled';">
  108. <div>
  109. <input type="hidden" name="submit" value="true" />
  110. <input type="hidden" name="auth"
  111. value="<?=G::$LoggedUser['AuthKey']?>" />
  112. <?php if (!$this->NewTorrent) { ?>
  113. <input type="hidden" name="action" value="takeedit" />
  114. <input type="hidden" name="torrentid"
  115. value="<?=display_str($this->TorrentID)?>" />
  116. <input type="hidden" name="type"
  117. value="<?=display_str($this->Torrent['CategoryID']-1)?>" />
  118. <?php
  119. } else {
  120. if ($this->Torrent && $this->Torrent['GroupID']) {
  121. # Find groups and requests
  122. ?>
  123. <input type="hidden" name="groupid"
  124. value="<?= display_str($this->Torrent['GroupID']) ?>" />
  125. <input type="hidden" name="type"
  126. value="<?= display_str($this->Torrent['CategoryID']-1) ?>" />
  127. <?php
  128. }
  129. if ($this->Torrent && ($this->Torrent['RequestID'] ?? false)) {
  130. ?>
  131. <input type="hidden" name="requestid"
  132. value="<?=display_str($this->Torrent['RequestID'])?>" />
  133. <?php
  134. }
  135. } ?>
  136. </div>
  137. <!-- New torrent options: file and category -->
  138. <?php if ($this->NewTorrent) { ?>
  139. <table cellpadding="3" cellspacing="1" border="0" class="layout" width="100%">
  140. <tr>
  141. <td class="label">Torrent File</td>
  142. <td><input id="file" type="file" name="file_input" size="50" /><br />
  143. Use the above announce URL and set the private flag in your BitTorrent client, e.g.,
  144. <code>mktorrent -p -a &lt;announce&gt; &lt;target folder&gt;</code>
  145. </td>
  146. </tr>
  147. <tr>
  148. <td class="label">Type</td>
  149. <td>
  150. <select id="categories" name="type" onchange="Categories()" <?= ($this->DisabledFlag) ? ' disabled="disabled"' : '' ?>>
  151. <?php
  152. foreach (Misc::display_array($this->Categories) as $Index => $Cat) {
  153. echo "\t\t\t\t\t\t<option value=\"$Index\"";
  154. if ($Cat == $this->Torrent['CategoryName']) {
  155. echo ' selected="selected"';
  156. }
  157. echo ">$Cat</option>\n";
  158. }
  159. ?>
  160. </select><br />
  161. What alphabet the sequence uses, n.b., plasmids fit in the Other category
  162. </td>
  163. </tr>
  164. </table>
  165. <!-- Start the dynamic form -->
  166. <?php } # if?>
  167. <div id="dynamic_form">
  168. <?php
  169. }
  170. public function foot()
  171. {
  172. $Torrent = $this->Torrent; ?>
  173. </div>
  174. <!-- Freeleech type -->
  175. <table cellpadding="3" cellspacing="1" border="0" class="layout slice" width="100%">
  176. <?php
  177. if (!$this->NewTorrent) {
  178. if (check_perms('torrents_freeleech')) {
  179. ?>
  180. <tr id="freetorrent">
  181. <td class="label">Freeleech</td>
  182. <td>
  183. <select name="freeleech">
  184. <?php
  185. $FL = array("Normal", "Free", "Neutral");
  186. foreach ($FL as $Key => $Name) {
  187. # Cycle types
  188. ?>
  189. <option value="<?= $Key ?>" <?= ($Key === $Torrent['FreeTorrent'] ? ' selected="selected"' : '') ?>><?= $Name ?>
  190. </option>
  191. <?php
  192. } ?>
  193. </select>
  194. because
  195. <select name="freeleechtype">
  196. <?php
  197. $FL = array("N/A", "Staff Pick", "Perma-FL", "Freeleechizer", "Site-Wide FL");
  198. foreach ($FL as $Key => $Name) {
  199. # Cycle reasons
  200. ?>
  201. <option value="<?=$Key?>" <?= ($Key === $Torrent['FreeLeechType'] ? ' selected="selected"' : '') ?>><?= $Name ?>
  202. </option>
  203. <?php
  204. } ?>
  205. </select>
  206. </td>
  207. </tr>
  208. <?php
  209. }
  210. } ?>
  211. <!-- Rules notice and submit button -->
  212. <tr>
  213. <td colspan="2" style="text-align: center;">
  214. <p>
  215. Be sure that your torrent is approved by the <a href="rules.php?p=upload" target="_blank">rules</a>.
  216. Not doing this will result in a <strong class="important_text">warning</strong> or <strong
  217. class="important_text">worse</strong>.
  218. </p>
  219. <?php if ($this->NewTorrent) { ?>
  220. <p>
  221. After uploading the torrent, you will have a one hour grace period during which no one other than you can
  222. fill requests with this torrent.
  223. Make use of this time wisely, and <a href="requests.php">search the list of requests</a>.
  224. </p>
  225. <?php } ?>
  226. <input id="post" type="submit" <?php
  227. if ($this->NewTorrent) {
  228. echo ' value="Upload"';
  229. } else {
  230. echo ' value="Edit"';
  231. } ?>
  232. />
  233. </td>
  234. </tr>
  235. </table>
  236. </form>
  237. </div>
  238. <!-- Okay, finally the real form -->
  239. <?php
  240. } # End
  241. public function upload_form()
  242. {
  243. $QueryID = G::$DB->get_query_id();
  244. $this->head();
  245. $Torrent = $this->Torrent; ?>
  246. <!-- Catalogue number field -->
  247. <table cellpadding="3" cellspacing="1" border="0" class="layout slice" width="100%">
  248. <?php if ($this->NewTorrent) { ?>
  249. <tr id="javdb_tr">
  250. <td class="label tooltip" title="">Accession Number</td>
  251. <td>
  252. <input type="text" id="catalogue" name="catalogue" size="10"
  253. value="<?= display_str($Torrent['CatalogueNumber']) ?>"
  254. <?= $this->Disabled ?>/>
  255. <?php if (!$this->DisabledFlag) { ?>
  256. <input type="button" autofill="jav" value="Autofill">
  257. </input>
  258. <em>Coming Soon!</em><br />
  259. <!-- Autofill only supports RefSeq and UniProt; -->
  260. Enter any ID number that corresponds to the data,
  261. preferring RefSeq and UniProt
  262. <?php } ?>
  263. </td>
  264. </tr>
  265. <!-- Other autofill options -->
  266. <tr id="anidb_tr" class="hidden">
  267. <td class="label">AniDB Autofill (optional)</td>
  268. <td>
  269. <input type="text" id="anidb" size="10" <?= $this->Disabled ?>/>
  270. <?php if (!$this->DisabledFlag) { ?>
  271. <input type="button" autofill="anime" value="Autofill" />
  272. <?php } ?>
  273. </td>
  274. </tr>
  275. <tr id="ehentai_tr" class="hidden">
  276. <td class="label">e-hentai URL (optional)</td>
  277. <td>
  278. <input type="text" id="catalogue" size="50" <?= $this->Disabled ?> />
  279. <?php if (!$this->DisabledFlag) { ?>
  280. <input type="button" autofill="douj" value="Autofill" />
  281. <?php } ?>
  282. </td>
  283. </tr>
  284. <!-- Three title fields -->
  285. <tr id="title_tr">
  286. <td class="label">Torrent Title</td>
  287. <td>
  288. <input type="text" id="title" name="title" size="60"
  289. value="<?= display_str($Torrent['Title']) ?>"
  290. <?= $this->Disabled ?>/><br />
  291. Definition line, e.g., Alcohol dehydrogenase ADH1
  292. </td>
  293. </tr>
  294. <tr id="title_rj_tr">
  295. <td class="label" title="">Organism</td>
  296. <td>
  297. <input type="text" id="title_rj" name="title_rj" size="60"
  298. value="<?= display_str($Torrent['TitleRJ']) ?>"
  299. <?= $this->Disabled ?>/><br />
  300. Organism line binomial, e.g., <em>Saccharomyces cerevisiae</em>
  301. </td>
  302. </tr>
  303. <tr id="title_jp_tr">
  304. <td class="label">Strain/Variety</td>
  305. <td>
  306. <input type="text" id="title_jp" name="title_jp" size="60"
  307. value="<?= display_str($Torrent['TitleJP']) ?>"
  308. <?= $this->Disabled ?>/><br />
  309. Organism line if any, e.g., S288C
  310. </td>
  311. </tr>
  312. <!-- Multiple artists -->
  313. <tr id="idols_tr">
  314. <td class="label tooltip" title="">Authors(s)</td>
  315. <td id="idolfields">
  316. One per field, e.g., Robert K. Mortimer [+] David Schild<br />
  317. <?php
  318. if (!empty($Torrent['Artists'])) {
  319. foreach ($Torrent['Artists'] as $Num => $Artist) {
  320. ?>
  321. <input type="text" id="idols_<?= $Num ?>" name="idols[]"
  322. size="45"
  323. value="<?= display_str($Artist['name']) ?>"
  324. <?= $this->Disabled ?>/>
  325. <?php if ($Num === 0) { ?>
  326. <a class="add_artist_button brackets">+</a>
  327. <a class="remove_artist_button brackets">&minus;</a>
  328. <?php
  329. }
  330. }
  331. } else {
  332. ?>
  333. <input type="text" id="idols_0" name="idols[]" size="45" value="" <?= $this->Disabled ?> />
  334. <a class="add_artist_button brackets">+</a>
  335. <a class="remove_artist_button brackets">&minus;</a>
  336. <?php
  337. } ?>
  338. </td>
  339. </tr>
  340. <!-- Production studio -->
  341. <tr id="studio_tr">
  342. <td class="label">Department/Lab</td>
  343. <td>
  344. <input type="text" id="studio" name="studio" size="60"
  345. value="<?= display_str($Torrent['Studio']) ?>"
  346. <?= $this->Disabled ?>/><br />
  347. Last author's institution, e.g., Lawrence Berkeley Laboratory
  348. </td>
  349. </tr>
  350. <!-- Location -->
  351. <tr id="series_tr">
  352. <td class="label">Location</td>
  353. <td>
  354. <input type="text" id="series" name="series" size="60"
  355. value="<?= display_str($Torrent['Series']) ?>"
  356. <?= $this->Disabled ?>/><br />
  357. Physical location, e.g., Berkeley, CA 94720
  358. </td>
  359. </tr>
  360. <!-- Year -->
  361. <tr id="year_tr">
  362. <td class="label">Year</td>
  363. <td>
  364. <input type="text" id="year" name="year" maxlength="4" size="5"
  365. value="<?= display_str($Torrent['Year']) ?>"
  366. <?= $this->Disabled ?>/><br />
  367. Original publication year
  368. </td>
  369. </tr>
  370. <!-- Media type -->
  371. <?php } # Ends if NewTorrent line 256?>
  372. <tr id="media_tr">
  373. <td class="label">Platform</td>
  374. <td>
  375. <select name="media">
  376. <option>---</option>
  377. <?php
  378. foreach ($this->Media as $Media) {
  379. echo "\t\t\t\t\t\t<option value=\"$Media\"";
  380. if ($Media == ($Torrent['Media'] ?? false)) {
  381. echo " selected";
  382. }
  383. echo ">$Media</option>\n";
  384. } ?>
  385. </select><br />
  386. Class of technology used
  387. </td>
  388. </tr>
  389. <!-- Alternate media -->
  390. <tr id="media_manga_tr">
  391. <td class="label">Platform</td>
  392. <td>
  393. <select name="media">
  394. <option>---</option>
  395. <?php
  396. foreach ($this->MediaManga as $Media) {
  397. echo "\t\t\t\t\t\t<option value=\"$Media\"";
  398. if ($Media === ($Torrent['Media'] ?? false)) {
  399. echo " selected";
  400. }
  401. echo ">$Media</option>\n";
  402. } ?>
  403. </select><br />
  404. Class of technology used
  405. </td>
  406. </tr>
  407. <!-- Container -->
  408. <tr id="container_tr">
  409. <td class="label">Format</td>
  410. <td>
  411. <select name="container">
  412. <option>---</option>
  413. <?php
  414. foreach ($this->Containers as $Cont) {
  415. echo "\t\t\t\t\t\t<option value=\"$Cont\"";
  416. if ($Cont === ($Torrent['Container'] ?? false)) {
  417. echo " selected";
  418. }
  419. echo ">$Cont</option>\n";
  420. } ?>
  421. </select><br />
  422. Data file format
  423. </td>
  424. </tr>
  425. <!-- Alternate container -->
  426. <tr id="container_games_tr">
  427. <td class="label">Format</td>
  428. <td>
  429. <select id="container" name="container">
  430. <option>---</option>
  431. <?php
  432. foreach ($this->ContainersGames as $Container) {
  433. echo "\t\t\t\t\t\t<option value=\"$Container\"";
  434. if ($Container === ($Torrent['Container'] ?? false)) {
  435. echo " selected";
  436. }
  437. echo ">$Container</option>\n";
  438. } ?>
  439. </select><br />
  440. Data file format
  441. </td>
  442. </tr>
  443. <!-- Resolution -->
  444. <tr id="resolution_tr">
  445. <td class="label">Assembly Level</td>
  446. <td>
  447. <select id="ressel" name="ressel" onchange="SetResolution()">
  448. <option value="">---</option>
  449. <?php
  450. foreach ($this->Resolutions as $Res) {
  451. echo "\t\t\t\t\t\t<option value=\"$Res\"";
  452. if ($Res === ($Torrent['Resolution'] ?? false)
  453. || (!isset($FoundRes) && ($Torrent['Resolution'] ?? false)
  454. && $Res === 'Other')) {
  455. echo " selected";
  456. $FoundRes = true;
  457. }
  458. echo ">$Res</option>\n";
  459. } ?>
  460. </select>
  461. <input type="text" id="resolution" name="resolution" size="10" class="hidden"
  462. value="<?= ($Torrent['Resolution']??'') ?>"
  463. readonly>
  464. </input>
  465. <script>
  466. if ($('#ressel').raw().value == "Other") {
  467. $('#resolution').raw().readOnly = false
  468. $('#resolution').gshow()
  469. }
  470. </script><br />
  471. How complete the data is
  472. </td>
  473. </tr>
  474. <!-- Compression -->
  475. <tr id="archive_tr">
  476. <td class="label">Archive</td>
  477. <td>
  478. <select name='archive'>
  479. <option>---</option>
  480. <?php
  481. foreach ($this->Archives as $Archive) {
  482. echo "\t\t\t\t\t\t<option value=\"$Archive\"";
  483. if ($Archive === ($Torrent['Archive'] ?? false)) {
  484. echo ' selected';
  485. }
  486. echo ">$Archive</option>\n";
  487. } ?>
  488. </select><br />
  489. Compression algorithm
  490. </td>
  491. </tr>
  492. <!-- Encoding -->
  493. <tr id="codec_tr">
  494. <td class="label">License</td>
  495. <td>
  496. <select name="codec">
  497. <option>---</option>
  498. <?php
  499. foreach ($this->Codecs as $Codec) {
  500. echo "\t\t\t\t\t\t<option value=\"$Codec\"";
  501. if ($Codec === ($Torrent['Codec'] ?? false)) {
  502. echo " selected";
  503. }
  504. echo ">$Codec</option>\n";
  505. } ?>
  506. </select><br />
  507. Please see <a href="http://www.dcc.ac.uk/resources/how-guides/license-research-data" target="_blank">How to
  508. License Research Data</a>
  509. </td>
  510. </tr>
  511. <!-- Tags -->
  512. <?php if ($this->NewTorrent) { ?>
  513. <tr id="tags_tr">
  514. <td class="label">Tags</td>
  515. <td>
  516. <?php
  517. $GenreTags = G::$Cache->get_value('genre_tags');
  518. if (!$GenreTags) {
  519. $DB->query("
  520. SELECT Name
  521. FROM tags
  522. WHERE TagType = 'genre'
  523. ORDER BY Name");
  524. $GenreTags = $DB->collect('Name');
  525. G::$Cache->cache_value('genre_tags', $GenreTags, 3600*6);
  526. }
  527. ?>
  528. <select id="genre_tags" name="genre_tags" onchange="add_tag(); return false;" <?= ($this->DisabledFlag) ? ' disabled="disabled"' : '' ?>>
  529. <option>---</option>
  530. <?php foreach (Misc::display_array($GenreTags) as $Genre) { ?>
  531. <option value="<?= $Genre ?>"><?= $Genre ?>
  532. </option>
  533. <?php } ?>
  534. </select>
  535. <input type="text" id="tags" name="tags" size="60"
  536. value="<?= display_str(implode(', ', explode(',', $Torrent['TagList']))) ?>"
  537. <?php Users::has_autocomplete_enabled('other'); ?>
  538. /><br />
  539. Comma-seperated list of tags, n.b., use <strong class="important_text_alt">vanity.house</strong> for data you
  540. produced
  541. </td>
  542. </tr>
  543. <!-- Picture -->
  544. <tr id="cover_tr">
  545. <td class="label">Picture</td>
  546. <td>
  547. <input type="text" id="image" name="image" size="60"
  548. value="<?= display_str($Torrent['Image']) ?>"
  549. <?= $this->Disabled ?> /><br />
  550. A meaningful picture, e.g., the specimen or a thumbnail
  551. </td>
  552. </tr>
  553. <!-- Sample pictures/links -->
  554. <?php if (!$this->DisabledFlag && $this->NewTorrent) { ?>
  555. <tr id="screenshots_tr">
  556. <td class="label">Publications</td>
  557. <td>
  558. <textarea rows="8" cols="60" name="screenshots"
  559. id="screenshots"><?= display_str($Torrent['Screenshots'])?></textarea>
  560. Up to ten DOI numbers, one per line
  561. </tr>
  562. <?php } ?>
  563. <!-- Album description -->
  564. <tr id="group_desc_tr">
  565. <td class="label">Torrent Group Description</td>
  566. <td>
  567. <?php
  568. new TEXTAREA_PREVIEW(
  569. 'album_desc',
  570. 'album_desc',
  571. display_str($Torrent['GroupDescription']),
  572. 60,
  573. 8,
  574. !$this->DisabledFlag,
  575. !$this->DisabledFlag,
  576. false,
  577. array($this->Disabled)
  578. );
  579. ?><br />
  580. General info about the object of study's function or significance
  581. </td>
  582. </tr>
  583. <?php } # Ends if NewTorrent line 499?>
  584. <!-- Torrent description -->
  585. <tr id="release_desc_tr">
  586. <td class="label">Torrent Description</td>
  587. <td>
  588. <?php
  589. new TEXTAREA_PREVIEW(
  590. 'release_desc',
  591. 'release_desc',
  592. display_str($Torrent['TorrentDescription'] ?? ''),
  593. 60,
  594. ); ?><br />
  595. Specific info about the protocols and equipment relevant to <em>this</em> data
  596. </td>
  597. </tr>
  598. <!-- Boolean options -->
  599. <tr id="censored_tr">
  600. <td class="label">Aligned Sequence</td>
  601. <td>
  602. <input type="checkbox" name="censored" value="1" <?= (($Torrent['Censored'] ?? 0) ? 'checked ' : '') ?>/>
  603. Whether the torrent contains raw reads or alignment data
  604. </td>
  605. </tr>
  606. <tr id="anon_tr">
  607. <td class="label">Upload Anonymously</td>
  608. <td>
  609. <input type="checkbox" name="anonymous" value="1" <?= (($Torrent['Anonymous'] ?? false) ? 'checked ' : '') ?>/>
  610. Hide your username from other users on the torrent details page
  611. </td>
  612. </tr>
  613. </table>
  614. <?php
  615. # Phew
  616. $this->foot();
  617. G::$DB->set_query_id($QueryID);
  618. }
  619. }