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

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