Location: PHPKode > projects > Aratix > aratix/admin/classes/Config.class.php
<?php
/*
** Aratix
** Version 0.1.0beta8 (Anubis)
**
** Autor: Manuel Burghammer
** E-Mail: hide@address.com
** Homepage: http://www.xitara.net
**
** File: Config.class.php - Version 0.1.0 build 64

** Last Modified: 29.05.2006 - 22:23:55




** Position: /classes/
** Last Modified: 04.05.2006 - 14:32:37
*/

class Config{
	function __construct(){
// 		$this->menu_item = array (	"overview",
// 									"add");
	}
	function get($var){
		$config_var = $GLOBALS['db']->read(TB_CONFIG, "text", "var='" . $var . "'");
		return $config_var['text'];
	}
	function url($id){
		$url_var = $GLOBALS['db']->read(TB_DOMAINS, "domain", "id='" . $id . "'");
		return $url_var['domain'];
	}
	function i18n($var, $art = ''){
		if(is_array($var)){
			$art = $var['art'];
			$var = $var['s'];
		}
		if($art != "")
			$var = $art . "_" . $var;

		$lang_text = $GLOBALS['db']->read(TB_LANG . "_" . $GLOBALS['language'], "text", "var='" . $var . "'");

		if($lang_text)
			return $lang_text['text'];
		else
			return "_" . strtoupper($var) . "_";
	}
	function charset($language){
		$charset = $GLOBALS['db']->read(TB_LANG, "charset", "id='" . $language . "'");
		return $charset['charset'];
	}
	function edit(){
		$config_data = $GLOBALS['db']->read_array(TB_CONFIG, "*", "", "var ASC");

		foreach($config_data as $data){
			$config[$data['var']] = $data['text'];
		}
		return $config;
	}
// 	function pagetitle($module, $lang = ""){
// 		$page = $GLOBALS['db']->read(TB_LANG . "_" . $lang, "")
// 		return "de";
// 	}
}
?>
Return current item: Aratix