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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714
  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">
  142. Torrent File
  143. <strong class="important_text">*</strong>
  144. </td>
  145. <td><input id="file" type="file" name="file_input" size="50" /><br />
  146. Use the above announce URL and set the private flag in your BitTorrent client, e.g.,
  147. <code>mktorrent -p -a &lt;announce&gt; &lt;target folder&gt;</code>
  148. </td>
  149. </tr>
  150. <tr>
  151. <td class="label">
  152. Type
  153. <strong class="important_text">*</strong>
  154. </td>
  155. <td>
  156. <select id="categories" name="type" onchange="Categories()" <?= ($this->DisabledFlag) ? ' disabled="disabled"' : '' ?>>
  157. <?php
  158. foreach (Misc::display_array($this->Categories) as $Index => $Cat) {
  159. echo "\t\t\t\t\t\t<option value=\"$Index\"";
  160. if ($Cat == $this->Torrent['CategoryName']) {
  161. echo ' selected="selected"';
  162. }
  163. echo ">$Cat</option>\n";
  164. }
  165. ?>
  166. </select><br />
  167. What alphabet the sequence uses, n.b., plasmids fit in the Other category
  168. </td>
  169. </tr>
  170. </table>
  171. <!-- Start the dynamic form -->
  172. <?php } # if?>
  173. <div id="dynamic_form">
  174. <?php
  175. }
  176. public function foot()
  177. {
  178. $Torrent = $this->Torrent; ?>
  179. </div>
  180. <!-- Freeleech type -->
  181. <table cellpadding="3" cellspacing="1" border="0" class="layout slice" width="100%">
  182. <?php
  183. if (!$this->NewTorrent) {
  184. if (check_perms('torrents_freeleech')) {
  185. ?>
  186. <tr id="freetorrent">
  187. <td class="label">Freeleech</td>
  188. <td>
  189. <select name="freeleech">
  190. <?php
  191. $FL = array("Normal", "Free", "Neutral");
  192. foreach ($FL as $Key => $Name) {
  193. # Cycle types
  194. ?>
  195. <option value="<?= $Key ?>" <?= ($Key === $Torrent['FreeTorrent'] ? ' selected="selected"' : '') ?>><?= $Name ?>
  196. </option>
  197. <?php
  198. } ?>
  199. </select>
  200. because
  201. <select name="freeleechtype">
  202. <?php
  203. $FL = array("N/A", "Staff Pick", "Perma-FL", "Freeleechizer", "Site-Wide FL");
  204. foreach ($FL as $Key => $Name) {
  205. # Cycle reasons
  206. ?>
  207. <option value="<?=$Key?>" <?= ($Key === $Torrent['FreeLeechType'] ? ' selected="selected"' : '') ?>><?= $Name ?>
  208. </option>
  209. <?php
  210. } ?>
  211. </select>
  212. </td>
  213. </tr>
  214. <?php
  215. }
  216. } ?>
  217. <!-- Rules notice and submit button -->
  218. <tr>
  219. <td colspan="2" style="text-align: center;">
  220. <p>
  221. Be sure that your torrent is approved by the <a href="rules.php?p=upload" target="_blank">rules</a>.
  222. Not doing this will result in a <strong class="important_text">warning</strong> or <strong
  223. class="important_text">worse</strong>.
  224. </p>
  225. <?php if ($this->NewTorrent) { ?>
  226. <p>
  227. After uploading the torrent, you will have a one hour grace period during which no one other than you can
  228. fill requests with this torrent.
  229. Make use of this time wisely, and <a href="requests.php">search the list of requests</a>.
  230. </p>
  231. <?php } ?>
  232. <input id="post" type="submit" <?php
  233. if ($this->NewTorrent) {
  234. echo ' value="Upload"';
  235. } else {
  236. echo ' value="Edit"';
  237. } ?>
  238. />
  239. </td>
  240. </tr>
  241. </table>
  242. </form>
  243. </div>
  244. <!-- Okay, finally the real form -->
  245. <?php
  246. } # End
  247. public function upload_form()
  248. {
  249. $QueryID = G::$DB->get_query_id();
  250. $this->head();
  251. $Torrent = $this->Torrent; ?>
  252. <!-- Catalogue number field -->
  253. <table cellpadding="3" cellspacing="1" border="0" class="layout slice" width="100%">
  254. <?php if ($this->NewTorrent) { ?>
  255. <tr id="javdb_tr">
  256. <td class="label tooltip" title="">Accession Number</td>
  257. <td>
  258. <input type="text" id="catalogue" name="catalogue" size="10"
  259. value="<?= display_str($Torrent['CatalogueNumber']) ?>"
  260. <?= $this->Disabled ?>/>
  261. <?php if (!$this->DisabledFlag) { ?>
  262. <input type="button" autofill="jav" value="Autofill" style="pointer-events: none; opacity: 0.5;">
  263. </input><br />
  264. <!-- Autofill only supports RefSeq and UniProt; -->
  265. Enter any ID number that corresponds to the data,
  266. preferring RefSeq and UniProt
  267. <?php } ?>
  268. </td>
  269. </tr>
  270. <!-- Other autofill options -->
  271. <tr id="anidb_tr" class="hidden">
  272. <td class="label">AniDB Autofill (optional)</td>
  273. <td>
  274. <input type="text" id="anidb" size="10" <?= $this->Disabled ?>/>
  275. <?php if (!$this->DisabledFlag) { ?>
  276. <input type="button" autofill="anime" value="Autofill" />
  277. <?php } ?>
  278. </td>
  279. </tr>
  280. <tr id="ehentai_tr" class="hidden">
  281. <td class="label">e-hentai URL (optional)</td>
  282. <td>
  283. <input type="text" id="catalogue" size="50" <?= $this->Disabled ?> />
  284. <?php if (!$this->DisabledFlag) { ?>
  285. <input type="button" autofill="douj" value="Autofill" />
  286. <?php } ?>
  287. </td>
  288. </tr>
  289. <!-- Three title fields -->
  290. <tr id="title_tr">
  291. <td class="label">
  292. Torrent Title
  293. <strong class="important_text">*</strong>
  294. </td>
  295. <td>
  296. <input type="text" id="title" name="title" size="60"
  297. value="<?= display_str($Torrent['Title']) ?>"
  298. <?= $this->Disabled ?>/><br />
  299. Definition line, e.g., Alcohol dehydrogenase ADH1
  300. </td>
  301. </tr>
  302. <tr id="title_rj_tr">
  303. <td class="label" title="">Organism</td>
  304. <td>
  305. <input type="text" id="title_rj" name="title_rj" size="60"
  306. value="<?= display_str($Torrent['TitleRJ']) ?>"
  307. <?= $this->Disabled ?>/><br />
  308. Organism line binomial, e.g., <em>Saccharomyces cerevisiae</em>
  309. </td>
  310. </tr>
  311. <tr id="title_jp_tr">
  312. <td class="label">Strain/Variety</td>
  313. <td>
  314. <input type="text" id="title_jp" name="title_jp" size="60"
  315. value="<?= display_str($Torrent['TitleJP']) ?>"
  316. <?= $this->Disabled ?>/><br />
  317. Organism line if any, e.g., S288C
  318. </td>
  319. </tr>
  320. <!-- Multiple artists -->
  321. <tr id="idols_tr">
  322. <td class="label">
  323. Authors(s)
  324. <strong class="important_text">*</strong>
  325. </td>
  326. <td id="idolfields">
  327. One per field, e.g., Robert K. Mortimer [+] David Schild<br />
  328. <?php
  329. if (!empty($Torrent['Artists'])) {
  330. foreach ($Torrent['Artists'] as $Num => $Artist) {
  331. ?>
  332. <input type="text" id="idols_<?= $Num ?>"
  333. name="idols[]" size="45"
  334. value="<?= display_str($Artist['name']) ?>"
  335. <?= $this->Disabled ?>/>
  336. <?php if ($Num === 0) { ?>
  337. <a class="add_artist_button brackets">+</a>
  338. <a class="remove_artist_button brackets">&minus;</a>
  339. <?php
  340. }
  341. }
  342. } else {
  343. ?>
  344. <input type="text" id="idols_0" name="idols[]" size="45" value="" <?= $this->Disabled ?> />
  345. <a class="add_artist_button brackets">+</a>
  346. <a class="remove_artist_button brackets">&minus;</a>
  347. <?php
  348. } ?>
  349. </td>
  350. </tr>
  351. <!-- Production studio -->
  352. <tr id="studio_tr">
  353. <td class="label">
  354. Department/Lab
  355. <strong class="important_text">*</strong>
  356. </td>
  357. <td>
  358. <input type="text" id="studio" name="studio" size="60"
  359. value="<?= display_str($Torrent['Studio']) ?>"
  360. <?= $this->Disabled ?>/><br />
  361. Last author's institution, e.g., Lawrence Berkeley Laboratory
  362. </td>
  363. </tr>
  364. <!-- Location -->
  365. <tr id="series_tr">
  366. <td class="label">Location</td>
  367. <td>
  368. <input type="text" id="series" name="series" size="60"
  369. value="<?= display_str($Torrent['Series']) ?>"
  370. <?= $this->Disabled ?>/><br />
  371. Physical location, e.g., Berkeley, CA 94720
  372. </td>
  373. </tr>
  374. <!-- Year -->
  375. <tr id="year_tr">
  376. <td class="label">
  377. Year
  378. <strong class="important_text">*</strong>
  379. </td>
  380. <td>
  381. <input type="text" id="year" name="year" maxlength="4" size="5"
  382. value="<?= display_str($Torrent['Year']) ?>"
  383. <?= $this->Disabled ?>/><br />
  384. Original publication year
  385. </td>
  386. </tr>
  387. <!-- Media type -->
  388. <?php } # Ends if NewTorrent line 256?>
  389. <tr id="media_tr">
  390. <td class="label">
  391. Platform
  392. <strong class="important_text">*</strong>
  393. </td>
  394. <td>
  395. <select name="media">
  396. <option>---</option>
  397. <?php
  398. foreach ($this->Media as $Media) {
  399. echo "\t\t\t\t\t\t<option value=\"$Media\"";
  400. if ($Media == ($Torrent['Media'] ?? false)) {
  401. echo " selected";
  402. }
  403. echo ">$Media</option>\n";
  404. } ?>
  405. </select><br />
  406. Class of technology used
  407. </td>
  408. </tr>
  409. <!-- Alternate media -->
  410. <tr id="media_manga_tr">
  411. <td class="label">
  412. Platform
  413. <strong class="important_text">*</strong>
  414. </td>
  415. <td>
  416. <select name="media">
  417. <option>---</option>
  418. <?php
  419. foreach ($this->MediaManga as $Media) {
  420. echo "\t\t\t\t\t\t<option value=\"$Media\"";
  421. if ($Media === ($Torrent['Media'] ?? false)) {
  422. echo " selected";
  423. }
  424. echo ">$Media</option>\n";
  425. } ?>
  426. </select><br />
  427. Class of technology used
  428. </td>
  429. </tr>
  430. <!-- Container -->
  431. <tr id="container_tr">
  432. <td class="label">
  433. Format
  434. <strong class="important_text">*</strong>
  435. </td>
  436. <td>
  437. <select name="container">
  438. <option value="Autofill">Autofill</option>
  439. <?php
  440. foreach ($this->Containers as $Cont) {
  441. echo "\t\t\t\t\t\t<option value=\"$Cont\"";
  442. if ($Cont === ($Torrent['Container'] ?? false)) {
  443. echo " selected";
  444. }
  445. echo ">$Cont</option>\n";
  446. } ?>
  447. </select><br />
  448. Data file format, or detect from file list
  449. </td>
  450. </tr>
  451. <!-- Alternate container -->
  452. <tr id="container_games_tr">
  453. <td class="label">
  454. Format
  455. <strong class="important_text">*</strong>
  456. </td>
  457. <td>
  458. <select id="container" name="container">
  459. <option value="Autofill">Autofill</option>
  460. <?php
  461. foreach ($this->ContainersGames as $Container) {
  462. echo "\t\t\t\t\t\t<option value=\"$Container\"";
  463. if ($Container === ($Torrent['Container'] ?? false)) {
  464. echo " selected";
  465. }
  466. echo ">$Container</option>\n";
  467. } ?>
  468. </select><br />
  469. Data file format, or detect from file list
  470. </td>
  471. </tr>
  472. <!-- Resolution -->
  473. <tr id="resolution_tr">
  474. <td class="label">
  475. Assembly Level
  476. <strong class="important_text">*</strong>
  477. </td>
  478. <td>
  479. <select id="ressel" name="ressel" onchange="SetResolution()">
  480. <option value="">---</option>
  481. <?php
  482. foreach ($this->Resolutions as $Res) {
  483. echo "\t\t\t\t\t\t<option value=\"$Res\"";
  484. if ($Res === ($Torrent['Resolution'] ?? false)
  485. || (!isset($FoundRes) && ($Torrent['Resolution'] ?? false)
  486. && $Res === 'Other')) {
  487. echo " selected";
  488. $FoundRes = true;
  489. }
  490. echo ">$Res</option>\n";
  491. } ?>
  492. </select>
  493. <input type="text" id="resolution" name="resolution" size="10" class="hidden"
  494. value="<?= ($Torrent['Resolution']??'') ?>"
  495. readonly>
  496. </input>
  497. <script>
  498. if ($('#ressel').raw().value == "Other") {
  499. $('#resolution').raw().readOnly = false
  500. $('#resolution').gshow()
  501. }
  502. </script><br />
  503. How complete the data is
  504. </td>
  505. </tr>
  506. <!-- Compression -->
  507. <tr id="archive_tr">
  508. <td class="label">
  509. Archive
  510. <strong class="important_text">*</strong>
  511. </td>
  512. <td>
  513. <select name='archive'>
  514. <option value="Autofill">Autofill</option>
  515. <?php
  516. foreach ($this->Archives as $Archive) {
  517. echo "\t\t\t\t\t\t<option value=\"$Archive\"";
  518. if ($Archive === ($Torrent['Archive'] ?? false)) {
  519. echo ' selected';
  520. }
  521. echo ">$Archive</option>\n";
  522. } ?>
  523. </select><br />
  524. Compression algorithm, or detect from file list
  525. </td>
  526. </tr>
  527. <!-- Encoding -->
  528. <tr id="codec_tr">
  529. <td class="label">
  530. License
  531. <strong class="important_text">*</strong>
  532. </td>
  533. <td>
  534. <select name="codec">
  535. <option>---</option>
  536. <?php
  537. foreach ($this->Codecs as $Codec) {
  538. echo "\t\t\t\t\t\t<option value=\"$Codec\"";
  539. if ($Codec === ($Torrent['Codec'] ?? false)) {
  540. echo " selected";
  541. }
  542. echo ">$Codec</option>\n";
  543. } ?>
  544. </select><br />
  545. Please see <a href="http://www.dcc.ac.uk/resources/how-guides/license-research-data" target="_blank">How to
  546. License Research Data</a>
  547. </td>
  548. </tr>
  549. <!-- Tags -->
  550. <?php if ($this->NewTorrent) { ?>
  551. <tr id="tags_tr">
  552. <td class="label">
  553. Tags
  554. <strong class="important_text">*</strong>
  555. </td>
  556. <td>
  557. <?php
  558. $GenreTags = G::$Cache->get_value('genre_tags');
  559. if (!$GenreTags) {
  560. $DB->query("
  561. SELECT Name
  562. FROM tags
  563. WHERE TagType = 'genre'
  564. ORDER BY Name");
  565. $GenreTags = $DB->collect('Name');
  566. G::$Cache->cache_value('genre_tags', $GenreTags, 3600*6);
  567. }
  568. ?>
  569. <select id="genre_tags" name="genre_tags" onchange="add_tag(); return false;" <?= ($this->DisabledFlag) ? ' disabled="disabled"' : '' ?>>
  570. <option>---</option>
  571. <?php foreach (Misc::display_array($GenreTags) as $Genre) { ?>
  572. <option value="<?= $Genre ?>"><?= $Genre ?>
  573. </option>
  574. <?php } ?>
  575. </select>
  576. <input type="text" id="tags" name="tags" size="60"
  577. value="<?= display_str(implode(', ', explode(',', $Torrent['TagList']))) ?>"
  578. <?php Users::has_autocomplete_enabled('other'); ?>
  579. /><br />
  580. Comma-seperated list of tags, n.b., use <strong class="important_text_alt">vanity.house</strong> for data you
  581. produced
  582. </td>
  583. </tr>
  584. <!-- Picture -->
  585. <tr id="cover_tr">
  586. <td class="label">Picture</td>
  587. <td>
  588. <input type="text" id="image" name="image" size="60"
  589. value="<?= display_str($Torrent['Image']) ?>"
  590. <?= $this->Disabled ?> /><br />
  591. A meaningful picture, e.g., the specimen or a thumbnail
  592. </td>
  593. </tr>
  594. <!-- Sample pictures/links -->
  595. <?php if (!$this->DisabledFlag && $this->NewTorrent) { ?>
  596. <tr id="screenshots_tr">
  597. <td class="label">Publications</td>
  598. <td>
  599. <textarea rows="8" cols="60" name="screenshots"
  600. id="screenshots"><?= display_str($Torrent['Screenshots'])?></textarea>
  601. Up to ten DOI numbers, one per line
  602. </tr>
  603. <?php } ?>
  604. <!-- Album description -->
  605. <tr id="group_desc_tr">
  606. <td class="label">
  607. Torrent Group Description
  608. <strong class="important_text">*</strong>
  609. </td>
  610. <td>
  611. <?php
  612. new TEXTAREA_PREVIEW(
  613. 'album_desc',
  614. 'album_desc',
  615. display_str($Torrent['GroupDescription']),
  616. 60,
  617. 8,
  618. !$this->DisabledFlag,
  619. !$this->DisabledFlag,
  620. false,
  621. array($this->Disabled)
  622. );
  623. ?><br />
  624. General info about the object of study's function or significance
  625. </td>
  626. </tr>
  627. <?php } # Ends if NewTorrent line 499?>
  628. <!-- Torrent description -->
  629. <tr id="release_desc_tr">
  630. <td class="label">Torrent Description</td>
  631. <td>
  632. <?php
  633. new TEXTAREA_PREVIEW(
  634. 'release_desc',
  635. 'release_desc',
  636. display_str($Torrent['TorrentDescription'] ?? ''),
  637. 60,
  638. ); ?><br />
  639. Specific info about the protocols and equipment relevant to <em>this</em> data
  640. </td>
  641. </tr>
  642. <!-- Boolean options -->
  643. <tr id="censored_tr">
  644. <td class="label">Aligned Sequence</td>
  645. <td>
  646. <input type="checkbox" name="censored" value="1" <?= (($Torrent['Censored'] ?? 0) ? 'checked ' : '') ?>/>
  647. Whether the torrent contains raw reads or alignment data
  648. </td>
  649. </tr>
  650. <tr id="anon_tr">
  651. <td class="label">Upload Anonymously</td>
  652. <td>
  653. <input type="checkbox" name="anonymous" value="1" <?= (($Torrent['Anonymous'] ?? false) ? 'checked ' : '') ?>/>
  654. Hide your username from other users on the torrent details page
  655. </td>
  656. </tr>
  657. </table>
  658. <?php
  659. # Phew
  660. $this->foot();
  661. G::$DB->set_query_id($QueryID);
  662. }
  663. }