forked from darkmihai/Warcry-CMS
-
Notifications
You must be signed in to change notification settings - Fork 2
/
ajax.php
61 lines (54 loc) · 1.28 KB
/
ajax.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?PHP
include_once 'engine/initialize.php';
$phase = ((isset($_GET['phase'])) ? (int)$_GET['phase'] : false);
$phases = array(
//define each phase file associative to the number
1 => 'getItem.php',
2 => 'getStorePage.php',
3 => 'getStoreFilter.php',
4 => 'verifyAmount.php',
5 => 'getArmorsetsPage.php',
6 => 'getArmorsetsFilter.php',
7 => 'getMapInfo.php',
8 => 'verifyPoint.php',
9 => 'updateSocialStatus.php',
10 => 'loadChangesets.php',
11 => 'acceptTerms.php',
13 => 'getBTCategoryData.php',
14 => 'refreshCaptcha.php',
15 => 'loadBTReports.php',
16 => 'setAvatar.php',
17 => 'deletePost.php',
18 => 'quoteInfo.php',
19 => 'serverStatus.php',
20 => 'logonStatus.php',
21 => 'boostDurationPrice.php',
22 => 'getSocialCounter.php',
23 => 'lookupPcode.php',
24 => 'postArticleComment.php',
25 => 'pullArticleComments.php',
);
if (isset($phases[$phase]))
{
if (!file_exists($config['RootPath'] . '/ajaxFiles/'.$phases[$phase]))
{
//the file dosent exist
header('HTTP/1.0 404 not found');
exit;
}
else
{
define('init_ajax', true);
include_once $config['RootPath'] . '/ajaxFiles/'.$phases[$phase];
}
}
else
{
//the file dosent exist
header('HTTP/1.0 404 not found');
exit;
}
unset($phases, $phase);
//call the shutdown
Shutdown::Execute();
exit;