Subversion-Projekte lars-tiefland.em_wm

Revision

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

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