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

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