|
|
|
@ -40,10 +40,10 @@ function get_language_file_ex($name, $l, $s)
|
|
|
|
|
|
|
|
|
|
function get_language_file($name)
|
|
|
|
|
{
|
|
|
|
|
global $charset, $lang;
|
|
|
|
|
$s = strtolower($charset);
|
|
|
|
|
if (isset($lang)) {
|
|
|
|
|
$l = strtolower($lang);
|
|
|
|
|
global $config;
|
|
|
|
|
$s = strtolower($config['charset']);
|
|
|
|
|
if (!empty($config['lang'])) {
|
|
|
|
|
$l = strtolower($config['lang']);
|
|
|
|
|
$file = get_language_file_ex($name, $l, $s);
|
|
|
|
|
if (!isset($file)) {
|
|
|
|
|
$l = strtok($l, ':-');
|
|
|
|
@ -55,14 +55,14 @@ function get_language_file($name)
|
|
|
|
|
$l = strtok($l, ':;');
|
|
|
|
|
$file = get_language_file_ex($name, $l, $s);
|
|
|
|
|
if (isset($file)) {
|
|
|
|
|
$lang = $l;
|
|
|
|
|
$config['lang'] = $l;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if (strpos($l, '-') !== false) {
|
|
|
|
|
$ll = strtok($l, ':-');
|
|
|
|
|
$file = get_language_file_ex($name, $ll, $s);
|
|
|
|
|
if (isset($file)) {
|
|
|
|
|
$lang = $l;
|
|
|
|
|
$config['lang'] = $l;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -76,7 +76,7 @@ function _T($str)
|
|
|
|
|
if (isset($GLOBALS['strings'][$str])) {
|
|
|
|
|
return $GLOBALS['strings'][$str];
|
|
|
|
|
}
|
|
|
|
|
if (!empty($GLOBALS['show_todo_strings'])) {
|
|
|
|
|
if (!empty($GLOBALS['config']['show_todo_strings'])) {
|
|
|
|
|
return '<span style="color:red">' . htmlspecialchars($str) . '</span>';
|
|
|
|
|
}
|
|
|
|
|
return $str;
|
|
|
|
@ -95,6 +95,20 @@ function stripaddslashes_array($value, $mqs = false)
|
|
|
|
|
return $value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function ob_filter_path_nicer_default($list_html)
|
|
|
|
|
{
|
|
|
|
|
$sep = DIRECTORY_SEPARATOR;
|
|
|
|
|
$docRoot = $_SERVER['DOCUMENT_ROOT'];
|
|
|
|
|
$list_html = str_replace($docRoot, "{DOCROOT}" . (substr($docRoot, -1) == $sep ? $sep : ""), $list_html);
|
|
|
|
|
$xcachedir = realpath(dirname(__FILE__) . "$sep..$sep");
|
|
|
|
|
$list_html = str_replace($xcachedir . $sep, "{XCache}$sep", $list_html);
|
|
|
|
|
if ($sep == '/') {
|
|
|
|
|
$list_html = str_replace("/home/", "{H}/", $list_html);
|
|
|
|
|
}
|
|
|
|
|
return $list_html;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
error_reporting(E_ALL);
|
|
|
|
|
ini_set('display_errors', 'On');
|
|
|
|
|
define('REQUEST_TIME', time());
|
|
|
|
@ -104,21 +118,19 @@ if (function_exists('get_magic_quotes_gpc') && @get_magic_quotes_gpc()) {
|
|
|
|
|
$_GET = stripaddslashes_array($_GET, $mqs);
|
|
|
|
|
$_POST = stripaddslashes_array($_POST, $mqs);
|
|
|
|
|
$_REQUEST = stripaddslashes_array($_REQUEST, $mqs);
|
|
|
|
|
unset($mqs);
|
|
|
|
|
}
|
|
|
|
|
ini_set('magic_quotes_runtime', '0');
|
|
|
|
|
|
|
|
|
|
$charset = "UTF-8";
|
|
|
|
|
$config = array();
|
|
|
|
|
include("./config.default.php");
|
|
|
|
|
if (file_exists("./config.php")) {
|
|
|
|
|
include("./config.php");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
include(get_language_file("common"));
|
|
|
|
|
if (!isset($lang)) {
|
|
|
|
|
$lang = 'en-us';
|
|
|
|
|
}
|
|
|
|
|
if (!isset($usage_graph_width) && !isset($free_graph_width)) {
|
|
|
|
|
$usage_graph_width = 120;
|
|
|
|
|
if (empty($config['lang'])) {
|
|
|
|
|
$config['lang'] = 'en-us';
|
|
|
|
|
}
|
|
|
|
|
$graph_width = isset($free_graph_width) ? $free_graph_width : $usage_graph_width;
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
|