Subversion-Projekte lars-tiefland.em_wm

Revision

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

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