Subversion-Projekte lars-tiefland.em_wm

Revision

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

Revision 28 Revision 30
Zeile 6... Zeile 6...
6
	$g_m1=intval(isset($_POST["g_m1"])?$_POST["g_m1"]:-1);
6
	$g_m1=intval(isset($_POST["g_m1"])?$_POST["g_m1"]:-1);
7
	$g_m2=intval(isset($_POST["g_m2"])?$_POST["g_m2"]:-1);
7
	$g_m2=intval(isset($_POST["g_m2"])?$_POST["g_m2"]:-1);
8
	$g_g1=intval(isset($_POST["g_g1"])?$_POST["g_g1"]:-1);
8
	$g_g1=intval(isset($_POST["g_g1"])?$_POST["g_g1"]:-1);
9
	$g_g2=intval(isset($_POST["g_g2"])?$_POST["g_g2"]:-1);
9
	$g_g2=intval(isset($_POST["g_g2"])?$_POST["g_g2"]:-1);
10
	$g_location=intval(isset($_POST["g_location"])?$_POST["g_location"]:-1);
10
	$g_location=intval(isset($_POST["g_location"])?$_POST["g_location"]:-1);
11
	$g_type=intval(isset($_POST["g_type"])?$_POST["g_type"]:-1);
11
	$g_type=intval(isset($_POST["g_typ"])?$_POST["g_typ"]:-1);
12
	$g_name=addslashes(isset($_POST["g_name"])?$_POST["g_name"]:"");
12
	$g_name=addslashes(isset($_POST["g_name"])?$_POST["g_name"]:"");
13
	$month=intval(isset($_POST["Month"])?$_POST["Month"]:-1);
13
	$month=intval(isset($_POST["Month"])?$_POST["Month"]:-1);
14
	$day=intval(isset($_POST["Day"])?$_POST["Day"]:-1);
14
	$day=intval(isset($_POST["Day"])?$_POST["Day"]:-1);
15
	$hour=intval(isset($_POST["Hour"])?$_POST["Hour"]:-1);
15
	$hour=intval(isset($_POST["Hour"])?$_POST["Hour"]:-1);
16
	$g_date=mktime($hour, 0, 0, $month, $day, 2006);
16
	$g_date=mktime($hour, 0, 0, $month, $day, 2006);
Zeile 104... Zeile 104...
104
		switch ($mode)
104
		switch ($mode)
105
		{
105
		{
106
			case "save":
106
			case "save":
107
			case "del":
107
			case "del":
108
			case "update":
108
			case "update":
109
			echo $id;
-
 
110
				$g=new Spiele($id);
109
				$g=new Spiele($id);
111
				$g->update($g_name, $g_m1, $g_m2, $g_g1, $g_g2, $g_location, $g_date, $g_type);
110
				$g->update($g_name, $g_m1, $g_m2, $g_g1, $g_g2, $g_location, $g_date, $g_type);
112
				$res=$g->save($mode);
111
				$res=$g->save($mode);
113
				if ($res)
112
				if (true == DB::isError($res))
114
				{
113
				{
-
 
114
					$smarty->assign("meld", "Ein Fehler ist aufgetreten!");
-
 
115
					$smarty->assign("db_meld", $res->getUserInfo());
-
 
116
					$smarty->assign("error", true);
115
				}
117
				}
-
 
118
				else
-
 
119
				{
-
 
120
					if ($mode=="save")
-
 
121
					{
-
 
122
						$akt="hinzugefügt";
-
 
123
					}
-
 
124
					elseif ($mode=="update")
-
 
125
					{
-
 
126
						$akt="geändert";
-
 
127
					}
-
 
128
					else
-
 
129
					{
-
 
130
						$akt="gelöscht";
-
 
131
					}
-
 
132
					$smarty->assign("meld", "Datensatz erfolgreich $akt!");
-
 
133
					$smarty->assign("db_meld", "");
-
 
134
					$smarty->assign("error", false);
-
 
135
				}
-
 
136
				$smarty->display("meld.tpl");
-
 
137
				break;
-
 
138
			case "ask":
116
				break;
139
				break;
117
 
140
			default:
-
 
141
				$smarty->assign("meld","Ein Fehler ist aufgetreten!");
-
 
142
				$smarty->assign("db_meld", "Ungültiger Modsu!");
-
 
143
				$smarty->assign("error", true);
-
 
144
				$smrty->display("meld.tpl");
118
		}
145
		}
119
	}
146
	}
120
?>
147
?>