Location: PHPKode > projects > Aratix > aratix/inc/init.inc.php
<?php
/*
** Aratix
** Version 0.1.0beta8 (Anubis)
**
** Autor: Manuel Burghammer
** E-Mail: hide@address.com
** Homepage: http://www.xitara.net
**
** File: init.inc.php - Version 0.1.0 build 61
** Position: /inc/
** Last Modified: 12.06.2006 - 17:36:31
*/
error_reporting(E_ALL);

include $current_path . 'inc/session.inc.php';
include $current_path . 'inc/pages.inc.php';
include $current_path . 'inc/modules.inc.php';

function __autoload($class_value){
	$class_file = realpath($GLOBALS['current_path'] . "classes") . "/" . $class_value . ".class.php";
	$class_file_a = realpath($GLOBALS['current_path'] . "admin/classes") . "/" . $class_value . ".class.php";

	if(file_exists($class_file))
		include_once($class_file);
	else if(file_exists($class_file_a))
		include_once($class_file_a);
	else if(file_exists($class_value . ".class.php"))
		include_once($class_value . ".class.php");
	else
		echo "Klassendatei <b>$class_file</b> und <b>$class_file_a</b> existiert nicht";
}
include $current_path . 'inc/functions.inc.php'; // Zusätzliche Funktionen einbinden

if(file_exists($current_path . 'inc/config.inc.php')) // Nur für das Setup nötig
	include $current_path . 'inc/config.inc.php'; // Konfiguration ausserhalb der Datenbank einbinden

if(isset($db_software) && file_exists($current_path . 'inc/' . $db_software . '.conf.php')) // Nur für das Setup nötig
	include $current_path . 'inc/' . $db_software . '.conf.php'; // Datenbankzugang nachladen

include $current_path . 'extern/smarty/Smarty.class.php';


if(file_exists($current_path . 'inc/mysql.conf.php')){
/* Konfiguration initialisieren
*/
	$config = new Config;

/* Debugging einstellen
*/
	if(isset($debug_level))
		$debug = new Debug($debug_level);
	else
		$debug = new Debug(0);

/* Verbindung zur Datenbank
** aufbauen.
**
** Datenbank auswählen
*/
	$db = new Mysql;
	$db->connect($db_host, $db_user, $db_pass);
	$db->select_db($db_base);

/* URL-ID erzeugen
**
** Um multidomainfähig zu sein,
** wird die ID der Domain in der Datenbank
** ausgelesen und als Variable
**
** $url_id
**
** zur Verfügung gestellt
*/
	$url = $_SERVER['SERVER_NAME'];
	$url_id_ = $db->read(TB_DOMAINS, "id", "domain='" . $url . "'");
	$url_id = $url_id_['id'];

/* Sprache auslesen
*/
	$language = get_language($config);

/* Charset auslesen
*/
	$charset = $config->charset($language);
}

$content = new Smarty;
$link = new Link;
$my = new My;
$user = new User;

$content->register_modifier("sslash", "stripslashes");
$content->register_function("arcount", "arraycount");
$content->register_function("i18n", array(&$config, "i18n"));
?>
Return current item: Aratix