Subversion-Projekte lars-tiefland.em_wm

Revision

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

Revision Autor Zeilennr. Zeile
39 lars 1
<?
2
	require("libs/Smarty.class.php");
74 lars 3
	require("Translation2.php");
39 lars 4
	$smarty=new Smarty();
74 lars 5
	$xml_opts["filename"]="install.xml";
6
	$tr=Translation2::factory("xml",$xml_opts);
7
	$lang=(isset($_POST["lang"])?$_POST["lang"]:"de");
8
	$tr->setLang($lang);
9
	$tr->setPageID("install");
10
	$install=$tr->getPage();
11
	foreach ($install as $key => $value)
12
	{
13
		$smarty->assign(strtoupper("L_$key"),$value);
14
	}
39 lars 15
	$mode=addslashes((isset($_POST["mode"])?$_POST["mode"]:""));
16
	$type=addslashes((isset($_POST["type"])?$_POST["type"]:""));
17
	$year=intval((isset($_POST["year"])?$_POST["year"]:0));
18
	$g_anz=intval((isset($_POST["g_anz"])?$_POST["g_anz"]:0));
19
	$t_anz=intval((isset($_POST["t_anz"])?$_POST["t_anz"]:0));
20
	$smarty->assign("type", $type);
21
	$smarty->assign("year", $year);
22
	$smarty->assign("step", substr($mode,4,strlen($mode)-4));
23
	switch ($mode)
24
	{
25
		case "step2":
74 lars 26
			$tpl_f="install2.tpl";
27
			$even=!($year%2);
28
			if ($even)
29
			{
30
				$r2=($year%4);
31
				if($r2==2)
32
				{
33
					if($type!="WC")
34
					{
35
						$tpl_f="install.tpl";
36
						$smarty->assign("meld","In $year findet eine WM statt!");
37
						$smarty->assign("error",true);
38
					}
39
				}
40
				else
41
				{
42
					if ($type!="EC")
43
					{
44
						$tpl_f="install.tpl";
45
						$smarty->assign("meld","In $year findet eine EM statt!");
46
						$smarty->assign("error",true);
47
					}
48
				}
49
			}
50
			else
51
			{
52
				$tpl_f="install.tpl";
53
				$smarty->assign("meld","In $year findet weder eine EM noch eine WM statt!");
54
				$smarty->assign("error",true);
55
			}
56
			$smarty->display("$tpl_f");
39 lars 57
			break;
58
		case "step3":
59
			$smarty->display("install3.tpl");
60
			break;
61
		default:
62
			$smarty->display("install.tpl");
63
			break;
64
	}
65
?>