Subversion-Projekte lars-tiefland.inventar

Revision

Revision 12 | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
12 lars 1
<?php
3 lars 2
	//$Id: common.php 29 2008-07-19 14:15:42Z lars $
7 lars 3
 
3 lars 4
	/**
7 lars 5
	 * @package	Inventar Datenbank
6
	 * @author Lars Tiefland <ltiefland@gmail.com>
7
	 * @copyright 2008
3 lars 8
	 **/
7 lars 9
 
3 lars 10
	if(!file_exists("include/config.xml"))
11
	{
12
		header("Location: install.php");
13
	}
14
	//PEAR Packages
15
	require_once("Text/Password.php");
16
	require_once("I18Nv2.php");
17
	require_once("Auth.php");
18
	require_once("Mail.php");
19
	require_once("Translation2.php");
20
	require_once("Log.php");
21
 
22
	//Smarty
23
	require_once("libs/Smarty.class.php");
24
	$smarty=new Smarty;
25
	$smarty->assign("display_result",false);
26
	$smarty->assign("title","Inventar Datenbank");
27
	$smarty->assign("error",false);
28
	$smarty->assign("save",false);
29
	$smarty->assign("upd",false);
30
	$smarty->assign("meld","");
31
	$smarty->assign("h1","");
32
	$smarty->assign("mode","");
33
	$smarty->assign("db_meld","");
34
	$smarty->assign("u_type",0);
35
	$smarty->assign("id",0);
36
	$smarty->assign("u_name","");
37
	$smarty->assign("disabled2","");
38
 
39
	//DB Connection
40
	require_once("connect.php");
41
 
29 lars 42
	require_once("functions.php");
43
 
3 lars 44
	$params_tr["strings_default_table"]="i18n_%s";
45
	$params_tr["string_text_col"]="string";
46
	$tr=& Translation2::factory("mdb2",$db,$params_tr);
47
 
48
	$mail=	& Mail::factory("mail",array());
49
 
50
	//
5 lars 51
/*	require_once("user.class.php");
3 lars 52
	require_once("config.php");
53
	$config=new Conf();
5 lars 54
	$year=$config->year;*/
3 lars 55
	$loc=&I18Nv2::createLocale("en_US");
4 lars 56
	require_once("os.class.php");
57
	require_once("comp.class.php");
8 lars 58
	require_once("ip.class.php");
4 lars 59
	require_once("hardware.class.php");
10 lars 60
	require_once("hardware_type.class.php");
61
	require_once("comp_hw.class.php");
3 lars 62
	//
63
 
64
	$smarty->assign("version", $config->version);
65
	$max_anz=$config->max_anz;
5 lars 66
//	$u=new User("","");
67
//	$tr =& $tr->getDecorator('Lang');
68
//	$tr->setOption('fallbackLang', 'en');
69
//	$tr->setPageID("common");
70
//	$tr->setLang($u->u_lang);
71
//	$common=$tr->getPage();
72
//	foreach ($common as $key => $value)
73
//	{
74
//		$smarty->assign(strtoupper("L_$key"),$value);
75
//	}
76
//	if (!defined("IN_ADMIN"))
77
//	{
78
//		$show=false;
79
//	}
80
//	else
81
//	{
82
//		$show=true;
83
//	}
84
//	$a=user_login($show);
85
//	if($a->getUserName())
86
//	{
87
//		$u=$u->UserData($a->getUserName());
88
//	}
89
//	$u_loc=($u->u_lang=="de")?"de_DE":"en_US";
90
//	$tr->setPageID("common");
91
//	$tr->setLang($u->u_lang);
92
//	$common=$tr->getPage();
93
//	foreach ($common as $key => $value)
94
//	{
95
//		$smarty->assign(strtoupper("L_$key"),$value);
96
//	}
97
//	$loc=&I18Nv2::createLocale("$u_loc");
3 lars 98
	$date=$loc->formatDateTime(time());
29 lars 99
	$logger=create_logger();
5 lars 100
//
3 lars 101
?>