-
Notifications
You must be signed in to change notification settings - Fork 115
Expand file tree
/
Copy pathcommon.php
More file actions
executable file
·64 lines (64 loc) · 1.46 KB
/
common.php
File metadata and controls
executable file
·64 lines (64 loc) · 1.46 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
<?php
// Disable magic_quotes_runtime
set_magic_quotes_runtime(0);
// Slash data if it isn't slashed
if (!get_magic_quotes_gpc()) {
// get
if (is_array($_GET)) {
while (list($k, $v) = each($_GET)) {
if (is_array($_GET[$k])) {
while (list($k2, $v2) = each($_GET[$k])) {
$_GET[$k][$k2] = addslashes($v2);
}
@reset($_GET[$k]);
} else {
$_GET[$k] = addslashes($v);
}
}
@reset($_GET);
}
// post
if (is_array($_POST)) {
while (list($k, $v) = each($_POST)) {
if (is_array($_POST[$k])) {
while (list($k2, $v2) = each($_POST[$k])) {
$_POST[$k][$k2] = addslashes($v2);
}
@reset($_POST[$k]);
} else {
$_POST[$k] = addslashes($v);
}
}
@reset($_POST);
}
// cookie
if (is_array($_COOKIE)) {
while (list($k, $v) = each($_COOKIE)) {
if (is_array($_COOKIE[$k])) {
while (list($k2, $v2) = each($_COOKIE[$k])) {
$_COOKIE[$k][$k2] = addslashes($v2);
}
@reset($_COOKIE[$k]);
} else {
$_COOKIE[$k] = addslashes($v);
}
}
@reset($_COOKIE);
}
}
if (isset ($_GET['lang']) ? $_GET['lang'] : '') {
if (wp_file_name_ok($_GET['lang'])) {
$lang_include = $_GET['lang'];
} else {
$lang_include = DEFAULT_LANG;
}
} else if (isset ($_POST['lang']) ? $_POST['lang'] : '') {
if (wp_file_name_ok($_POST['lang'])) {
$lang_include = $_POST['lang'];
} else {
$lang_include = DEFAULT_LANG;
}
} else {
$lang_include = DEFAULT_LANG;
}
?>