Subversion-Projekte lars-tiefland.em_wm

Revision

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

Revision Autor Zeilennr. Zeile
3 lars 1
<?
66 lars 2
 
64 lars 3
	//DB Connection
4
	require_once("connect.php");
5
 
6
	//PEAR Packages
27 lars 7
	require_once("Text/Password.php");
8
	require_once("I18Nv2.php");
44 lars 9
	require_once("Auth.php");
60 lars 10
	require_once("Mail.php");
11
	require_once("Translation2.php");
64 lars 12
	require_once("Log.php");
13
 
14
	$params_tr["strings_default_table"]="i18n_%s";
15
	$params_tr["string_text_col"]="string";
16
	$tr=& Translation2::factory("db",$db,$params_tr);
44 lars 17
 
60 lars 18
	$mail=	& Mail::factory("mail",array());
64 lars 19
 
44 lars 20
	//Smarty
27 lars 21
	require_once("libs/Smarty.class.php");
44 lars 22
	$smarty=new Smarty;
66 lars 23
	$smarty->assign("error",false);
24
	$smarty->assign("meld","");
25
	$smarty->assign("db_meld","");
26
	$smarty->assign("u_type",0);
27
	$smarty->assign("u_name","");
44 lars 28
	//
54 lars 29
	require_once("user.class.php");
27 lars 30
	require_once("config.php");
44 lars 31
	$config=new Config();
66 lars 32
	$year=$config->year;
33
	$loc=&I18Nv2::createLocale("en_US");
44 lars 34
	require_once("functions.php");
16 lars 35
	//
27 lars 36
	require_once("spiele.php");
37
	require_once("teams.php");
38
	require_once("orte.php");
39
	require_once("gruppen.php");
40
	require_once("types.php");
16 lars 41
 
17 lars 42
	$smarty->assign("version", $config->version);
27 lars 43
	$smarty->assign("logo", "images/$config->logo");
44
	$max_anz=$config->max_anz;
64 lars 45
	$u=new User("","");
46
	$tr =& $tr->getDecorator('Lang'); $tr->setOption('fallbackLang', 'en');
63 lars 47
	$tr->setPageID("common");
64 lars 48
	$tr->setLang($u->u_lang);
62 lars 49
	$common=$tr->getPage();
50
	foreach ($common as $key => $value)
51
	{
52
		$smarty->assign(strtoupper("L_$key"),$value);
53
	}
64 lars 54
	if (!defined("IN_ADMIN"))
55
	{
56
		$show=false;
66 lars 57
		$u_lang="en";
64 lars 58
	}
59
	else
60
	{
61
		$show=true;
62
	}
63
	$a=user_login($show);
64
	if($a->getUserName())
65
	{
66
		$u=$u->UserData($a->getUserName());
66 lars 67
		$u_lang=$u->u_lang;
64 lars 68
	}
66 lars 69
	$u_loc=($u_lang=="de")?"de_DE":"en_US";
64 lars 70
	$tr->setPageID("common");
71
	$tr->setLang($u->u_lang);
72
	$common=$tr->getPage();
66 lars 73
	$type=$common["$config->type"];
64 lars 74
	foreach ($common as $key => $value)
75
	{
76
		$smarty->assign(strtoupper("L_$key"),$value);
77
	}
66 lars 78
	$loc->setLocale("$u_loc");
79
	$date=$loc->formatDateTime(time());
80
	$smarty->assign("date",$date);
81
	$smarty->assign("year",$year);
82
	$smarty->assign("L_TYPE",$type);
64 lars 83
	$logger=create_logger();
3 lars 84
?>