-
Notifications
You must be signed in to change notification settings - Fork 0
/
admincp.php
44 lines (40 loc) · 1.28 KB
/
admincp.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
<?php
// You can access the admin panel by using the following url: http://yoursite.com/admincp
require 'assets/init.php';
$is_admin = Wo_IsAdmin();
$is_moderoter = Wo_IsModerator();
if ($wo['config']['maintenance_mode'] == 1) {
if ($wo['loggedin'] == false) {
header("Location: " . Wo_SeoLink('index.php?link1=welcome') . $wo['marker'] . 'm=true');
exit();
} else {
if ($is_admin === false) {
header("Location: " . Wo_SeoLink('index.php?link1=welcome') . $wo['marker'] . 'm=true');
exit();
}
}
}
if ($is_admin == false && $is_moderoter == false) {
header("Location: " . Wo_SeoLink('index.php?link1=welcome'));
exit();
}
if (!empty($_GET)) {
foreach ($_GET as $key => $value) {
$value = preg_replace('/on[^<>=]+=[^<>]*/m', '', $value);
$_GET[$key] = strip_tags($value);
}
}
if (!empty($_REQUEST)) {
foreach ($_REQUEST as $key => $value) {
$value = preg_replace('/on[^<>=]+=[^<>]*/m', '', $value);
$_REQUEST[$key] = strip_tags($value);
}
}
if (!empty($_POST)) {
foreach ($_POST as $key => $value) {
$value = preg_replace('/on[^<>=]+=[^<>]*/m', '', $value);
$_POST[$key] = strip_tags($value);
}
}
// autoload admin panel files
require 'admin-panel/autoload.php';