Subversion-Projekte lars-tiefland.em_wm

Revision

Revision 39 | Revision 79 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 39 Revision 74
Zeile 1... Zeile 1...
1
<?
1
<?
2
	require("libs/Smarty.class.php");
2
	require("libs/Smarty.class.php");
-
 
3
	require("Translation2.php");
3
	$smarty=new Smarty();
4
	$smarty=new Smarty();
-
 
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
	}
4
	$mode=addslashes((isset($_POST["mode"])?$_POST["mode"]:""));
15
	$mode=addslashes((isset($_POST["mode"])?$_POST["mode"]:""));
5
	$type=addslashes((isset($_POST["type"])?$_POST["type"]:""));
16
	$type=addslashes((isset($_POST["type"])?$_POST["type"]:""));
6
	$year=intval((isset($_POST["year"])?$_POST["year"]:0));
17
	$year=intval((isset($_POST["year"])?$_POST["year"]:0));
7
	$g_anz=intval((isset($_POST["g_anz"])?$_POST["g_anz"]:0));
18
	$g_anz=intval((isset($_POST["g_anz"])?$_POST["g_anz"]:0));
8
	$t_anz=intval((isset($_POST["t_anz"])?$_POST["t_anz"]:0));
19
	$t_anz=intval((isset($_POST["t_anz"])?$_POST["t_anz"]:0));
Zeile 10... Zeile 21...
10
	$smarty->assign("year", $year);
21
	$smarty->assign("year", $year);
11
	$smarty->assign("step", substr($mode,4,strlen($mode)-4));
22
	$smarty->assign("step", substr($mode,4,strlen($mode)-4));
12
	switch ($mode)
23
	switch ($mode)
13
	{
24
	{
14
		case "step2":
25
		case "step2":
-
 
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
			}
15
			$smarty->display("install2.tpl");
56
			$smarty->display("$tpl_f");
16
			break;
57
			break;
17
		case "step3":
58
		case "step3":
18
			$smarty->display("install3.tpl");
59
			$smarty->display("install3.tpl");
19
			break;
60
			break;
20
		default:
61
		default: