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

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