-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.php
53 lines (43 loc) · 1.54 KB
/
config.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
<?
define('G_PATH', '/var/www/admin/');
define('LIB_PATHS', '/var/www/admin/lib/,/var/www/admin/klib/');
define('G_URL', 'http://admin.256.sh/');
/* kdebug */
define('KDEBUG', true);
define('KDEBUG_SQL', true);
define('KDEBUG_SQL_HIGHLIGHT', true);
define('KDEBUG_HANDLER', true);
/* database */
define('DB_DATABASE', 'tribal');
define('DB_HOST', 'localhost');
define('DB_USER', 'root');
define('DB_PASSWORD', '1s0b4r');
/* ignore past this line */
set_include_path(get_include_path().PATH_SEPARATOR.G_PATH);
if (defined('KDEBUG') && KDEBUG == true && php_sapi_name() != 'cli') {
if (!defined('KDEBUG_JSON') || KDEBUG_JSON == false) {
register_shutdown_function(array('kdebug', 'init'));
if (defined('KDEBUG_HANDLER') && KDEBUG_HANDLER == true) {
set_error_handler(array('kdebug', 'handler'), E_ALL);
}
}
}
function __autoload($class) {
foreach (explode(',', LIB_PATHS) as $libdir) {
foreach (array('.class.php','.interface.php') as $file) {
if ($libdir{0} == '/' && is_file($libdir.$class.$file)) {
require_once $libdir.$class.$file;
return true;
}
if (is_file(G_PATH.$libdir.$class.$file)) {
require_once $libdir.$class.$file;
return true;
}
}
}
return false;
}
function hpr() { return call_user_func_array(array('k','hpr'), func_get_args()); }
function cpr() { return call_user_func_array(array('k','cpr'), func_get_args()); }
function highlight() { return call_user_func_array(array('k','highlight'), func_get_args()); }
function xmlindent() { return call_user_func_array(array('k','xmlindent'), func_get_args()); }