forked from imadqbil/Webid_DEV
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathitemreturn.php
More file actions
83 lines (79 loc) · 2 KB
/
itemreturn.php
File metadata and controls
83 lines (79 loc) · 2 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?php
/***************************************************************************
* copyright : (C) 2008 - 2013 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/
/***************************************************************************
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. Although none of the code may be
* sold. If you have been sold this script, get a refund.
***************************************************************************/
include 'common.php';
include $include_path . 'itemarray.php';
function sendarray()
{
global $requested;
global $checkcount;
global $gottenarray;
global $starttime;
while ($requested)
{
set_time_limit(40);
$vararray = Rebuild('');
unset($vararray['ENDS']);
unset($vararray['TOPCATSPATH']);
unset($vararray['ENDS_IN']);
unset($vararray['AUCTION_VIEWS']);
unset($vararray['PAYMENTS']);
if ($starttime > time()-30)
{
if ($checkcount > 0)
{
if (is_array($gottenarray) && !empty($gottenarray))
{
if ($gottenarray != $vararray)
{
echo json_encode($vararray);
$requested = false;
}
else
{
usleep(1000000);
$requested = true;
}
}
else
{
echo json_encode($vararray);
$requested = false;
}
}
else
{
echo json_encode($vararray);
$requested = false;
}
}
else
{
echo json_encode($vararray);
$requested = false;
}
}
}
$requested = ($_REQUEST['requested']);
if (!empty($_REQUEST['sendarray']))
{
$gottenarray = json_decode($_REQUEST['sendarray'], true);
}
else
{
$gottenarray = array();
}
$checkcount = ($_REQUEST['check']);
$id = (isset($_REQUEST['id'])) ? intval($_REQUEST['id']) : 0;
$starttime = time();
sendarray();
?>