Subversion-Projekte lars-tiefland.em_wm

Revision

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