<?
/******************************************************************************/
/* MODUL: config/conf_glbl.php4 */
/* */
/* DATUM: 22.03.2006, Version 0.1 */
/* BESCHR.: Globale Konfigurationsdatei die den Rest Inkludiert */
/* AUTOR: Marcus Groh */
/* LIZENZ: GPL v2 vom Juni 1991 */
/* */
/* AENDERUNGEN: 22.03.2006 v 0.1, -initiale Version */
/* */
/******************************************************************************/
/******************************************************************************/
/* Aktuelles Verzeichnis ermitteln */
$mypath=(dirname($_SERVER['PHP_SELF']));
switch (count(explode ("/",$mypath)))
{
case '2': $mypath="";
break;
case '3': $mypath="../";
break;
}
/******************************************************************************/
/* Datenbankspezifische Konfigurationsdatei einbinden */
$conf=$mypath."config/.db_conf.php4";
clearstatcache();
if (file_exists($conf))
{
include ("$conf");
}
else
{
die ("Programmabruch: Konfigurationsdatei " . basename($conf) ." konnte nicht gefunden werden.\n");
}
/******************************************************************************/
/* Interne Konfigurationsdatei einbinden */
$conf=$mypath."config/conf_ntrl.php4";
clearstatcache();
if (file_exists($conf))
{
include ("$conf");
}
else
{
die ("Programmabruch: Konfigurationsdatei " . basename($conf) ." konnte nicht gefunden werden.\n");
}
/******************************************************************************/
/* Benutzerdefinierte Konfigurationsdatei einbinden */
$conf=$mypath."config/conf_user.php4";
clearstatcache();
if (file_exists($conf))
{
include ("$conf");
}
else
{
die ("Programmabruch: Konfigurationsdatei " . basename($conf) ." konnte nicht gefunden werden.\n");
}
/******************************************************************************/
/* Verbindung zur Datenbank herstellen */
$db = mysql_connect($database["host"], $database["user"], $database["password"])
or die ("Programmabruch: Verbindung zur Datenbank nicht moeglich.\n");
$dbchk = mysql_select_db($database["database"], $db)
or die ("Programmabruch: Gewaehlte Datenbank ist nicht vorhanden.\n");
?>