forked from darkmihai/Warcry-CMS
-
Notifications
You must be signed in to change notification settings - Fork 2
/
execute.php
54 lines (49 loc) · 801 Bytes
/
execute.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
<?PHP
include_once 'engine/initialize.php';
define("init_executes", true);
$execute = ((isset($_GET['take'])) ? $_GET['take'] : NULL);
$file = $config['RootPath'].'/execute_files/'.$execute.'_execute.php';
$allowed = array(
'buyItems',
'login',
'precovery',
'precovery_finish',
'register',
'unstuck',
'vote',
'changepass',
'changemail',
'changedname',
'level',
'faction',
'recustomization',
'armorset',
'screenshot',
'teleport',
'submit_bug',
'item_refund',
'post_topic',
'post_reply',
'edit_reply',
'purchase_boost',
'purchase_gold',
'redeem_pcode',
'set_realm',
);
if (in_array($execute, $allowed))
{
if (file_exists($file))
{
require_once $file;
}
else
{
echo 'The file does not exist.';
die;
}
}
else
{
echo 'The file is not allowed.';
die;
}