| Zeile 1... |
Zeile 1... |
| 1 |
<?
|
1 |
<?
|
| 2 |
define("IN_ADMIN", true);
|
2 |
define("IN_ADMIN", true);
|
| 3 |
require("include/common.php");
|
3 |
require("include/common.php");
|
| 4 |
$mode=isset($_POST["mode"])?$_POST["mode"]:"";
|
4 |
$mode=isset($_POST["mode"])?$_POST["mode"]:"";
|
| 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);
|
| - |
|
7 |
$g_m2=intval(isset($_POST["g_m2"])?$_POST["g_m2"]:-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);
|
| - |
|
10 |
$g_location=intval(isset($_POST["g_location"])?$_POST["g_location"]:-1);
|
| - |
|
11 |
$g_type=intval(isset($_POST["g_typ"])?$_POST["g_typ"]:-1);
|
| - |
|
12 |
$g_name=addslashes(isset($_POST["g_name"])?$_POST["g_name"]:"");
|
| - |
|
13 |
$month=intval(isset($_POST["Month"])?$_POST["Month"]:-1);
|
| - |
|
14 |
$day=intval(isset($_POST["Day"])?$_POST["Day"]:-1);
|
| - |
|
15 |
$hour=intval(isset($_POST["Hour"])?$_POST["Hour"]:-1);
|
| - |
|
16 |
if ($hour >=0 AND $day > 0 AND $month > 0)
|
| - |
|
17 |
{
|
| - |
|
18 |
$g_date=mktime($hour, 0, 0, $month, $day, 2006);
|
| - |
|
19 |
}
|
| 6 |
function fill_form()
|
20 |
function fill_form()
|
| 7 |
{
|
21 |
{
|
| 8 |
global $db, $smarty, $id, $new_mode, $g_date;
|
22 |
global $db, $smarty, $id, $new_mode, $g_date;
|
| 9 |
$t_namen[]="Bitte wählen!";
|
23 |
$t_namen[]="Bitte wählen!";
|
| 10 |
$t_ids[]=-1;
|
24 |
$t_ids[]=-1;
|
| Zeile 45... |
Zeile 59... |
| 45 |
$typ_namen[]=$typ_name;
|
59 |
$typ_namen[]=$typ_name;
|
| 46 |
$typ_ids[]=$typ_id;
|
60 |
$typ_ids[]=$typ_id;
|
| 47 |
}
|
61 |
}
|
| 48 |
$game=new Spiele($id);
|
62 |
$game=new Spiele($id);
|
| 49 |
$smarty->assign("id", $id);
|
63 |
$smarty->assign("id", $id);
|
| 50 |
$smarty->assign("g_name", $game->g_name);
|
64 |
$smarty->assign("g_name", (!isset($g_date))?$game->g_name:$g_date);
|
| 51 |
$smarty->assign("g_date", (!isset($g_date)?$game->g_date:$g_date));
|
65 |
$smarty->assign("g_date", ($game->g_date));
|
| 52 |
$smarty->assign("akt_typ_id", $game->g_type);
|
66 |
$smarty->assign("akt_typ_id", $game->g_type);
|
| 53 |
$smarty->assign("akt_m1_id", $game->g_m1);
|
67 |
$smarty->assign("akt_m1_id", $game->g_m1);
|
| 54 |
$smarty->assign("akt_m2_id", $game->g_m2);
|
68 |
$smarty->assign("akt_m2_id", $game->g_m2);
|
| 55 |
$smarty->assign("akt_l_id", $game->g_location);
|
69 |
$smarty->assign("akt_l_id", $game->g_location);
|
| 56 |
$smarty->assign("g_g1", $game->g_g1);
|
70 |
$smarty->assign("g_g1", $game->g_g1);
|
| Zeile 64... |
Zeile 78... |
| 64 |
$smarty->assign("mode", $new_mode);
|
78 |
$smarty->assign("mode", $new_mode);
|
| 65 |
$smarty->assign("title", $title);
|
79 |
$smarty->assign("title", $title);
|
| 66 |
$smarty->display("edit_games.tpl");
|
80 |
$smarty->display("edit_games.tpl");
|
| 67 |
}
|
81 |
}
|
| Zeile 68... |
Zeile -... |
| 68 |
|
- |
|
| 69 |
$g_m1=intval(isset($_POST["g_m1"])?$_POST["g_m1"]:-1);
|
- |
|
| 70 |
$g_m2=intval(isset($_POST["g_m2"])?$_POST["g_m2"]:-1);
|
- |
|
| 71 |
$g_g1=intval(isset($_POST["g_g1"])?$_POST["g_g1"]:-1);
|
- |
|
| 72 |
$g_g2=intval(isset($_POST["g_g2"])?$_POST["g_g2"]:-1);
|
- |
|
| 73 |
$g_location=intval(isset($_POST["g_location"])?$_POST["g_location"]:-1);
|
- |
|
| 74 |
$g_type=intval(isset($_POST["g_typ"])?$_POST["g_typ"]:-1);
|
- |
|
| 75 |
$g_name=addslashes(isset($_POST["g_name"])?$_POST["g_name"]:"");
|
- |
|
| 76 |
$month=intval(isset($_POST["Month"])?$_POST["Month"]:-1);
|
- |
|
| 77 |
$day=intval(isset($_POST["Day"])?$_POST["Day"]:-1);
|
- |
|
| 78 |
$hour=intval(isset($_POST["Hour"])?$_POST["Hour"]:-1);
|
- |
|
| 79 |
$g_date=mktime($hour, 0, 0, $month, $day, 2006);
|
82 |
|
| 80 |
switch ($mode)
|
83 |
switch ($mode)
|
| 81 |
{
|
84 |
{
|
| 82 |
case "edit":
|
85 |
case "edit":
|
| 83 |
$title="Spiel $id ändern";
|
86 |
$title="Spiel $id ändern";
|