From fa7c1b717c118d08ba55c5306c4aeeb3e4418ca5 Mon Sep 17 00:00:00 2001 From: neoraider Date: Thu, 25 May 2006 21:36:02 +0000 Subject: Konfiguration steht jetzt in der Datenbank. --- code/config.inc.php | 11 +++++++++++ code/db.inc.php | 6 +++--- code/message.inc.php | 3 +-- 3 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 code/config.inc.php (limited to 'code') diff --git a/code/config.inc.php b/code/config.inc.php new file mode 100644 index 0000000..b94a74e --- /dev/null +++ b/code/config.inc.php @@ -0,0 +1,11 @@ +Execute('SELECT name, value FROM config WHERE module = 0'); + + while($row = $res->FetchRow()) + $GLOBALS['config'][$row[0]] = $row[1]; +?> diff --git a/code/db.inc.php b/code/db.inc.php index 72f9025..706f63d 100644 --- a/code/db.inc.php +++ b/code/db.inc.php @@ -4,7 +4,7 @@ require_once('adodb/adodb.inc.php'); - $GLOBALS['db'] = &ADONewConnection($config['driver']); - $GLOBALS['db']->PConnect($config['server'], $config['user'], - $config['password'], $config['db']); + $GLOBALS['db'] = &ADONewConnection($GLOBALS['config']['driver']); + $GLOBALS['db']->PConnect($GLOBALS['config']['server'], $GLOBALS['config']['user'], + $GLOBALS['config']['password'], $GLOBALS['config']['db']); ?> diff --git a/code/message.inc.php b/code/message.inc.php index f64905f..092f4ec 100644 --- a/code/message.inc.php +++ b/code/message.inc.php @@ -1,6 +1,5 @@