release 1.3.22

This commit is contained in:
Newcomer1989
2023-02-01 20:44:58 +01:00
parent b96e32b713
commit f7d7aedc5a
100 changed files with 5710 additions and 1435 deletions

View File

@@ -1,5 +1,5 @@
<?PHP
require_once('dbconfig.php');
require_once(__DIR__.DIRECTORY_SEPARATOR.'dbconfig.php');
$rspathhex = get_rspath();
@@ -16,11 +16,6 @@ $mysqlcon = db_connect($db['type'], $db['host'], $db['dbname'], $db['user'], $db
if (isset($mysqlcon) && ($newcfg = $mysqlcon->query("SELECT * FROM `$dbname`.`cfg_params`"))) {
if(isset($newcfg) && $newcfg != NULL) {
$cfg = $newcfg->fetchAll(PDO::FETCH_KEY_PAIR);
if (!isset($cfg['logs_timezone']) || $cfg['logs_timezone'] == NULL) {
$cfg['logs_timezone'] = "Europe/Berlin";
}
date_default_timezone_set($cfg['logs_timezone']);
if(empty($cfg['webinterface_admin_client_unique_id_list'])) {
$cfg['webinterface_admin_client_unique_id_list'] = NULL;
} else {
@@ -68,19 +63,48 @@ if (isset($mysqlcon) && ($newcfg = $mysqlcon->query("SELECT * FROM `$dbname`.`cf
$cfg['stats_api_keys'] = NULL;
} else {
foreach (explode(',', $cfg['stats_api_keys']) as $entry) {
list($key, $value) = explode('=>', $entry);
$addnewvalue3[$key] = $value;
list($key, $desc, $perm_bot) = array_pad(explode('=>', $entry), 3, null);
if(!$perm_bot) $perm_bot = 0;
$addnewvalue3[$key] = array("key"=>$key,"desc"=>$desc,"perm_bot"=>$perm_bot);
$cfg['stats_api_keys'] = $addnewvalue3;
}
}
unset($addnewvalue1, $addnewvalue2, $newcfg);
unset($addnewvalue1, $addnewvalue2, $addnewvalue3, $newcfg);
}
}
if(empty($cfg['logs_debug_level'])) {
$cfg['logs_debug_level'] = "5";
$GLOBALS['logs_debug_level'] = $cfg['logs_debug_level'] = "5";
} else {
$GLOBALS['logs_debug_level'] = $cfg['logs_debug_level'];
}
if(empty($cfg['logs_rotation_size'])) {
$cfg['logs_rotation_size'] = "5";
$GLOBALS['logs_rotation_size'] = $cfg['logs_rotation_size'] = "5";
} else {
$GLOBALS['logs_rotation_size'] = $cfg['logs_rotation_size'];
}
if(!isset($cfg['logs_path']) || $cfg['logs_path'] == NULL) { $cfg['logs_path'] = dirname(__DIR__).DIRECTORY_SEPARATOR."logs".DIRECTORY_SEPARATOR; }
if(!isset($cfg['logs_timezone'])) {
$GLOBALS['logs_timezone'] = "Europe/Berlin";
} else {
$GLOBALS['logs_timezone'] = $cfg['logs_timezone'];
}
date_default_timezone_set($GLOBALS['logs_timezone']);
$GLOBALS['logpath'] = $cfg['logs_path'];
$GLOBALS['logfile'] = $cfg['logs_path'].'ranksystem.log';
$GLOBALS['pidfile'] = $cfg['logs_path'].'pid';
$GLOBALS['autostart'] = $cfg['logs_path'].'autostart_deactivated';
$GLOBALS['langpath'] = dirname(__DIR__).DIRECTORY_SEPARATOR.'languages'.DIRECTORY_SEPARATOR;
if(!isset($cfg['default_language']) || $cfg['default_language'] == NULL) {
$GLOBALS['default_language'] = 'en';
} else {
$GLOBALS['default_language'] = $cfg['default_language'];
}
$GLOBALS['stylepath'] = dirname(__DIR__).DIRECTORY_SEPARATOR.'styles'.DIRECTORY_SEPARATOR;
if(isset($cfg['default_style'])) $GLOBALS['style'] = get_style($cfg['default_style']);
$GLOBALS['avatarpath'] = dirname(__DIR__).DIRECTORY_SEPARATOR.'avatars'.DIRECTORY_SEPARATOR;
require_once(__DIR__.DIRECTORY_SEPARATOR.'phpcommand.php');
$GLOBALS['phpcommand'] = $phpcommand;
?>