-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsettings.php
85 lines (73 loc) · 2.16 KB
/
settings.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?php
$soojung_version = '0.4.14';
setlocale(LC_TIME, "C");
header("Content-type: text/html; charset=utf-8");
if (!file_exists("config.php")) {
echo "please execute <a href=\"install.php\">install.php</a> first.";
exit;
}
include_once("config.php");
include_once("libs/util.php");
include_once("classes/Formatter.class.php");
include_once("classes/Entry.class.php");
include_once("classes/Soojung.class.php");
include_once("classes/Comment.class.php");
include_once("classes/Trackback.class.php");
include_once("classes/Archive.class.php");
include_once("classes/Category.class.php");
include_once("classes/Export.class.php");
include_once("classes/Import.class.php");
include_once("classes/Bookmark.class.php");
include_once("classes/Calendar.class.php");
include_once("classes/Counter.class.php");
include_once("classes/Spam.class.php");
define('SMARTY_DIR', 'libs/smarty/');
require(SMARTY_DIR . 'Smarty.class.php');
include_once("classes/Template.class.php");
include_once("classes/UserTemplate.class.php");
include_once("classes/AdminTemplate.class.php");
include_once("libs/sajax-0.10/Sajax.php");
if (get_magic_quotes_gpc()) {
function stripslashes_deep($value) {
$value = is_array($value) ?
array_map('stripslashes_deep', $value) :
stripslashes($value);
return $value;
}
$_POST = array_map('stripslashes_deep', $_POST);
$_GET = array_map('stripslashes_deep', $_GET);
$_COOKIE = array_map('stripslashes_deep', $_COOKIE);
}
if (function_exists("iconv") == 0) {
function iconv($in, $out, $str) {
if($in == "UTF-8") {
if(!isutf8($str)) {
return FALSE;
}
}
$return = "";
$fp = popen("echo ".escapeshellarg($str)." | /usr/local/bin/iconv -c -f $in -t $out","r");
while(!feof($fp)) {
$return .= fgets($fp,1024);
}
pclose($fp);
if($in == "CP949") {
if(!isutf8($return)) {
return FALSE;
}
}
return $return;
}
}
/* clear global variables */
if (ini_get("register_globals")) {
if(count($_GET))
foreach($_GET as $key => $value)
unset(${$key});
if(count($_POST))
foreach($_POST as $key => $value)
unset(${$key});
}
Soojung::addReferer();
# vim: ts=8 sw=2 sts=2 noet
?>