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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720
  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. <option value="">---</option>
  415. <?php
  416. foreach ($this->Media as $Media) {
  417. echo "\t\t\t\t\t\t<option value=\"$Media\"";
  418. if ($Media == ($Torrent['Media'] ?? false)) {
  419. echo " selected";
  420. }
  421. echo ">$Media</option>\n";
  422. } ?>
  423. </select><br />
  424. Class of technology used
  425. </td>
  426. </tr>
  427. <!-- Alternate media -->
  428. <tr id="media_manga_tr">
  429. <td class="label">
  430. Platform
  431. <strong class="important_text">*</strong>
  432. </td>
  433. <td>
  434. <select name="media">
  435. <option>---</option>
  436. <?php
  437. foreach ($this->MediaManga as $Media) {
  438. echo "\t\t\t\t\t\t<option value=\"$Media\"";
  439. if ($Media === ($Torrent['Media'] ?? false)) {
  440. echo " selected";
  441. }
  442. echo ">$Media</option>\n";
  443. } ?>
  444. </select><br />
  445. Class of technology used
  446. </td>
  447. </tr>
  448. <!-- Resolution -->
  449. <tr id="resolution_tr">
  450. <td class="label">
  451. Assembly Level
  452. <strong class="important_text">*</strong>
  453. </td>
  454. <td>
  455. <select id="ressel" name="ressel" onchange="SetResolution()">
  456. <option value="">---</option>
  457. <?php
  458. foreach ($this->Resolutions as $Res) {
  459. echo "\t\t\t\t\t\t<option value=\"$Res\"";
  460. if ($Res === ($Torrent['Resolution'] ?? false)
  461. || (!isset($FoundRes) && ($Torrent['Resolution'] ?? false)
  462. && $Res === 'Other')) {
  463. echo " selected";
  464. $FoundRes = true;
  465. }
  466. echo ">$Res</option>\n";
  467. } ?>
  468. </select>
  469. <input type="text" id="resolution" name="resolution" size="10" class="hidden"
  470. value="<?= ($Torrent['Resolution']??'') ?>"
  471. readonly>
  472. </input>
  473. <script>
  474. if ($('#ressel').raw().value == "Other") {
  475. $('#resolution').raw().readOnly = false
  476. $('#resolution').gshow()
  477. }
  478. </script><br />
  479. How complete the data is
  480. </td>
  481. </tr>
  482. <!-- Three container fields -->
  483. <tr id="container_tr">
  484. <td class="label">
  485. Format
  486. <strong class="important_text">*</strong>
  487. </td>
  488. <td>
  489. <select name="container">
  490. <option value="Autofill">Autofill</option>
  491. <?php
  492. foreach ($this->Containers as $Name => $Container) {
  493. echo "<option value='$Name'>$Name</option>\n";
  494. } ?>
  495. </select><br />
  496. Data file format, or detect from file list
  497. </td>
  498. </tr>
  499. <!-- 2 -->
  500. <tr id="container_games_tr">
  501. <td class="label">
  502. Format
  503. <strong class="important_text">*</strong>
  504. </td>
  505. <td>
  506. <select id="container" name="container">
  507. <option value="Autofill">Autofill</option>
  508. <?php
  509. foreach ($this->ContainersGames as $Name => $Container) {
  510. echo "<option value='$Name'>$Name</option>\n";
  511. } ?>
  512. </select><br />
  513. Data file format, or detect from file list
  514. </td>
  515. </tr>
  516. <!-- 3 -->
  517. <tr id="container_prot_tr">
  518. <td class="label">
  519. Format
  520. <strong class="important_text">*</strong>
  521. </td>
  522. <td>
  523. <select id="container" name="container">
  524. <option value="Autofill">Autofill</option>
  525. <?php
  526. foreach ($this->ContainersProt as $Name => $Container) {
  527. echo "<option value='$Name'>$Name</option>\n";
  528. } ?>
  529. </select><br />
  530. Data file format, or detect from file list
  531. </td>
  532. </tr>
  533. <!-- Compression -->
  534. <tr id="archive_tr">
  535. <td class="label">
  536. Archive
  537. <strong class="important_text">*</strong>
  538. </td>
  539. <td>
  540. <select name='archive'>
  541. <option value="Autofill">Autofill</option>
  542. <?php
  543. foreach ($this->Archives as $Name => $Archive) {
  544. echo "\t\t\t\t\t\t<option value=\"$Name\"";
  545. if ($Archive === ($Torrent['Archive'] ?? false)) {
  546. echo ' selected';
  547. }
  548. echo ">$Name</option>\n";
  549. } ?>
  550. </select><br />
  551. Compression algorithm, or detect from file list
  552. </td>
  553. </tr>
  554. <!-- Tags -->
  555. <?php if ($this->NewTorrent) { ?>
  556. <tr id="tags_tr">
  557. <td class="label">
  558. Tags
  559. <strong class="important_text">*</strong>
  560. </td>
  561. <td>
  562. <?php
  563. $GenreTags = G::$Cache->get_value('genre_tags');
  564. if (!$GenreTags) {
  565. $DB->query("
  566. SELECT Name
  567. FROM tags
  568. WHERE TagType = 'genre'
  569. ORDER BY Name");
  570. $GenreTags = $DB->collect('Name');
  571. G::$Cache->cache_value('genre_tags', $GenreTags, 3600*6);
  572. }
  573. ?>
  574. <select id="genre_tags" name="genre_tags" onchange="add_tag(); return false;" <?= ($this->DisabledFlag) ? ' disabled="disabled"' : '' ?>>
  575. <option>---</option>
  576. <?php foreach (Misc::display_array($GenreTags) as $Genre) { ?>
  577. <option value="<?= $Genre ?>"><?= $Genre ?>
  578. </option>
  579. <?php } ?>
  580. </select>
  581. <input type="text" id="tags" name="tags" size="60"
  582. value="<?= display_str(implode(', ', explode(',', $Torrent['TagList']))) ?>"
  583. <?php Users::has_autocomplete_enabled('other'); ?>
  584. /><br />
  585. Comma-seperated list of tags, n.b., use <strong class="important_text_alt">vanity.house</strong> for data you
  586. produced
  587. </td>
  588. </tr>
  589. <!-- Picture -->
  590. <tr id="cover_tr">
  591. <td class="label">Picture</td>
  592. <td>
  593. <input type="text" id="image" name="image" size="60"
  594. value="<?= display_str($Torrent['Image']) ?>"
  595. <?= $this->Disabled ?> /><br />
  596. A meaningful picture, e.g., the specimen or a thumbnail
  597. </td>
  598. </tr>
  599. <!-- Sample pictures/links -->
  600. <?php if (!$this->DisabledFlag && $this->NewTorrent) { ?>
  601. <tr id="screenshots_tr">
  602. <td class="label">Publications</td>
  603. <td>
  604. <textarea rows="8" cols="60" name="screenshots"
  605. id="screenshots"><?= display_str($Torrent['Screenshots'])?></textarea>
  606. Up to ten DOI numbers, one per line
  607. </tr>
  608. <?php } ?>
  609. <!-- Album description -->
  610. <tr id="group_desc_tr">
  611. <td class="label">
  612. Torrent Group Description
  613. <strong class="important_text">*</strong>
  614. </td>
  615. <td>
  616. <?php
  617. new TEXTAREA_PREVIEW(
  618. 'album_desc',
  619. 'album_desc',
  620. display_str($Torrent['GroupDescription']),
  621. 60,
  622. 8,
  623. !$this->DisabledFlag,
  624. !$this->DisabledFlag,
  625. false,
  626. array($this->Disabled)
  627. );
  628. ?><br />
  629. General info about the object of study's function or significance
  630. </td>
  631. </tr>
  632. <?php } # Ends if NewTorrent line 499?>
  633. <!-- Torrent description -->
  634. <tr id="release_desc_tr">
  635. <td class="label">Torrent Description</td>
  636. <td>
  637. <?php
  638. new TEXTAREA_PREVIEW(
  639. 'release_desc',
  640. 'release_desc',
  641. display_str($Torrent['TorrentDescription'] ?? ''),
  642. 60,
  643. ); ?><br />
  644. Specific info about the protocols and equipment relevant to <em>this</em> data
  645. </td>
  646. </tr>
  647. <!-- Boolean options -->
  648. <tr id="censored_tr">
  649. <td class="label">Aligned Sequence</td>
  650. <td>
  651. <input type="checkbox" name="censored" value="1" <?= (($Torrent['Censored'] ?? 0) ? 'checked ' : '') ?>/>
  652. Whether the torrent contains raw reads or alignment data
  653. </td>
  654. </tr>
  655. <tr id="anon_tr">
  656. <td class="label">Upload Anonymously</td>
  657. <td>
  658. <input type="checkbox" name="anonymous" value="1" <?= (($Torrent['Anonymous'] ?? false) ? 'checked ' : '') ?>/>
  659. Hide your username from other users on the torrent details page
  660. </td>
  661. </tr>
  662. </table>
  663. <?php
  664. # Phew
  665. $this->foot();
  666. G::$DB->set_query_id($QueryID);
  667. }
  668. }