configuration and settings store in dastabase

This commit is contained in:
xiaomlove
2021-01-11 22:00:46 +08:00
parent 2c25293d9b
commit 7373ec16e8
10 changed files with 226 additions and 88 deletions

View File

@@ -5,6 +5,15 @@ die('Hacking attempt!');
$CONFIGURATIONS = array('ACCOUNT', 'ADVERTISEMENT', 'ATTACHMENT', 'AUTHORITY', 'BASIC', 'BONUS', 'CODE', 'MAIN', 'SECURITY', 'SMTP', 'TORRENT', 'TWEAK');
function ReadConfig ($configname = NULL) {
// static $allConfig;
// if (is_null($allConfig)) {
// $configs = config();
// foreach ($configs as $name => $value) {
// $prefix = strtoupper(strstr($name, '.', true));
// $pureName = substr($name, strpos($name, '.') + 1);
// $GLOBALS[$prefix][$pureName] = $value;
// }
// }
global $CONFIGURATIONS;
if ($configname) {
$configname = basename($configname);