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