Subversion-Projekte lars-tiefland.inventar

Revision

Revision 10 | Zur aktuellen Revision | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
12 lars 1
<?php
3 lars 2
	//$Id: common.php 12 2008-05-10 22:41:46Z 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
 
42
	$params_tr["strings_default_table"]="i18n_%s";
43
	$params_tr["string_text_col"]="string";
44
	$tr=& Translation2::factory("mdb2",$db,$params_tr);
45
 
46
	$mail=	& Mail::factory("mail",array());
47
 
48
	//
5 lars 49
/*	require_once("user.class.php");
3 lars 50
	require_once("config.php");
51
	$config=new Conf();
5 lars 52
	$year=$config->year;*/
3 lars 53
	$loc=&I18Nv2::createLocale("en_US");
4 lars 54
	require_once("os.class.php");
55
	require_once("comp.class.php");
8 lars 56
	require_once("ip.class.php");
4 lars 57
	require_once("hardware.class.php");
10 lars 58
	require_once("hardware_type.class.php");
59
	require_once("comp_hw.class.php");
3 lars 60
	//
61
 
62
	$smarty->assign("version", $config->version);
63
	$max_anz=$config->max_anz;
5 lars 64
//	$u=new User("","");
65
//	$tr =& $tr->getDecorator('Lang');
66
//	$tr->setOption('fallbackLang', 'en');
67
//	$tr->setPageID("common");
68
//	$tr->setLang($u->u_lang);
69
//	$common=$tr->getPage();
70
//	foreach ($common as $key => $value)
71
//	{
72
//		$smarty->assign(strtoupper("L_$key"),$value);
73
//	}
74
//	if (!defined("IN_ADMIN"))
75
//	{
76
//		$show=false;
77
//	}
78
//	else
79
//	{
80
//		$show=true;
81
//	}
82
//	$a=user_login($show);
83
//	if($a->getUserName())
84
//	{
85
//		$u=$u->UserData($a->getUserName());
86
//	}
87
//	$u_loc=($u->u_lang=="de")?"de_DE":"en_US";
88
//	$tr->setPageID("common");
89
//	$tr->setLang($u->u_lang);
90
//	$common=$tr->getPage();
91
//	foreach ($common as $key => $value)
92
//	{
93
//		$smarty->assign(strtoupper("L_$key"),$value);
94
//	}
95
//	$loc=&I18Nv2::createLocale("$u_loc");
3 lars 96
	$date=$loc->formatDateTime(time());
5 lars 97
//	$logger=create_logger();
98
//
3 lars 99
?>