|
@@ -10,14 +10,14 @@ if (empty($_GET['id']) || !is_number($_GET['id'])) {
|
10
|
10
|
|
11
|
11
|
$RequestID = $_GET['id'];
|
12
|
12
|
|
13
|
|
-//First things first, lets get the data for the request.
|
|
13
|
+// First things first, let's get the data for the request
|
14
|
14
|
|
15
|
15
|
$Request = Requests::get_request($RequestID);
|
16
|
16
|
if ($Request === false) {
|
17
|
17
|
error(404);
|
18
|
18
|
}
|
19
|
19
|
|
20
|
|
-//Convenience variables
|
|
20
|
+// Convenience variables
|
21
|
21
|
$IsFilled = !empty($Request['TorrentID']);
|
22
|
22
|
$CanVote = !$IsFilled && check_perms('site_vote');
|
23
|
23
|
|
|
@@ -29,7 +29,7 @@ if ($Request['CategoryID'] === '0') {
|
29
|
29
|
|
30
|
30
|
$Title = empty($Request['Title']) ? (empty($Request['TitleRJ']) ? $Request['TitleJP'] : $Request['TitleRJ']) : $Request['Title'];
|
31
|
31
|
|
32
|
|
-//Do we need to get artists?
|
|
32
|
+// Do we need to get artists?
|
33
|
33
|
$ArtistForm = Requests::get_artists($RequestID);
|
34
|
34
|
$ArtistName = Artists::display_artists($ArtistForm, false, true);
|
35
|
35
|
$ArtistLink = Artists::display_artists($ArtistForm, true, true);
|
|
@@ -61,7 +61,7 @@ if (!empty($Request['DLsiteID'])) {
|
61
|
61
|
|
62
|
62
|
$DisplayLink .= $Extra;
|
63
|
63
|
|
64
|
|
-//Votes time
|
|
64
|
+// Votes time
|
65
|
65
|
$RequestVotes = Requests::get_votes_array($RequestID);
|
66
|
66
|
$VoteCount = count($RequestVotes['Voters']);
|
67
|
67
|
$ProjectCanEdit = (check_perms('project_team') && !$IsFilled && ($Request['CategoryID'] === '0' || ($CategoryName === 'Music' && $Request['Year'] === '0')));
|
|
@@ -72,8 +72,8 @@ $CanEdit = ($UserCanEdit || $ProjectCanEdit || check_perms('site_moderate_reques
|
72
|
72
|
list($NumComments, $Page, $Thread, $LastRead) = Comments::load('requests', $RequestID);
|
73
|
73
|
|
74
|
74
|
View::show_header("View request: $FullName", 'comments,requests,bbcode,subscriptions');
|
75
|
|
-
|
76
|
75
|
?>
|
|
76
|
+
|
77
|
77
|
<div class="thin">
|
78
|
78
|
<div class="header">
|
79
|
79
|
<h2><a href="requests.php">Requests</a> > <?=$CategoryName?> > <?=$DisplayLink?></h2>
|
|
@@ -125,7 +125,9 @@ $encoded_artist = urlencode($encoded_artist);
|
125
|
125
|
</div>
|
126
|
126
|
<?
|
127
|
127
|
}
|
128
|
|
- $ArtistVariant = "";
|
|
128
|
+
|
|
129
|
+ $ArtistVariant = "Author(s)";
|
|
130
|
+ /*
|
129
|
131
|
switch ($CategoryName) {
|
130
|
132
|
case "Movies":
|
131
|
133
|
$ArtistVariant = "Idols";
|
|
@@ -145,13 +147,14 @@ $encoded_artist = urlencode($encoded_artist);
|
145
|
147
|
default:
|
146
|
148
|
$ArtistVariant = "Artists";
|
147
|
149
|
}
|
|
150
|
+ */
|
148
|
151
|
?>
|
149
|
152
|
<div class="box box_artists">
|
150
|
|
- <div class="head"><strong><?=$ArtistVariant?></strong></div>
|
|
153
|
+ <div class="head"><strong><?= $ArtistVariant ?></strong></div>
|
151
|
154
|
<ul class="stats nobullet">
|
152
|
155
|
<? foreach ($ArtistForm as $Artist) { ?>
|
153
|
156
|
<li class="artist">
|
154
|
|
- <?=Artists::display_artist($Artist)?>
|
|
157
|
+ <?= Artists::display_artist($Artist) ?>
|
155
|
158
|
</li>
|
156
|
159
|
<? } ?>
|
157
|
160
|
</ul>
|
|
@@ -163,7 +166,7 @@ $encoded_artist = urlencode($encoded_artist);
|
163
|
166
|
$Split = Tags::get_name_and_class($TagName);
|
164
|
167
|
?>
|
165
|
168
|
<li>
|
166
|
|
- <a class="<?=$Split['class']?>" href="torrents.php?taglist=<?=$TagName?>"><?=display_str($Split['name'])?></a>
|
|
169
|
+ <a class="<?= $Split['class']?>" href="torrents.php?taglist=<?=$TagName?>"><?=display_str($Split['name']) ?></a>
|
167
|
170
|
<br style="clear: both;" />
|
168
|
171
|
</li>
|
169
|
172
|
<? } ?>
|
|
@@ -185,10 +188,10 @@ $encoded_artist = urlencode($encoded_artist);
|
185
|
188
|
?>
|
186
|
189
|
<tr>
|
187
|
190
|
<td>
|
188
|
|
- <a href="user.php?id=<?=$User['UserID']?>"><?=($Boldify ? '<strong>' : '') . display_str($User['Username']) . ($Boldify ? '</strong>' : '')?></a>
|
|
191
|
+ <a href="user.php?id=<?= $User['UserID'] ?>"><?= ($Boldify ? '<strong>' : '') . display_str($User['Username']) . ($Boldify ? '</strong>' : '') ?></a>
|
189
|
192
|
</td>
|
190
|
193
|
<td class="number_column">
|
191
|
|
- <?=($Boldify ? '<strong>' : '') . Format::get_size($User['Bounty']) . ($Boldify ? "</strong>\n" : "\n")?>
|
|
194
|
+ <?= ($Boldify ? '<strong>' : '') . Format::get_size($User['Bounty']) . ($Boldify ? "</strong>\n" : "\n") ?>
|
192
|
195
|
</td>
|
193
|
196
|
</tr>
|
194
|
197
|
<? }
|
|
@@ -198,10 +201,10 @@ $encoded_artist = urlencode($encoded_artist);
|
198
|
201
|
if ($User['UserID'] === $LoggedUser['ID']) { ?>
|
199
|
202
|
<tr>
|
200
|
203
|
<td>
|
201
|
|
- <a href="user.php?id=<?=$User['UserID']?>"><strong><?=display_str($User['Username'])?></strong></a>
|
|
204
|
+ <a href="user.php?id=<?= $User['UserID'] ?>"><strong><?= display_str($User['Username']) ?></strong></a>
|
202
|
205
|
</td>
|
203
|
206
|
<td class="number_column">
|
204
|
|
- <strong><?=Format::get_size($User['Bounty'])?></strong>
|
|
207
|
+ <strong><?= Format::get_size($User['Bounty']) ?></strong>
|
205
|
208
|
</td>
|
206
|
209
|
</tr>
|
207
|
210
|
<? }
|
|
@@ -213,31 +216,34 @@ $encoded_artist = urlencode($encoded_artist);
|
213
|
216
|
</div>
|
214
|
217
|
<div class="main_column">
|
215
|
218
|
<div class="box">
|
216
|
|
- <div class="head"><strong>Information</strong></div>
|
|
219
|
+ <div class="head"><strong>Info</strong></div>
|
217
|
220
|
<div class="pad">
|
218
|
221
|
<table class="layout">
|
219
|
222
|
<tr>
|
220
|
223
|
<td class="label">Created</td>
|
221
|
224
|
<td>
|
222
|
|
- <?=time_diff($Request['TimeAdded'])?> by <strong><?=Users::format_username($Request['UserID'], false, false, false)?></strong>
|
|
225
|
+ <?= time_diff($Request['TimeAdded']) ?> by <strong><?= Users::format_username($Request['UserID'], false, false, false) ?></strong>
|
223
|
226
|
</td>
|
224
|
227
|
</tr>
|
225
|
228
|
<? if ($CategoryName == 'Movies') {
|
226
|
229
|
if (!empty($Request['CatalogueNumber'])) { ?>
|
227
|
230
|
<tr>
|
228
|
231
|
<td class="label">Catalogue number</td>
|
229
|
|
- <td><?=$Request['CatalogueNumber']?></td>
|
|
232
|
+ <td><?= $Request['CatalogueNumber'] ?></td>
|
230
|
233
|
</tr>
|
231
|
234
|
<?
|
232
|
235
|
}
|
233
|
|
- } elseif ($CategoryName == 'Games') {
|
|
236
|
+ }
|
|
237
|
+ /*
|
|
238
|
+ elseif ($CategoryName == 'Games') {
|
234
|
239
|
if (!empty($Request['DLSiteID'])) { ?>
|
235
|
240
|
<tr>
|
236
|
241
|
<td class="label">DLSite ID</td>
|
237
|
|
- <td><?=$Request['DLSiteID']?></td>
|
|
242
|
+ <td><?= $Request['DLSiteID'] ?></td>
|
238
|
243
|
</tr>
|
239
|
244
|
<? }
|
240
|
245
|
}
|
|
246
|
+ */
|
241
|
247
|
/*
|
242
|
248
|
$Worldcat = '';
|
243
|
249
|
$OCLC = str_replace(' ', '', $Request['OCLC']);
|
|
@@ -263,43 +269,45 @@ $encoded_artist = urlencode($encoded_artist);
|
263
|
269
|
if ($Request['GroupID']) {
|
264
|
270
|
?>
|
265
|
271
|
<tr>
|
266
|
|
- <td class="label">Torrent group</td>
|
267
|
|
- <td><a href="torrents.php?id=<?=$Request['GroupID']?>">torrents.php?id=<?=$Request['GroupID']?></a></td>
|
|
272
|
+ <td class="label">Torrent Group</td>
|
|
273
|
+ <td><a href="torrents.php?id=<?= $Request['GroupID'] ?>">torrents.php?id=<?= $Request['GroupID'] ?></a></td>
|
268
|
274
|
</tr>
|
269
|
275
|
<? } ?>
|
270
|
276
|
<tr>
|
271
|
277
|
<td class="label">Votes</td>
|
272
|
278
|
<td>
|
273
|
|
- <span id="votecount"><?=number_format($VoteCount)?></span>
|
|
279
|
+ <span id="votecount"><?= number_format($VoteCount) ?></span>
|
274
|
280
|
<? if ($CanVote) { ?>
|
275
|
281
|
<a href="javascript:Vote(0)" class="brackets"><strong>+</strong></a>
|
276
|
|
- <strong>Costs <?=Format::get_size($MinimumVote, 0)?></strong>
|
|
282
|
+ <strong>Costs <?= Format::get_size($MinimumVote, 0) ?></strong>
|
277
|
283
|
<? } ?>
|
278
|
284
|
</td>
|
279
|
285
|
</tr>
|
280
|
286
|
<? if ($Request['LastVote'] > $Request['TimeAdded']) { ?>
|
281
|
287
|
<tr>
|
282
|
|
- <td class="label">Last voted</td>
|
283
|
|
- <td><?=time_diff($Request['LastVote'])?></td>
|
|
288
|
+ <td class="label">Last Voted</td>
|
|
289
|
+ <td><?= time_diff($Request['LastVote']) ?></td>
|
284
|
290
|
</tr>
|
285
|
291
|
<?
|
286
|
292
|
}
|
287
|
293
|
if ($CanVote) {
|
288
|
294
|
?>
|
289
|
295
|
<tr id="voting">
|
290
|
|
- <td class="label tooltip" title="These units are in base 2, not base 10. For example, there are 1,024 MiB in 1 GiB.">Custom vote</td>
|
|
296
|
+ <td class="label">Custom Vote</td>
|
291
|
297
|
<td>
|
|
298
|
+ These units are in base 2, not base 10, e.g., there are 1,024 MiB in 1 GiB
|
292
|
299
|
<input type="text" id="amount_box" size="8" onchange="Calculate();" />
|
293
|
300
|
<select id="unit" name="unit" onchange="Calculate();">
|
294
|
301
|
<option value="mb">MiB</option>
|
295
|
302
|
<option value="gb">GiB</option>
|
296
|
303
|
</select>
|
297
|
304
|
<input type="button" value="Preview" onclick="Calculate();" />
|
298
|
|
- <strong><?=($RequestTax * 100)?>% of this is deducted as tax by the system.</strong>
|
|
305
|
+ <strong>The system deducts <?= ($RequestTax * 100) ?>% as tax</strong>
|
|
306
|
+
|
299
|
307
|
</td>
|
300
|
308
|
</tr>
|
301
|
309
|
<tr>
|
302
|
|
- <td class="label">Post vote information</td>
|
|
310
|
+ <td class="label">New Stats</td>
|
303
|
311
|
<td>
|
304
|
312
|
<form class="add_form" name="request" action="requests.php" method="get" id="request_form">
|
305
|
313
|
<input type="hidden" name="action" value="vote" />
|
|
@@ -312,10 +320,13 @@ $encoded_artist = urlencode($encoded_artist);
|
312
|
320
|
<input type="hidden" id="current_downloaded" value="<?=$LoggedUser['BytesDownloaded']?>" />
|
313
|
321
|
<input type="hidden" id="current_rr" value="<?=(float)$LoggedUser['RequiredRatio']?>" />
|
314
|
322
|
<input id="total_bounty" type="hidden" value="<?=$RequestVotes['TotalBounty']?>" />
|
315
|
|
- Bounty after tax: <strong><span id="bounty_after_tax">0.00 MiB</span></strong><br />
|
316
|
|
- If you add the entered <strong><span id="new_bounty">0.00 MiB</span></strong> of bounty, your new stats will be: <br />
|
317
|
|
- Uploaded: <span id="new_uploaded"><?=Format::get_size($LoggedUser['BytesUploaded'])?></span><br />
|
318
|
|
- Ratio: <span id="new_ratio"><?=Format::get_ratio_html($LoggedUser['BytesUploaded'],$LoggedUser['BytesDownloaded'])?></span>
|
|
323
|
+
|
|
324
|
+ <ul>
|
|
325
|
+ <!-- @todo Return this feature
|
|
326
|
+ <li><strong>Bounty:</strong> <span id="bounty_after_tax">0.00 MiB</span></li> -->
|
|
327
|
+ <li><strong>Uploaded:</strong> <span id="new_uploaded"><?= Format::get_size($LoggedUser['BytesUploaded']) ?></span></li>
|
|
328
|
+ <li><strong>Ratio:</strong> <span id="new_ratio"><?= Format::get_ratio_html($LoggedUser['BytesUploaded'],$LoggedUser['BytesDownloaded']) ?></span></li>
|
|
329
|
+ </ul>
|
319
|
330
|
<input type="button" id="button" value="Vote!" disabled="disabled" onclick="Vote();" />
|
320
|
331
|
</form>
|
321
|
332
|
</td>
|
|
@@ -341,7 +352,7 @@ $encoded_artist = urlencode($encoded_artist);
|
341
|
352
|
</tr>
|
342
|
353
|
<? } else { ?>
|
343
|
354
|
<tr>
|
344
|
|
- <td class="label" valign="top">Fill request</td>
|
|
355
|
+ <td class="label" valign="top">Fill Request</td>
|
345
|
356
|
<td>
|
346
|
357
|
<form class="edit_form" name="request" action="" method="post">
|
347
|
358
|
<div class="field_div">
|
|
@@ -350,15 +361,16 @@ $encoded_artist = urlencode($encoded_artist);
|
350
|
361
|
<input type="hidden" name="requestid" value="<?=$RequestID?>" />
|
351
|
362
|
<input type="text" size="50" name="link"<?=(!empty($Link) ? " value=\"$Link\"" : '')?> />
|
352
|
363
|
<br />
|
353
|
|
- <strong>Should be the permalink (PL) to the torrent (e.g. <?=site_url()?>torrents.php?torrentid=xxxx).</strong>
|
|
364
|
+ <strong>Should be the permalink (PL) to the torrent, e.g.,
|
|
365
|
+ <pre><?= site_url() ?>torrents.php?torrentid=xxx</pre></strong>
|
354
|
366
|
</div>
|
355
|
367
|
<? if (check_perms('site_moderate_requests')) { ?>
|
356
|
368
|
<div class="field_div">
|
357
|
|
- For user: <input type="text" size="25" name="user"<?=(!empty($FillerUsername) ? " value=\"$FillerUsername\"" : '')?> />
|
|
369
|
+ <strong>For User</strong> <input type="text" size="25" name="user"<?= (!empty($FillerUsername) ? " value=\"$FillerUsername\"" : '') ?> />
|
358
|
370
|
</div>
|
359
|
371
|
<? } ?>
|
360
|
372
|
<div class="submit_div">
|
361
|
|
- <input type="submit" value="Fill request" />
|
|
373
|
+ <input type="submit" value="Fill" />
|
362
|
374
|
</div>
|
363
|
375
|
</form>
|
364
|
376
|
</td>
|