Oppaitime'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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563
  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. public $Formats = [];
  9. public $Bitrates = [];
  10. public $Media = [];
  11. public $MediaManaga = [];
  12. public $Containers = [];
  13. public $ContainersGames = [];
  14. public $Codecs = [];
  15. public $Resolutions = [];
  16. public $AudioFormats = [];
  17. public $Subbing = [];
  18. public $Languages = [];
  19. public $Platform = [];
  20. public $NewTorrent = false;
  21. public $Torrent = [];
  22. public $Error = false;
  23. public $TorrentID = false;
  24. public $Disabled = '';
  25. public $DisabledFlag = false;
  26. public function __construct($Torrent = false, $Error = false, $NewTorrent = true)
  27. {
  28. $this->NewTorrent = $NewTorrent;
  29. $this->Torrent = $Torrent;
  30. $this->Error = $Error;
  31. global $UploadForm, $Categories, $Formats, $Bitrates, $Media, $MediaManga, $TorrentID, $Containers, $ContainersGames, $Codecs, $Resolutions, $AudioFormats, $Subbing, $Languages, $Platform, $Archives, $ArchivesManga;
  32. $this->UploadForm = $UploadForm;
  33. $this->Categories = $Categories;
  34. $this->Formats = $Formats;
  35. $this->Bitrates = $Bitrates;
  36. $this->Media = $Media;
  37. $this->MediaManga = $MediaManga;
  38. $this->Containers = $Containers;
  39. $this->ContainersGames = $ContainersGames;
  40. $this->Codecs = $Codecs;
  41. $this->Resolutions = $Resolutions;
  42. $this->AudioFormats = $AudioFormats;
  43. $this->Subbing = $Subbing;
  44. $this->Languages = $Languages;
  45. $this->TorrentID = $TorrentID;
  46. $this->Platform = $Platform;
  47. $this->Archives = $Archives;
  48. $this->ArchivesManga = $ArchivesManga;
  49. if ($this->Torrent && $this->Torrent['GroupID']) {
  50. $this->Disabled = ' readonly="readonly"';
  51. $this->DisabledFlag = true;
  52. }
  53. }
  54. public function head()
  55. {
  56. G::$DB->query("
  57. SELECT COUNT(ID)
  58. FROM torrents
  59. WHERE UserID = ?", G::$LoggedUser['ID']);
  60. list($Uploads) = G::$DB->next_record(); ?>
  61. <div class="thin">
  62. <?php if ($this->NewTorrent) { ?>
  63. <p style="text-align: center;">
  64. If you would like to use your own torrent file, add the following to it:<br />
  65. <?php $Announces = call_user_func_array('array_merge', ANNOUNCE_URLS);
  66. foreach ($Announces as $Announce) {
  67. ?>
  68. Announce: <input type="text" value="<?=$Announce . '/' . G::$LoggedUser['torrent_pass'] . '/announce'?>" size="74" onclick="this.select();" readonly="readonly" /> <br />
  69. <?php
  70. } ?>
  71. Source: <input type="text" value="<?=Users::get_upload_sources()[0]?>" size="20" onclick="this.select();" readonly="readonly" />
  72. <p style="text-align: center;">
  73. Otherwise, add none of it and simply redownload the torrent file after uploading it. All of the above data will be added to it by the site.<br /><br />
  74. <strong<?=((!$Uploads)?' class="important_text"':'')?>>
  75. If you never have before, be sure to read this list of <a href="wiki.php?action=article&name=uploadingpitfalls">uploading pitfalls</a>
  76. </strong>
  77. </p>
  78. </p>
  79. <?php }
  80. if ($this->Error) {
  81. echo "\t".'<p style="color: red; text-align: center;">'.$this->Error."</p>\n";
  82. } ?>
  83. <form class="create_form box pad" name="torrent" action="" enctype="multipart/form-data" method="post" onsubmit="$('#post').raw().disabled = 'disabled';">
  84. <div>
  85. <input type="hidden" name="submit" value="true" />
  86. <input type="hidden" name="auth" value="<?=G::$LoggedUser['AuthKey']?>" />
  87. <?php if (!$this->NewTorrent) { ?>
  88. <input type="hidden" name="action" value="takeedit" />
  89. <input type="hidden" name="torrentid" value="<?=display_str($this->TorrentID)?>" />
  90. <input type="hidden" name="type" value="<?=display_str($this->Torrent['CategoryID']-1)?>" />
  91. <?php
  92. } else {
  93. if ($this->Torrent && $this->Torrent['GroupID']) {
  94. ?>
  95. <input type="hidden" name="groupid" value="<?=display_str($this->Torrent['GroupID'])?>" />
  96. <input type="hidden" name="type" value="<?=display_str($this->Torrent['CategoryID']-1)?>" />
  97. <?php
  98. }
  99. if ($this->Torrent && ($this->Torrent['RequestID'] ?? false)) {
  100. ?>
  101. <input type="hidden" name="requestid" value="<?=display_str($this->Torrent['RequestID'])?>" />
  102. <?php
  103. }
  104. } ?>
  105. </div>
  106. <?php if ($this->NewTorrent) { ?>
  107. <table cellpadding="3" cellspacing="1" border="0" class="layout" width="100%">
  108. <tr>
  109. <td class="label">Torrent file</td>
  110. <td><input id="file" type="file" name="file_input" size="50" /></td>
  111. </tr>
  112. <tr>
  113. <td class="label">Type</td>
  114. <td>
  115. <select id="categories" name="type" onchange="Categories()"<?=($this->DisabledFlag) ? ' disabled="disabled"' : ''?>>
  116. <?php
  117. foreach (Misc::display_array($this->Categories) as $Index => $Cat) {
  118. echo "\t\t\t\t\t\t<option value=\"$Index\"";
  119. if ($Cat == $this->Torrent['CategoryName']) {
  120. echo ' selected="selected"';
  121. }
  122. echo ">$Cat</option>\n";
  123. }
  124. ?>
  125. </select>
  126. </td>
  127. </tr>
  128. </table>
  129. <?php }//if?>
  130. <div id="dynamic_form">
  131. <?php
  132. }
  133. public function foot()
  134. {
  135. $Torrent = $this->Torrent; ?>
  136. </div>
  137. <table cellpadding="3" cellspacing="1" border="0" class="layout slice" width="100%">
  138. <?php
  139. if (!$this->NewTorrent) {
  140. if (check_perms('torrents_freeleech')) {
  141. ?>
  142. <tr id="freetorrent">
  143. <td class="label">Freeleech</td>
  144. <td>
  145. <select name="freeleech">
  146. <?php
  147. $FL = array("Normal", "Free", "Neutral");
  148. foreach ($FL as $Key => $Name) {
  149. ?>
  150. <option value="<?=$Key?>"<?=($Key == $Torrent['FreeTorrent'] ? ' selected="selected"' : '')?>><?=$Name?></option>
  151. <?php
  152. } ?>
  153. </select>
  154. because
  155. <select name="freeleechtype">
  156. <?php
  157. $FL = array("N/A", "Staff Pick", "Perma-FL", "Freeleechizer", "Site-Wide FL");
  158. foreach ($FL as $Key => $Name) {
  159. ?>
  160. <option value="<?=$Key?>"<?=($Key == $Torrent['FreeLeechType'] ? ' selected="selected"' : '')?>><?=$Name?></option>
  161. <?php
  162. } ?>
  163. </select>
  164. </td>
  165. </tr>
  166. <?php
  167. }
  168. } ?>
  169. <tr>
  170. <td colspan="2" style="text-align: center;">
  171. <p>Be sure that your torrent is approved by the <a href="rules.php?p=upload" target="_blank">rules</a>. Not doing this will result in a <strong class="important_text">warning</strong> or <strong class="important_text">worse</strong>.</p>
  172. <?php if ($this->NewTorrent) { ?>
  173. <p>After uploading the torrent, you will have a one hour grace period during which no one other than you can fill requests with this torrent. Make use of this time wisely, and <a href="requests.php">search the list of requests</a>.</p>
  174. <?php } ?>
  175. <input id="post" type="submit"<?php if ($this->NewTorrent) {
  176. echo ' value="Upload torrent"';
  177. } else {
  178. echo ' value="Edit torrent"';
  179. } ?> />
  180. </td>
  181. </tr>
  182. </table>
  183. </form>
  184. </div>
  185. <?php
  186. }
  187. public function upload_form()
  188. {
  189. $QueryID = G::$DB->get_query_id();
  190. $this->head();
  191. $Torrent = $this->Torrent; ?>
  192. <table cellpadding="3" cellspacing="1" border="0" class="layout slice" width="100%">
  193. <?php if ($this->NewTorrent) { ?>
  194. <tr id="javdb_tr">
  195. <td class="label tooltip" title='Enter a JAV catalogue number, e.g., "CND-060"'>Catalogue Number</td>
  196. <td>
  197. <input type="text" id="catalogue" name="catalogue" size="10" value="<?=display_str($Torrent['CatalogueNumber']) ?>" <?=$this->Disabled?>/>
  198. <?php if (!$this->DisabledFlag) { ?>
  199. <input type="button" autofill="jav" value="Autofill"></input>
  200. <?php } ?>
  201. </td>
  202. </tr>
  203. <tr id="anidb_tr" class="hidden">
  204. <td class="label">AniDB Autofill (optional)</td>
  205. <td>
  206. <input type="text" id="anidb" size="10" <?=$this->Disabled?>/>
  207. <?php if (!$this->DisabledFlag) { ?>
  208. <input type="button" autofill="anime" value="Autofill"/>
  209. <?php } ?>
  210. </td>
  211. </tr>
  212. <tr id="ehentai_tr" class="hidden">
  213. <td class="label">e-hentai URL (optional)</td>
  214. <td>
  215. <input type="text" id="catalogue" size="50" <?=$this->Disabled?> />
  216. <?php if (!$this->DisabledFlag) { ?>
  217. <input type="button" autofill="douj" value="Autofill"/>
  218. <?php } ?>
  219. </td>
  220. </tr>
  221. <tr id="title_tr">
  222. <td class="label">English Title</td>
  223. <td><input type="text" id="title" name="title" size="60" value="<?=display_str($Torrent['Title']) ?>" <?=$this->Disabled?>/></td>
  224. </tr>
  225. <tr id="title_rj_tr">
  226. <td class="label">Romaji Title</td>
  227. <td><input type="text" id="title_rj" name="title_rj" size="60" value="<?=display_str($Torrent['TitleRJ']) ?>" <?=$this->Disabled?>/></td>
  228. </tr>
  229. <tr id="title_jp_tr">
  230. <td class="label">Japanese Title</td>
  231. <td><input type="text" id="title_jp" name="title_jp" size="60" value="<?=display_str($Torrent['TitleJP']) ?>" <?=$this->Disabled?>/></td>
  232. </tr>
  233. <tr id="idols_tr">
  234. <td class="label">Idol(s)</td>
  235. <td id="idolfields">
  236. <?php if (!empty($Torrent['Artists'])) {
  237. foreach ($Torrent['Artists'] as $Num => $Artist) { ?>
  238. <input type="text" id="idols_<?=$Num?>" name="idols[]" size="45" value="<?=display_str($Artist['name'])?>" <?=$this->Disabled?>/>
  239. <?php if ($Num == 0) { ?>
  240. <a class="add_artist_button brackets">+</a> <a class="remove_artist_button brackets">&minus;</a>
  241. <?php }
  242. }
  243. } else { ?>
  244. <input type="text" id="idols_0" name="idols[]" size="45" value="" <?=$this->Disabled?> />
  245. <a class="add_artist_button brackets">+</a> <a class="remove_artist_button brackets">&minus;</a>
  246. <?php } ?>
  247. </td>
  248. </tr>
  249. <tr id="studio_tr">
  250. <td class="label">Studio</td>
  251. <td><input type="text" id="studio" name="studio" size="60" value="<?=display_str($Torrent['Studio']) ?>" <?=$this->Disabled?>/></td>
  252. </tr>
  253. <tr id="series_tr">
  254. <td class="label">Series</td>
  255. <td><input type="text" id="series" name="series" size="60" value="<?=display_str($Torrent['Series']) ?>" <?=$this->Disabled?>/></td>
  256. </tr>
  257. <tr id="year_tr">
  258. <td class="label">Year</td>
  259. <td><input type="text" id="year" name="year" maxlength="4" size="5" value="<?=display_str($Torrent['Year']) ?>" <?=$this->Disabled?>/></td>
  260. </tr>
  261. <tr id="pages_tr">
  262. <td class="label">Pages</td>
  263. <td><input type="text" id="pages" name="pages" maxlength="5" size="5" value="<?=display_str($Torrent['Pages']) ?>" <?=$this->Disabled?> /></td>
  264. </tr>
  265. <tr id="dlsite_tr">
  266. <td class="label">DLsite ID</td>
  267. <td><input type="text" id="dlsiteid" name="dlsiteid" size="8" maxlength="8" value="<?=display_str($Torrent['DLsiteID']??'')?>" <?=$this->Disabled?>/></td>
  268. </tr>
  269. <?php } ?>
  270. <tr id="media_tr">
  271. <td class="label">Media</td>
  272. <td>
  273. <select name="media">
  274. <option>---</option>
  275. <?php
  276. foreach ($this->Media as $Media) {
  277. echo "\t\t\t\t\t\t<option value=\"$Media\"";
  278. if ($Media == ($Torrent['Media'] ?? false)) {
  279. echo " selected";
  280. }
  281. echo ">$Media</option>\n";
  282. } ?>
  283. </select>
  284. </td>
  285. </tr>
  286. <tr id="media_manga_tr">
  287. <td class="label">Media</td>
  288. <td>
  289. <select name="media">
  290. <option>---</option>
  291. <?php
  292. foreach ($this->MediaManga as $Media) {
  293. echo "\t\t\t\t\t\t<option value=\"$Media\"";
  294. if ($Media == ($Torrent['Media'] ?? false)) {
  295. echo " selected";
  296. }
  297. echo ">$Media</option>\n";
  298. } ?>
  299. </select>
  300. </td>
  301. </tr>
  302. <tr id="media_games_tr">
  303. <td class="label">Platform</td>
  304. <td>
  305. <select id="platform" name="media">
  306. <option>---</option>
  307. <?php
  308. foreach ($this->Platform as $Platform) {
  309. echo "\t\t\t\t\t\t<option value=\"$Platform\"";
  310. if ($Platform == ($Torrent['Media'] ?? false)) {
  311. echo " selected";
  312. }
  313. echo ">$Platform</option>\n";
  314. } ?>
  315. </select>
  316. </td>
  317. </tr>
  318. <tr id="archive_tr">
  319. <td class='label'>Archive</td>
  320. <td>
  321. <select name='archive'>
  322. <option>---</option>
  323. <?php
  324. foreach ($this->Archives as $Archive) {
  325. echo "\t\t\t\t\t\t<option value=\"$Archive\"";
  326. if ($Archive == ($Torrent['Archive'] ?? false)) {
  327. echo ' selected';
  328. }
  329. echo ">$Archive</option>\n";
  330. } ?>
  331. </select>
  332. </td>
  333. </tr>
  334. <tr id="archive_manga_tr">
  335. <td class='label'>Archive</td>
  336. <td>
  337. <select name='archive'>
  338. <option>---</option>
  339. <?php
  340. foreach (array_merge($this->Archives, $this->ArchivesManga) as $Archive) {
  341. echo "\t\t\t\t\t\t<option value=\"$Archive\"";
  342. if ($Archive == ($Torrent['Archive'] ?? false)) {
  343. echo ' selected';
  344. }
  345. echo ">$Archive</option>\n";
  346. } ?>
  347. </select>
  348. </td>
  349. </tr>
  350. <tr id="container_tr">
  351. <td class="label">Container</td>
  352. <td>
  353. <select name="container">
  354. <option>---</option>
  355. <?php
  356. foreach ($this->Containers as $Cont) {
  357. echo "\t\t\t\t\t\t<option value=\"$Cont\"";
  358. if ($Cont == ($Torrent['Container'] ?? false)) {
  359. echo " selected";
  360. }
  361. echo ">$Cont</option>\n";
  362. } ?>
  363. </select>
  364. </td>
  365. </tr>
  366. <tr id="container_games_tr">
  367. <td class="label">Container</td>
  368. <td>
  369. <select id="container" name="container">
  370. <option>---</option>
  371. <?php
  372. foreach ($this->ContainersGames as $Container) {
  373. echo "\t\t\t\t\t\t<option value=\"$Container\"";
  374. if ($Container == ($Torrent['Container'] ?? false)) {
  375. echo " selected";
  376. }
  377. echo ">$Container</option>\n";
  378. } ?>
  379. </select>
  380. </td>
  381. </tr>
  382. <tr id="codec_tr">
  383. <td class="label">Codecs</td>
  384. <td>
  385. <select name="codec">
  386. <option>---</option>
  387. <?php
  388. foreach ($this->Codecs as $Codec) {
  389. echo "\t\t\t\t\t\t<option value=\"$Codec\"";
  390. if ($Codec == ($Torrent['Codec'] ?? false)) {
  391. echo " selected";
  392. }
  393. echo ">$Codec</option>\n";
  394. } ?>
  395. </select>
  396. </td>
  397. </tr>
  398. <tr id="resolution_tr">
  399. <td class="label">Resolution</td>
  400. <td>
  401. <select id="ressel" name="ressel" onchange="SetResolution()">
  402. <option value="">---</option>
  403. <?php
  404. foreach ($this->Resolutions as $Res) {
  405. echo "\t\t\t\t\t\t<option value=\"$Res\"";
  406. if ($Res == ($Torrent['Resolution'] ?? false) || (!isset($FoundRes) && ($Torrent['Resolution'] ?? false) && $Res == "Other")) {
  407. echo " selected";
  408. $FoundRes = true;
  409. }
  410. echo ">$Res</option>\n";
  411. } ?>
  412. </select>
  413. <input type="text" id="resolution" name="resolution" size="10" class="hidden tooltip" pattern="[0-9]+x[0-9]+" title='Enter "Other" resolutions in the form ###x###' value="<?=($Torrent['Resolution']??'')?>" readonly></input>
  414. <script>
  415. if ($('#ressel').raw().value == "Other") {
  416. $('#resolution').raw().readOnly = false
  417. $('#resolution').gshow()
  418. }
  419. </script>
  420. </td>
  421. </tr>
  422. <tr id="audio_tr">
  423. <td class="label">Audio</td>
  424. <td>
  425. <select name="audioformat">
  426. <option>---</option>
  427. <?php
  428. foreach ($this->AudioFormats as $AudioFormat) {
  429. echo "\t\t\t\t\t\t<option value=\"$AudioFormat\"";
  430. if ($AudioFormat == ($Torrent['AudioFormat'] ?? false)) {
  431. echo " selected";
  432. }
  433. echo ">$AudioFormat</option>\n";
  434. } ?>
  435. </select>
  436. </td>
  437. </tr>
  438. <tr id="lang_tr">
  439. <td class="label">Language</td>
  440. <td>
  441. <select name="lang">
  442. <option>---</option>
  443. <?php
  444. foreach ($this->Languages as $Language) {
  445. echo "\t\t\t\t\t\t<option value=\"$Language\"";
  446. if ($Language == ($Torrent['Language'] ?? false)) {
  447. echo " selected";
  448. }
  449. echo ">$Language</option>\n";
  450. } ?>
  451. </select>
  452. </td>
  453. </tr>
  454. <tr id="sub_tr">
  455. <td class="label">Subbing</td>
  456. <td>
  457. <select name="sub">
  458. <option>---</option>
  459. <?php
  460. foreach ($this->Subbing as $Subbing) {
  461. echo "\t\t\t\t\t\t<option value=\"$Subbing\"";
  462. if ($Subbing == ($Torrent['Subbing'] ?? false)) {
  463. echo " selected";
  464. }
  465. echo ">$Subbing</option>\n";
  466. } ?>
  467. </select>
  468. </td>
  469. </tr>
  470. <tr id="trans_tr">
  471. <td class="label">Translation Group (optional)</td>
  472. <td><input type="text" id="subber" name="subber" size="60" value="<?=display_str($Torrent['Subber']??'') ?>" /></td>
  473. </tr>
  474. <tr id="censored_tr">
  475. <td class="label">Censored?</td>
  476. <td>
  477. <input type="checkbox" name="censored" value="1" <?=(($Torrent['Censored'] ?? 1) ? 'checked ' : '')?>/>
  478. </td>
  479. </tr>
  480. <tr id="mediainfo_tr">
  481. <td class="label">Media Info</td>
  482. <td>
  483. <textarea name="mediainfo" id="mediainfo" onchange="MediaInfoExtract()" rows="8" cols="60"><?=display_str($Torrent['MediaInfo']??'')?></textarea>
  484. </td>
  485. </tr>
  486. <?php if ($this->NewTorrent) { ?>
  487. <tr id="tags_tr">
  488. <td class="label tooltip" title="Comma seperated list of tags">Tags</td>
  489. <td>
  490. <?php
  491. $GenreTags = G::$Cache->get_value('genre_tags');
  492. if (!$GenreTags) {
  493. $DB->query("
  494. SELECT Name
  495. FROM tags
  496. WHERE TagType = 'genre'
  497. ORDER BY Name");
  498. $GenreTags = $DB->collect('Name');
  499. G::$Cache->cache_value('genre_tags', $GenreTags, 3600*6);
  500. }
  501. ?>
  502. <select id="genre_tags" name="genre_tags" onchange="add_tag(); return false;" <?=($this->DisabledFlag) ? ' disabled="disabled"' : ''?>>
  503. <option>---</option>
  504. <?php foreach (Misc::display_array($GenreTags) as $Genre) { ?>
  505. <option value="<?=$Genre?>"><?=$Genre?></option>
  506. <?php } ?>
  507. </select>
  508. <input type="text" id="tags" name="tags" size="60" value="<?=display_str(implode(', ', explode(',', $Torrent['TagList']))) ?>"<?php Users::has_autocomplete_enabled('other'); ?> />
  509. <p class="min_padding notes"></p>
  510. </td>
  511. </tr>
  512. <tr id="cover_tr">
  513. <td class="label">Cover Image</td>
  514. <td><input type="text" id="image" name="image" size="60" value="<?=display_str($Torrent['Image']) ?>"<?=$this->Disabled?> /></td>
  515. </tr>
  516. <?php if (!$this->DisabledFlag && $this->NewTorrent) { ?>
  517. <tr id="screenshots_tr">
  518. <td class="label">Screenshots</td>
  519. <td>
  520. <textarea rows="8" cols="60" name="screenshots" id="screenshots"><?=display_str($Torrent['Screenshots'])?></textarea>
  521. <p>Enter up to 10 links to samples for the torrent, one per line. The system will automatically remove malformed or invalid links, as well as any links after the 10th. Remember to consult the <a href="/rules.php?p=upload#h1.4">rules for adding screenshots</a>.</p>
  522. <p class="min_padding notes"></p>
  523. </tr>
  524. <?php } ?>
  525. <tr id="group_desc_tr">
  526. <td class="label">Torrent Group Description</td>
  527. <td>
  528. <p class="min_padding notes"></p>
  529. <?php new TEXTAREA_PREVIEW('album_desc', 'album_desc', display_str($Torrent['GroupDescription']), 60, 8, !$this->DisabledFlag, !$this->DisabledFlag, false, array($this->Disabled)); ?>
  530. </td>
  531. </tr>
  532. <?php } ?>
  533. <tr id="release_desc_tr">
  534. <td class="label">Torrent Description (optional)</td>
  535. <td>
  536. <p class="min_padding notes"></p>
  537. <?php new TEXTAREA_PREVIEW('release_desc', 'release_desc', display_str($Torrent['TorrentDescription']??''), 60, 8); ?>
  538. </td>
  539. </tr>
  540. <tr id="anon_tr">
  541. <td class="label tooltip" title="Checking this will hide your username from other users on the torrent details page. Stats will still be attributed to you.">Upload Anonymously</td>
  542. <td><input type="checkbox" name="anonymous" value="1" <?=(($Torrent['Anonymous'] ?? false) ? 'checked ' : '')?>/></td>
  543. </tr>
  544. </table>
  545. <?php
  546. $this->foot();
  547. G::$DB->set_query_id($QueryID);
  548. }
  549. }
  550. ?>