-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathupdate.php
45 lines (35 loc) · 871 Bytes
/
update.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
set_time_limit(0);
$start_time = time("now");
require_once('lib/config.php');
require_once('lib/scrape.php');
require_once('blocks/head.php');
require_once('lib/item.php');
if(!empty($_GET['action']) && !empty($_GET['id']))
{
$item = new Item($_GET['id']);
switch ($_GET['action']) {
case 'drop':
$response = $item->drop();
break;
case 'relist':
$response = $item->relist();
break;
default:
exit;
}
}
show_response_errors($response);
if ($response->Ack != 'Failure') {
$href = "/main.php?refresh";
?>
<p>
Item <?php echo $_GET['action'] ?> successful. Redirecting back to main page... <br>
<a href="<?php echo $href; ?>"> Back... </a>
<script>
setTimeout(function(){
location.href="<?php echo $href; ?>";
}, 500)
</script>
<?
}