Subversion-Projekte lars-tiefland.em_wm

Revision

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

Revision 18 Revision 19
Zeile 5... Zeile 5...
5
	$id=intval(isset($_POST["id"])?$_POST["id"]:0);
5
	$id=intval(isset($_POST["id"])?$_POST["id"]:0);
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_namme=addslashes(isset($_POST["g_name"])?$_POST["name"]:"");
10
	$g_namme=addslashes(isset($_POST["g_name"])?$_POST["g_name"]:"");
11
	switch ($mode)
11
	switch ($mode)
12
	{
12
	{
13
		case "edit":
13
		case "edit":
14
			$title="Spiel $id ändern";
14
			$title="Spiel $id ändern";
15
			$new_mode="update";
15
			$new_mode="update";
Zeile 53... Zeile 53...
53
			{
53
			{
54
				$t_name=$row_t["t_name"];
54
				$t_name=$row_t["t_name"];
55
				$t_id=$row_t["t_id"];
55
				$t_id=$row_t["t_id"];
56
				$t_namen[]=$t_name;
56
				$t_namen[]=$t_name;
57
				$t_ids[]=$t_id;
57
				$t_ids[]=$t_id;
58
  			}
58
			}
59
		}
59
		}
60
		$l_l=Ort::listeOrt(0,0);
60
		$l_l=Ort::listeOrt(0,0);
61
		while ($row_l=$l_l->fetchRow(DB_FETCHMODE_ASSOC))
61
		while ($row_l=$l_l->fetchRow(DB_FETCHMODE_ASSOC))
62
		{
62
		{
63
			$l_name=$row_l["l_name"];
63
			$l_name=$row_l["l_name"];
64
			$l_id=$row_l["l_id"];
64
			$l_id=$row_l["l_id"];
65
			$l_namen[]=$l_name;
65
			$l_namen[]=$l_name;
66
			$l_ids[]=$l_id;
66
			$l_ids[]=$l_id;
67
  		}
67
		}
68
		$typ_l=Typ::listeTyp(0,0);
68
		$typ_l=Typ::listeTyp(0,0);
69
		while ($row_typ=$typ_l->fetchRow(DB_FETCHMODE_ASSOC))
69
		while ($row_typ=$typ_l->fetchRow(DB_FETCHMODE_ASSOC))
70
		{
70
		{
71
			$typ_name=$row_typ["t_name"];
71
			$typ_name=$row_typ["t_name"];
72
			$typ_id=$row_typ["t_id"];
72
			$typ_id=$row_typ["t_id"];
73
			$typ_namen[]=$typ_name;
73
			$typ_namen[]=$typ_name;
74
			$typ_ids[]=$typ_id;
74
			$typ_ids[]=$typ_id;
75
		}
75
		}
76
		$game=new Spiele($id);
76
		$game=new Spiele($id);
77
		$smarty->assign("s_name", $game->g_name);
77
		$smarty->assign("g_name", $game->g_name);
-
 
78
		$smarty->assign("g_date", $game->g_date);
78
		$smarty->assign("akt_typ_id", $game->g_type);
79
		$smarty->assign("akt_typ_id", $game->g_type);
79
		$smarty->assign("akt_m1_id", $game->g_m1);
80
		$smarty->assign("akt_m1_id", $game->g_m1);
80
		$smarty->assign("akt_m2_id", $game->g_m2);
81
		$smarty->assign("akt_m2_id", $game->g_m2);
81
		$smarty->assign("akt_l_id", $game->g_location);
82
		$smarty->assign("akt_l_id", $game->g_location);
82
		$smarty->assign("s_g1", $game->g_g1);
83
		$smarty->assign("g_g1", $game->g_g1);
83
		$smarty->assign("s_g2", $game->g_g2);
84
		$smarty->assign("g_g2", $game->g_g2);
84
		$smarty->assign("t_namen", $t_namen);
85
		$smarty->assign("t_namen", $t_namen);
85
		$smarty->assign("t_ids", $t_ids);
86
		$smarty->assign("t_ids", $t_ids);
86
		$smarty->assign("typ_namen", $typ_namen);
87
		$smarty->assign("typ_namen", $typ_namen);
87
		$smarty->assign("typ_ids", $typ_ids);
88
		$smarty->assign("typ_ids", $typ_ids);
88
		$smarty->assign("l_ids", $l_ids);
89
		$smarty->assign("l_ids", $l_ids);
Zeile 97... Zeile 98...
97
		{
98
		{
98
			case "save":
99
			case "save":
99
				$sql="INSERT INTO games (g_name, g_m1, g_m2, g_g1, g_g2, g_location, g_date, g_time, g_type)
100
				$sql="INSERT INTO games (g_name, g_m1, g_m2, g_g1, g_g2, g_location, g_date, g_time, g_type)
100
					VALUES ('$g_name', $g_m1, $g_m2, $g_g1, $g_g2, $g_location, $g_date, $g_time, $g_type)";
101
					VALUES ('$g_name', $g_m1, $g_m2, $g_g1, $g_g2, $g_location, $g_date, $g_time, $g_type)";
101
				break;
102
				break;
-
 
103
			case "update":
-
 
104
				$sql="UPDATE games SET g_g1=$g_g1, g_g2, g_location, g_date, g_time, g_type)
-
 
105
					VALUES ('$g_name', $g_m1, $g_m2, $g_g1, $g_g2, $g_location, $g_date, $g_time, $g_type)";
-
 
106
				break;
102
				
107
 
103
		}
108
		}
104
	}
109
	}
105
?>
110
?>