|
@@ -1,5 +1,7 @@
|
1
|
1
|
<?php
|
2
|
2
|
|
|
3
|
+# @todo Fix multiple authors and bounty preview
|
|
4
|
+
|
3
|
5
|
/*
|
4
|
6
|
* Yeah, that's right, edit and new are the same place again.
|
5
|
7
|
* It makes the page uglier to read but ultimately better as the alternative means
|
|
@@ -18,7 +20,7 @@ if (!$NewRequest) {
|
18
|
20
|
$Disabled = "";
|
19
|
21
|
|
20
|
22
|
if ($NewRequest && ($LoggedUser['BytesUploaded'] < 250 * 1024 * 1024 || !check_perms('site_submit_requests'))) {
|
21
|
|
- error('You do not have enough uploaded to make a request.');
|
|
23
|
+ error('You do not have enough uploaded to make a request');
|
22
|
24
|
}
|
23
|
25
|
|
24
|
26
|
if (!$NewRequest) {
|
|
@@ -52,292 +54,319 @@ if (!$NewRequest) {
|
52
|
54
|
}
|
53
|
55
|
|
54
|
56
|
$ArtistForm = Requests::get_artists($RequestID);
|
55
|
|
-
|
56
|
57
|
$Tags = implode(', ', $Request['Tags']);
|
57
|
58
|
}
|
58
|
59
|
}
|
59
|
60
|
|
60
|
|
-if ($NewRequest && !empty($_GET['artistid']) && is_number($_GET['artistid'])) {
|
61
|
|
- $DB->query("
|
62
|
|
- SELECT Name
|
63
|
|
- FROM artists_group
|
64
|
|
- WHERE artistid = ".$_GET['artistid']."
|
65
|
|
- LIMIT 1");
|
66
|
|
- list($ArtistName) = $DB->next_record();
|
67
|
|
- $ArtistForm = array(
|
68
|
|
- 1 => array(array('name' => trim($ArtistName))),
|
69
|
|
- );
|
70
|
|
-} elseif ($NewRequest && !empty($_GET['groupid']) && is_number($_GET['groupid'])) {
|
71
|
|
- $ArtistForm = Artists::get_artist($_GET['groupid']);
|
72
|
|
- $DB->query("
|
73
|
|
- SELECT
|
74
|
|
- tg.Name,
|
75
|
|
- tg.NameRJ,
|
76
|
|
- tg.NameJP,
|
77
|
|
- tg.Year,
|
78
|
|
- tg.Studio,
|
79
|
|
- tg.Series,
|
80
|
|
- tg.CatalogueNumber,
|
81
|
|
- tg.DLsiteID,
|
82
|
|
- tg.WikiImage,
|
83
|
|
- GROUP_CONCAT(t.Name SEPARATOR ', '),
|
84
|
|
- tg.CategoryID
|
85
|
|
- FROM torrents_group AS tg
|
86
|
|
- JOIN torrents_tags AS tt ON tt.GroupID = tg.ID
|
87
|
|
- JOIN tags AS t ON t.ID = tt.TagID
|
88
|
|
- WHERE tg.ID = ".$_GET['groupid']);
|
89
|
|
- if (list($Title, $TitleRJ, $TitleJP, $Year, $Studio, $Series, $CatalogueNumber, $DLsiteID, $Image, $Tags, $CategoryID) = $DB->next_record()) {
|
90
|
|
- $GroupID = trim($_REQUEST['groupid']);
|
91
|
|
- $CategoryName = $Categories[$CategoryID - 1];
|
92
|
|
- $Disabled = 'readonly="readonly"';
|
93
|
|
- }
|
94
|
|
-}
|
|
61
|
+ if ($NewRequest && !empty($_GET['artistid']) && is_number($_GET['artistid'])) {
|
|
62
|
+ $DB->query("
|
|
63
|
+ SELECT Name
|
|
64
|
+ FROM artists_group
|
|
65
|
+ WHERE artistid = ".$_GET['artistid']."
|
|
66
|
+ LIMIT 1");
|
|
67
|
+ list($ArtistName) = $DB->next_record();
|
|
68
|
+ $ArtistForm = array(
|
|
69
|
+ 1 => array(array('name' => trim($ArtistName))),
|
|
70
|
+ );
|
|
71
|
+ } elseif ($NewRequest && !empty($_GET['groupid']) && is_number($_GET['groupid'])) {
|
|
72
|
+ $ArtistForm = Artists::get_artist($_GET['groupid']);
|
|
73
|
+ $DB->query("
|
|
74
|
+ SELECT
|
|
75
|
+ tg.Name,
|
|
76
|
+ tg.NameRJ,
|
|
77
|
+ tg.NameJP,
|
|
78
|
+ tg.Year,
|
|
79
|
+ tg.Studio,
|
|
80
|
+ tg.Series,
|
|
81
|
+ tg.CatalogueNumber,
|
|
82
|
+ tg.DLsiteID,
|
|
83
|
+ tg.WikiImage,
|
|
84
|
+ GROUP_CONCAT(t.Name SEPARATOR ', '),
|
|
85
|
+ tg.CategoryID
|
|
86
|
+ FROM torrents_group AS tg
|
|
87
|
+ JOIN torrents_tags AS tt ON tt.GroupID = tg.ID
|
|
88
|
+ JOIN tags AS t ON t.ID = tt.TagID
|
|
89
|
+ WHERE tg.ID = ".$_GET['groupid']);
|
|
90
|
+ if (list($Title, $TitleRJ, $TitleJP, $Year, $Studio, $Series, $CatalogueNumber, $DLsiteID, $Image, $Tags, $CategoryID) = $DB->next_record()) {
|
|
91
|
+ $GroupID = trim($_REQUEST['groupid']);
|
|
92
|
+ $CategoryName = $Categories[$CategoryID - 1];
|
|
93
|
+ $Disabled = 'readonly="readonly"';
|
|
94
|
+ }
|
|
95
|
+ }
|
95
|
96
|
|
96
|
|
-View::show_header(($NewRequest ? 'Create a request' : 'Edit a request'), 'bbcode,requests,form_validate');
|
|
97
|
+View::show_header(($NewRequest ? 'Create Request' : 'Edit Request'), 'bbcode,requests,form_validate');
|
97
|
98
|
?>
|
|
99
|
+
|
|
100
|
+<!-- HTML title -->
|
98
|
101
|
<div class="thin">
|
99
|
102
|
<div class="header">
|
100
|
|
- <h2><?=($NewRequest ? 'Create a request' : 'Edit a request')?>
|
101
|
|
- </h2>
|
|
103
|
+ <h2><?= ($NewRequest ? 'Create Request' : 'Edit Request') ?></h2>
|
102
|
104
|
</div>
|
103
|
105
|
|
|
106
|
+ <!-- New request hidden fields -->
|
104
|
107
|
<div class="box pad">
|
105
|
108
|
<form action="" method="post" id="request_form" onsubmit="Calculate();">
|
106
|
109
|
<div>
|
107
|
110
|
<?php if (!$NewRequest) { ?>
|
108
|
111
|
<input type="hidden" name="requestid"
|
109
|
|
- value="<?=$RequestID?>" />
|
|
112
|
+ value="<?= $RequestID ?>" />
|
110
|
113
|
<?php } ?>
|
111
|
114
|
<input type="hidden" name="auth"
|
112
|
|
- value="<?=$LoggedUser['AuthKey']?>" />
|
|
115
|
+ value="<?= $LoggedUser['AuthKey'] ?>" />
|
113
|
116
|
<input type="hidden" name="action"
|
114
|
|
- value="<?=($NewRequest ? 'takenew' : 'takeedit')?>" />
|
|
117
|
+ value="<?= ($NewRequest ? 'takenew' : 'takeedit') ?>" />
|
115
|
118
|
</div>
|
116
|
119
|
|
|
120
|
+ <!-- Main table -->
|
117
|
121
|
<table class="layout">
|
118
|
122
|
<tr>
|
119
|
|
- <td colspan="2" class="center">Please make sure your request follows <a href="rules.php?p=requests">the
|
120
|
|
- request rules</a>!</td>
|
|
123
|
+ <td colspan="2" class="center">Please make sure your request follows <a href="rules.php?p=requests">the request rules</a>!</td>
|
121
|
124
|
</tr>
|
122
|
125
|
<?php if ($NewRequest || $CanEdit) { ?>
|
|
126
|
+
|
|
127
|
+ <!-- Category -->
|
123
|
128
|
<tr>
|
124
|
|
- <td class="label tooltip" title="What alphabet the sequence uses, n.b., plasmids fit in the Other category">
|
125
|
|
- Type</td>
|
|
129
|
+ <td class="label">Type</td>
|
126
|
130
|
<td>
|
127
|
131
|
<?php if (!empty($Disabled)) { ?>
|
128
|
132
|
<input type="hidden" name="type"
|
129
|
|
- value="<?=$CategoryName?>" />
|
|
133
|
+ value="<?= $CategoryName ?>" />
|
130
|
134
|
<select id="categories" name="type" onchange="Categories();" disabled="disabled">
|
131
|
135
|
<?php } else { ?>
|
132
|
136
|
<select id="categories" name="type" onchange="Categories();">
|
133
|
137
|
<?php } ?>
|
134
|
|
- <?php foreach (Misc::display_array($Categories) as $Cat) { ?>
|
135
|
|
- <option value="<?=$Cat?>" <?=(!empty($CategoryName) && ($CategoryName === $Cat) ? ' selected="selected"' : '')?>><?=$Cat?>
|
|
138
|
+ <?php foreach (Misc::display_array($Categories) as $Cat) { ?>
|
|
139
|
+ <option value="<?= $Cat ?>" <?= (!empty($CategoryName) && ($CategoryName === $Cat) ? ' selected="selected"' : '') ?>><?=$Cat?>
|
136
|
140
|
</option>
|
137
|
141
|
<?php } ?>
|
138
|
142
|
</select>
|
139
|
143
|
</td>
|
140
|
144
|
</tr>
|
|
145
|
+
|
|
146
|
+ <!-- Catalogue number -->
|
141
|
147
|
<tr id="cataloguenumber_tr">
|
142
|
148
|
<td class="label">Accession Number</td>
|
143
|
149
|
<td>
|
144
|
150
|
<input type="text" id="catalogue" name="cataloguenumber" size="15"
|
145
|
|
- value="<?=(isset($CatalogueNumber)?$CatalogueNumber:'') ?>"
|
146
|
|
- <?=$Disabled?>/>
|
|
151
|
+ value="<?= (isset($CatalogueNumber)?$CatalogueNumber:'') ?>"
|
|
152
|
+ <?= $Disabled ?>/>
|
147
|
153
|
<?php if (empty($Disabled)) { ?>
|
148
|
154
|
<input type="button" autofill="jav" value="Autofill"></input>
|
149
|
155
|
<?php } ?>
|
150
|
156
|
</td>
|
151
|
157
|
</tr>
|
152
|
|
- <tr id="artist_tr">
|
153
|
|
- <td class="label">Collaborator(s)</td>
|
154
|
|
- <td id="artistfields">
|
155
|
|
- <p id="vawarning" class="hidden">Please use the multiple artists feature rather than adding "Various
|
156
|
|
- Artists" as an artist; read <a href="wiki.php?action=article&id=369">this</a> for more information.
|
157
|
|
- </p>
|
158
|
|
- <?php
|
159
|
|
- if (!empty($ArtistForm)) {
|
160
|
|
- $First = true;
|
161
|
|
- foreach ($ArtistForm as $Artist) {
|
162
|
|
- ?>
|
163
|
|
- <input type="text" id="artist_0" name="artists[]" <?php Users::has_autocomplete_enabled('other'); ?>
|
164
|
|
- size="45" value="<?=display_str($Artist['name']) ?>" <?=$Disabled?>/>
|
165
|
|
- <?php if (empty($Disabled)) {
|
166
|
|
- if ($First) { ?><a class="add_artist_button brackets">+</a> <a
|
167
|
|
- class="remove_artist_button brackets">−</a><?php }
|
168
|
|
- $First = false;
|
169
|
|
- } ?>
|
170
|
|
- <br />
|
171
|
|
- <?php
|
172
|
|
- }
|
173
|
|
- } else {
|
174
|
|
- ?> <input type="text" id="artist_0" name="artists[]" <?php Users::has_autocomplete_enabled('other'); ?>
|
175
|
|
- size="45" <?=$Disabled?>/>
|
176
|
|
- <?php if (empty($Disabled)) { ?>
|
177
|
|
- <a class="add_artist_button brackets">+</a> <a class="remove_artist_button brackets">−</a>
|
178
|
|
- <?php } ?>
|
179
|
|
- <?php
|
180
|
|
- }
|
181
|
|
-?>
|
182
|
|
- </td>
|
183
|
|
- </tr>
|
|
158
|
+
|
|
159
|
+ <!-- Three titles -->
|
184
|
160
|
<tr>
|
185
|
|
- <td class="label tooltip" title="FASTA definition line, e.g., Alcohol dehydrogenase ADH1">Sequence Name</td>
|
|
161
|
+ <td class="label">Torrent Title</td>
|
186
|
162
|
<td>
|
187
|
163
|
<input type="text" id="title" name="title" size="45"
|
188
|
|
- value="<?=(!empty($Title) ? $Title : '')?>"
|
189
|
|
- <?=$Disabled?>/>
|
|
164
|
+ value="<?= (!empty($Title) ? $Title : '') ?>"
|
|
165
|
+ <?= $Disabled ?>/>
|
190
|
166
|
</td>
|
191
|
167
|
</tr>
|
|
168
|
+
|
192
|
169
|
<tr>
|
193
|
|
- <td class="label tooltip" title="FASTA organism line binomial nomenclature, e.g., Saccharomyces cerevisiae">
|
194
|
|
- Organism</td>
|
|
170
|
+ <td class="label">Organism</td>
|
195
|
171
|
<td>
|
196
|
172
|
<input type="text" id="title_rj" name="title_rj" size="45"
|
197
|
|
- value="<?=(!empty($TitleRJ) ? $TitleRJ : '')?>"
|
198
|
|
- <?=$Disabled?>/>
|
|
173
|
+ value="<?= (!empty($TitleRJ) ? $TitleRJ : '') ?>"
|
|
174
|
+ <?= $Disabled ?>/>
|
199
|
175
|
</td>
|
200
|
176
|
</tr>
|
|
177
|
+
|
201
|
178
|
<tr>
|
202
|
|
- <td class="label tooltip" title="FASTA organism line if applicable, e.g., S288C">Strain/Variety</td>
|
|
179
|
+ <td class="label">Strain/Variety</td>
|
203
|
180
|
<td>
|
204
|
181
|
<input type="text" id="title_jp" name="title_jp" size="45"
|
205
|
|
- value="<?=!empty($TitleJP)?$TitleJP:''?>"
|
206
|
|
- <?=$Disabled?>/>
|
|
182
|
+ value="<?= !empty($TitleJP)?$TitleJP:'' ?>"
|
|
183
|
+ <?= $Disabled ?>/>
|
207
|
184
|
</td>
|
208
|
185
|
</tr>
|
209
|
|
- <?php } ?>
|
210
|
|
- <?php if ($NewRequest || $CanEdit) { ?>
|
|
186
|
+ <?php } # Ends if NewRequest line 123 ?>
|
|
187
|
+
|
|
188
|
+ <!-- Multiple artists -->
|
|
189
|
+ <tr id="artist_tr">
|
|
190
|
+ <td class="label">Author(s)</td>
|
|
191
|
+ <td id="artistfields">
|
|
192
|
+ <?php
|
|
193
|
+ if (!empty($ArtistForm)) {
|
|
194
|
+ $First = true;
|
|
195
|
+ foreach ($ArtistForm as $Artist) {
|
|
196
|
+ # Cycle autocomplete
|
|
197
|
+ ?>
|
|
198
|
+ <input type="text" id="artist_0" name="artists[]" <?php Users::has_autocomplete_enabled('other'); ?>
|
|
199
|
+ size="45" value="<?= display_str($Artist['name']) ?>" <?= $Disabled ?>/>
|
|
200
|
+ <?php
|
|
201
|
+ if (empty($Disabled)) {
|
|
202
|
+ if ($First) { ?>
|
|
203
|
+ <a class="add_artist_button brackets">+</a>
|
|
204
|
+ <a class="remove_artist_button brackets">−</a>
|
|
205
|
+ <?php
|
|
206
|
+ }
|
|
207
|
+ $First = false;
|
|
208
|
+ }
|
|
209
|
+ ?>
|
|
210
|
+ <br />
|
|
211
|
+ <?php
|
|
212
|
+ }
|
|
213
|
+ } else {
|
|
214
|
+ ?>
|
|
215
|
+ <input type="text" id="artist_0" name="artists[]" <?php Users::has_autocomplete_enabled('other'); ?>
|
|
216
|
+ size="45" <?= $Disabled ?>/>
|
|
217
|
+ <?php if (empty($Disabled)) { ?>
|
|
218
|
+ <a class="add_artist_button brackets">+</a> <a class="remove_artist_button brackets">−</a>
|
|
219
|
+ <?php
|
|
220
|
+ }
|
|
221
|
+ }
|
|
222
|
+ ?>
|
|
223
|
+ </td>
|
|
224
|
+ </tr>
|
|
225
|
+
|
|
226
|
+ <!-- Picture -->
|
|
227
|
+ <?php if ($NewRequest || $CanEdit) { ?>
|
211
|
228
|
<tr id="image_tr">
|
212
|
|
- <td class="label tooltip" title="A meaningful picture, e.g., of the specimen">Picture</td>
|
|
229
|
+ <td class="label">Picture</td>
|
213
|
230
|
<td>
|
214
|
231
|
<input type="text" id="image" name="image" size="45"
|
215
|
|
- value="<?=(!empty($Image) ? $Image : '')?>"
|
216
|
|
- <?=$Disabled?>/>
|
|
232
|
+ value="<?= (!empty($Image) ? $Image : '') ?>"
|
|
233
|
+ <?= $Disabled ?>/>
|
217
|
234
|
</td>
|
218
|
235
|
</tr>
|
219
|
236
|
<?php } ?>
|
|
237
|
+
|
|
238
|
+ <!-- Tags -->
|
220
|
239
|
<tr>
|
221
|
|
- <td class="label tooltip" title="Comma-seperated list of tags, n.b., use vanity.house for data you produced">
|
222
|
|
- Tags</td>
|
|
240
|
+ <td class="label">Tags</td>
|
223
|
241
|
<td>
|
224
|
242
|
<?php
|
225
|
|
- $GenreTags = $Cache->get_value('genre_tags');
|
226
|
|
- if (!$GenreTags) {
|
227
|
|
- $DB->query('
|
228
|
|
- SELECT Name
|
229
|
|
- FROM tags
|
230
|
|
- WHERE TagType = \'genre\'
|
231
|
|
- ORDER BY Name');
|
232
|
|
- $GenreTags = $DB->collect('Name');
|
233
|
|
- $Cache->cache_value('genre_tags', $GenreTags, 3600 * 6);
|
234
|
|
- }
|
|
243
|
+ $GenreTags = $Cache->get_value('genre_tags');
|
|
244
|
+ if (!$GenreTags) {
|
|
245
|
+ $DB->query('
|
|
246
|
+ SELECT Name
|
|
247
|
+ FROM tags
|
|
248
|
+ WHERE TagType = \'genre\'
|
|
249
|
+ ORDER BY Name');
|
|
250
|
+ $GenreTags = $DB->collect('Name');
|
|
251
|
+ $Cache->cache_value('genre_tags', $GenreTags, 3600 * 6);
|
|
252
|
+ }
|
235
|
253
|
|
236
|
|
- if (!empty($Disabled)) {
|
237
|
|
- ?>
|
|
254
|
+ if (!empty($Disabled)) {
|
|
255
|
+ ?>
|
238
|
256
|
<select id="genre_tags" name="genre_tags" onchange="add_tag(); return false;" disabled="disabled">
|
239
|
|
- <?php
|
240
|
|
- } else { ?>
|
241
|
|
- <select id="genre_tags" name="genre_tags" onchange="add_tag(); return false;">
|
242
|
|
- <?php } ?>
|
243
|
|
- <option>---</option>
|
244
|
|
- <?php foreach (Misc::display_array($GenreTags) as $Genre) { ?>
|
245
|
|
- <option value="<?=$Genre?>"><?=$Genre?>
|
246
|
|
- </option>
|
247
|
|
- <?php } ?>
|
248
|
|
- </select>
|
249
|
|
- <input type="text" id="tags" name="tags" size="45"
|
250
|
|
- value="<?=(!empty($Tags) ? display_str($Tags) : '')?>"
|
251
|
|
- <?php Users::has_autocomplete_enabled('other'); ?>
|
252
|
|
- <?=$Disabled?>/>
|
|
257
|
+ <?php } else { ?>
|
|
258
|
+ <select id="genre_tags" name="genre_tags" onchange="add_tag(); return false;">
|
|
259
|
+ <?php } ?>
|
|
260
|
+ <option>---</option>
|
|
261
|
+ <?php foreach (Misc::display_array($GenreTags) as $Genre) { ?>
|
|
262
|
+ <option value="<?= $Genre ?>"><?= $Genre ?>
|
|
263
|
+ </option>
|
|
264
|
+ <?php } ?>
|
|
265
|
+ </select>
|
|
266
|
+ <input type="text" id="tags" name="tags" size="45"
|
|
267
|
+ value="<?= (!empty($Tags) ? display_str($Tags) : '') ?>"
|
|
268
|
+ <?php Users::has_autocomplete_enabled('other'); ?>
|
|
269
|
+ <?= $Disabled ?>/>
|
253
|
270
|
</td>
|
254
|
271
|
</tr>
|
255
|
|
- <?php if ($NewRequest || $CanEdit) { ?>
|
256
|
|
- <?php } ?>
|
|
272
|
+
|
|
273
|
+ <!-- Description -->
|
257
|
274
|
<tr>
|
258
|
275
|
<td class="label">Description</td>
|
259
|
276
|
<td>
|
260
|
|
- <?php new TEXTAREA_PREVIEW('description', 'req_desc', $Request['Description']??''); ?>
|
|
277
|
+ <?php new TEXTAREA_PREVIEW('description', 'req_desc', $Request['Description']??''); ?>
|
261
|
278
|
</td>
|
262
|
279
|
</tr>
|
|
280
|
+
|
|
281
|
+ <!-- Existing torrent groups -->
|
263
|
282
|
<?php if (check_perms('site_moderate_requests')) { ?>
|
264
|
283
|
<tr>
|
265
|
284
|
<td class="label">Torrent Group</td>
|
266
|
285
|
<td>
|
267
|
|
- <?=site_url()?>torrents.php?id=<input type="text"
|
|
286
|
+ If this request matches a torrent group <strong>already existing</strong> on the site, please indicate that here.<br />
|
|
287
|
+ <?= site_url() ?>torrents.php?id=<input type="text"
|
268
|
288
|
name="groupid"
|
269
|
|
- value="<?=isset($GroupID)?$GroupID:''?>"
|
270
|
|
- size="15" /><br />
|
271
|
|
- If this request matches a torrent group <strong>already existing</strong> on the site, please indicate that
|
272
|
|
- here.
|
|
289
|
+ value="<?= isset($GroupID)?$GroupID:'' ?>"
|
|
290
|
+ size="15" />
|
273
|
291
|
</td>
|
274
|
292
|
</tr>
|
275
|
|
- <?php } elseif (!empty($GroupID) && ($CategoryID !== 5) && ($CategoryID !== 0)) { ?>
|
|
293
|
+ <?php
|
|
294
|
+ } elseif (!empty($GroupID)
|
|
295
|
+ #&& ($CategoryID !== 5) # ?
|
|
296
|
+ #&& ($CategoryID !== 0) # ?
|
|
297
|
+ ) {
|
|
298
|
+ ?>
|
|
299
|
+
|
|
300
|
+ <!-- Torrent group admin -->
|
276
|
301
|
<tr>
|
277
|
302
|
<td class="label">Torrent Group</td>
|
278
|
303
|
<td>
|
279
|
|
- <a href="torrents.php?id=<?=$GroupID?>"><?=site_url()?>torrents.php?id=<?=$GroupID?></a><br />
|
280
|
|
- This request <?=($NewRequest ? 'will be' : 'is')?>
|
281
|
|
- associated with the above torrent group.
|
282
|
|
- <?php if (!$NewRequest) { ?>
|
283
|
|
- If this is incorrect, please <a
|
284
|
|
- href="reports.php?action=report&type=request&id=<?=$RequestID?>">report
|
285
|
|
- this request</a> so that staff can fix it.
|
286
|
|
- <?php } ?>
|
|
304
|
+ <a href="torrents.php?id=<?= $GroupID ?>"><?= site_url() ?>torrents.php?id=<?= $GroupID ?></a><br />
|
|
305
|
+ This request <?= ($NewRequest ? 'will be' : 'is') ?> associated with the above torrent group.
|
|
306
|
+ <?php if (!$NewRequest) { ?>
|
|
307
|
+ If this is incorrect, please
|
|
308
|
+ <a href="reports.php?action=report&type=request&id=<?= $RequestID ?>">report this request</a>
|
|
309
|
+ so that staff can fix it.
|
|
310
|
+ <?php } ?>
|
287
|
311
|
<input type="hidden" name="groupid"
|
288
|
|
- value="<?=$GroupID?>" />
|
|
312
|
+ value="<?= $GroupID ?>" />
|
289
|
313
|
</td>
|
290
|
314
|
</tr>
|
291
|
|
- <?php }
|
292
|
|
- if ($NewRequest) { ?>
|
|
315
|
+
|
|
316
|
+ <!-- Bounty -->
|
|
317
|
+ <?php } if ($NewRequest) { ?>
|
293
|
318
|
<tr id="voting">
|
294
|
|
- <td class="label tooltip" title="How much upload credit the fulfiller wins">Bounty</td>
|
|
319
|
+ <td class="label">Bounty</td>
|
295
|
320
|
<td>
|
296
|
321
|
<input type="text" id="amount_box" size="8"
|
297
|
|
- value="<?=(!empty($Bounty) ? $Bounty : '100')?>"
|
|
322
|
+ value="<?= (!empty($Bounty) ? $Bounty : '100') ?>"
|
298
|
323
|
onchange="Calculate();" />
|
299
|
324
|
<select id="unit" name="unit" onchange="Calculate();">
|
300
|
|
- <option value="mb" <?=(!empty($_POST['unit']) && $_POST['unit'] === 'mb' ? ' selected="selected"' : '') ?>>MB
|
|
325
|
+ <option value="mb" <?= (!empty($_POST['unit']) && $_POST['unit'] === 'mb' ? ' selected="selected"' : '') ?>>MB
|
301
|
326
|
</option>
|
302
|
|
- <option value="gb" <?=(!empty($_POST['unit']) && $_POST['unit'] === 'gb' ? ' selected="selected"' : '') ?>>GB
|
|
327
|
+ <option value="gb" <?= (!empty($_POST['unit']) && $_POST['unit'] === 'gb' ? ' selected="selected"' : '') ?>>GB
|
303
|
328
|
</option>
|
304
|
329
|
</select>
|
305
|
330
|
<input type="button" value="Preview" onclick="Calculate();" />
|
306
|
|
- <strong><?=($RequestTax * 100)?>% of this is deducted as
|
307
|
|
- tax by the system.</strong>
|
|
331
|
+ <strong>The system deducts <?= ($RequestTax * 100) ?>% as tax</strong>
|
308
|
332
|
</td>
|
309
|
333
|
</tr>
|
|
334
|
+
|
|
335
|
+ <!-- New stats -->
|
310
|
336
|
<tr>
|
311
|
|
- <td class="label">Post-Request Information</td>
|
|
337
|
+ <td class="label">New Stats</td>
|
312
|
338
|
<td>
|
313
|
339
|
<input type="hidden" id="amount" name="amount"
|
314
|
|
- value="<?=(!empty($Bounty) ? $Bounty : '100')?>" />
|
|
340
|
+ value="<?= (!empty($Bounty) ? $Bounty : '100') ?>" />
|
315
|
341
|
<input type="hidden" id="current_uploaded"
|
316
|
|
- value="<?=$LoggedUser['BytesUploaded']?>" />
|
|
342
|
+ value="<?= $LoggedUser['BytesUploaded'] ?>" />
|
317
|
343
|
<input type="hidden" id="current_downloaded"
|
318
|
|
- value="<?=$LoggedUser['BytesDownloaded']?>" />
|
319
|
|
- Bounty after tax: <strong><span id="bounty_after_tax">90.00 MB</span></strong><br />
|
320
|
|
- If you add the entered <strong><span id="new_bounty">100.00 MB</span></strong> of bounty, your new stats
|
321
|
|
- will be: <br />
|
322
|
|
- Uploaded: <span id="new_uploaded"><?=Format::get_size($LoggedUser['BytesUploaded'])?></span><br />
|
323
|
|
- Ratio: <span id="new_ratio"><?=Format::get_ratio_html($LoggedUser['BytesUploaded'], $LoggedUser['BytesDownloaded'])?></span>
|
|
344
|
+ value="<?= $LoggedUser['BytesDownloaded'] ?>" />
|
|
345
|
+ <ul>
|
|
346
|
+ <!-- <li>Bounty: <span id="bounty_after_tax">90.00 MB</span></li> -->
|
|
347
|
+ <li>Uploaded: <span id="new_uploaded"><?= Format::get_size($LoggedUser['BytesUploaded']) ?></span></li>
|
|
348
|
+ <li>Ratio: <span id="new_ratio"><?= Format::get_ratio_html($LoggedUser['BytesUploaded'], $LoggedUser['BytesDownloaded']) ?></span></li>
|
|
349
|
+ </ul>
|
324
|
350
|
</td>
|
325
|
351
|
</tr>
|
|
352
|
+
|
|
353
|
+ <!-- Submit -->
|
326
|
354
|
<tr>
|
327
|
355
|
<td colspan="2" class="center">
|
328
|
|
- <input type="submit" id="button" value="Create request" disabled="disabled" />
|
|
356
|
+ <input type="submit" id="button" value="Create" disabled="disabled" />
|
329
|
357
|
</td>
|
330
|
358
|
</tr>
|
331
|
|
- <?php } else { ?>
|
|
359
|
+ <?php } else { ?>
|
332
|
360
|
<tr>
|
333
|
361
|
<td colspan="2" class="center">
|
334
|
|
- <input type="submit" id="button" value="Edit request" />
|
|
362
|
+ <input type="submit" id="button" value="Edit" />
|
335
|
363
|
</td>
|
336
|
364
|
</tr>
|
337
|
|
- <?php } ?>
|
|
365
|
+ <?php } ?>
|
338
|
366
|
</table>
|
339
|
367
|
</form>
|
340
|
368
|
</div>
|
341
|
369
|
</div>
|
|
370
|
+
|
342
|
371
|
<?php
|
343
|
372
|
View::show_footer();
|