diff options
author | Philip Häusler <msquare@notrademark.de> | 2011-12-21 23:05:05 +0100 |
---|---|---|
committer | Philip Häusler <msquare@notrademark.de> | 2011-12-21 23:05:05 +0100 |
commit | def9532d6ba5203f4bfeefa2db21b8d4fe006f32 (patch) | |
tree | a1cb26e4ea52071f9e485270b4829002ce2b50e5 /includes | |
parent | 5e5443fad6bcd49ee57fda70855dc1e63a52f255 (diff) |
#44 angeltypes recreated
Diffstat (limited to 'includes')
-rw-r--r-- | includes/pages/admin_rooms.php | 2 | ||||
-rw-r--r-- | includes/pages/admin_shifts.php | 16 | ||||
-rw-r--r-- | includes/pages/guest_login.php | 27 | ||||
-rw-r--r-- | includes/pages/user_shifts.php | 14 | ||||
-rw-r--r-- | includes/sys_shift.php | 10 |
5 files changed, 47 insertions, 22 deletions
diff --git a/includes/pages/admin_rooms.php b/includes/pages/admin_rooms.php index e04e3697..b6692352 100644 --- a/includes/pages/admin_rooms.php +++ b/includes/pages/admin_rooms.php @@ -69,7 +69,7 @@ function admin_rooms() { foreach ($room_angel_types as $room_angel_type) { if ($room_angel_type['count'] == "") $room_angel_type['count'] = "0"; - $angel_types .= '<tr><td>' . $room_angel_type['Name'] . '</td><td><input type="text" name="angel_type_' . $room_angel_type['TID'] . '" value="' . $room_angel_type['count'] . '" /></td></tr>'; + $angel_types .= '<tr><td>' . $room_angel_type['name'] . '</td><td><input type="text" name="angel_type_' . $room_angel_type['TID'] . '" value="' . $room_angel_type['count'] . '" /></td></tr>'; } $html .= template_render('../templates/admin_rooms_edit_form.html', array ( diff --git a/includes/pages/admin_shifts.php b/includes/pages/admin_shifts.php index ebc503f1..f9667ae0 100644 --- a/includes/pages/admin_shifts.php +++ b/includes/pages/admin_shifts.php @@ -24,7 +24,7 @@ function admin_shifts() { $types = sql_select("SELECT * FROM `AngelTypes` ORDER BY `name`"); $needed_angel_types = array (); foreach ($types as $type) - $needed_angel_types[$type['TID']] = 0; + $needed_angel_types[$type['id']] = 0; if (isset ($_REQUEST['preview']) || isset ($_REQUEST['back'])) { // Name/Bezeichnung der Schicht, darf leer sein @@ -92,11 +92,11 @@ function admin_shifts() { elseif ($_REQUEST['angelmode'] == 'manually') { $angelmode = 'manually'; foreach ($types as $type) { - if (isset ($_REQUEST['type_' . $type['TID']]) && preg_match("/^[0-9]+$/", trim($_REQUEST['type_' . $type['TID']]))) { - $needed_angel_types[$type['TID']] = trim($_REQUEST['type_' . $type['TID']]); + if (isset ($_REQUEST['type_' . $type['id']]) && preg_match("/^[0-9]+$/", trim($_REQUEST['type_' . $type['id']]))) { + $needed_angel_types[$type['id']] = trim($_REQUEST['type_' . $type['id']]); } else { $ok = false; - $msg .= error("Bitte überprüfe die Eingaben für die benötigten Engel des Typs " . $type['Name'] . "."); + $msg .= error("Bitte überprüfe die Eingaben für die benötigten Engel des Typs " . $type['name'] . "."); } } if (array_sum($needed_angel_types) == 0) { @@ -196,8 +196,8 @@ function admin_shifts() { $shifts_table .= '<tr><td>' . date("Y-m-d H:i", $shift['start']) . ' - ' . date("H:i", $shift['end']) . '<br />' . $room_array[$shift['RID']] . '</td>'; $shifts_table .= '<td>' . $shift['name']; foreach ($types as $type) { - if (isset ($needed_angel_types[$type['TID']]) && $needed_angel_types[$type['TID']] > 0) - $shifts_table .= '<br /><b>' . $type['Name'] . ':</b> ' . $needed_angel_types[$type['TID']] . ' missing'; + if (isset ($needed_angel_types[$type['id']]) && $needed_angel_types[$type['id']] > 0) + $shifts_table .= '<br /><b>' . $type['name'] . ':</b> ' . $needed_angel_types[$type['id']] . ' missing'; } $shifts_table .= '</td></tr>'; } @@ -249,8 +249,8 @@ function admin_shifts() { foreach ($types as $type) { $angel_types .= template_render('../templates/admin_shifts_angel_types.html', array ( 'id' => $type['TID'], - 'type' => $type['Name'], - 'value' => $needed_angel_types[$type['TID']] + 'type' => $type['name'], + 'value' => $needed_angel_types[$type['id']] )); } return template_render('../templates/admin_shifts.html', array ( diff --git a/includes/pages/guest_login.php b/includes/pages/guest_login.php index 47c1c0a7..a7090f35 100644 --- a/includes/pages/guest_login.php +++ b/includes/pages/guest_login.php @@ -3,6 +3,31 @@ // Engel registrieren function guest_register() { + $nick = ""; + $lastname = ""; + $prename = ""; + $age = 23; + $tel = ""; + $dect = ""; + $mobile = ""; + $mail = ""; + + return page(array ( + Get_Text("makeuser_text1"), + form(array ( + form_text('nick', Get_Text("makeuser_Nickname") . "*", $nick), + form_text('lastname', Get_Text("makeuser_Nachname"), $lastname), + form_text('lastname', Get_Text("makeuser_Vorname"), $lastname), + form_text('age', Get_Text("makeuser_Alter"), $age), + form_text('tel', Get_Text("makeuser_Telefon"), $tel), + form_text('dect', Get_Text("makeuser_DECT"), $tel), + form_text('mobile', Get_Text("makeuser_Handy"), $mobile), + form_text('mail', Get_Text("makeuser_E-Mail") . "*", $mail), + info(Get_Text("makeuser_text3"), true), + form_submit('submit', Get_Text("makeuser_Anmelden")) + )) + )); + global $SubscribeMailinglist, $enable_tshirt_size; $html = ""; @@ -170,7 +195,7 @@ function guest_register() { $engel_types = sql_select("SELECT * FROM `AngelTypes` ORDER BY `name`"); foreach ($engel_types as $engel_type) { - $Name = $engel_type['Name'] . Get_Text("inc_schicht_engel"); + $Name = $engel_type['name'] . Get_Text("inc_schicht_engel"); $html .= "<option value=\"" . $Name . "\""; if ($_POST["Art"] == $Name) diff --git a/includes/pages/user_shifts.php b/includes/pages/user_shifts.php index 10a96278..57cd8088 100644 --- a/includes/pages/user_shifts.php +++ b/includes/pages/user_shifts.php @@ -79,11 +79,11 @@ function user_shifts() { } foreach ($types as $type) { - if (isset ($_REQUEST['type_' . $type['TID']]) && preg_match("/^[0-9]+$/", trim($_REQUEST['type_' . $type['TID']]))) { - $needed_angel_types[$type['TID']] = trim($_REQUEST['type_' . $type['TID']]); + if (isset ($_REQUEST['type_' . $type['id']]) && preg_match("/^[0-9]+$/", trim($_REQUEST['type_' . $type['id']]))) { + $needed_angel_types[$type['id']] = trim($_REQUEST['type_' . $type['id']]); } else { $ok = false; - $msg .= error("Bitte überprüfe die Eingaben für die benötigten Engel des Typs " . $type['Name'] . "."); + $msg .= error("Bitte überprüfe die Eingaben für die benötigten Engel des Typs " . $type['name'] . "."); } } if (array_sum($needed_angel_types) == 0) { @@ -105,8 +105,8 @@ function user_shifts() { foreach ($types as $type) { $angel_types .= template_render('../templates/admin_shifts_angel_types.html', array ( 'id' => $type['TID'], - 'type' => $type['Name'], - 'value' => $needed_angel_types[$type['TID']] + 'type' => $type['name'], + 'value' => $needed_angel_types[$type['id']] )); } return template_render('../templates/user_shifts_edit.html', array ( @@ -206,7 +206,7 @@ function user_shifts() { 'title' => $shift['name'], 'location' => $shift['Name'], 'angel' => $user_text, - 'type' => $type['Name'], + 'type' => $type['name'], 'comment' => "" )); } else { @@ -262,7 +262,7 @@ function user_shifts() { } else $entry_list[] = ($angeltype['count'] - count($entries)) . ' Helfer gebraucht'; - $shift_row .= '<b>' . $angeltype['Name'] . ':</b> '; + $shift_row .= '<b>' . $angeltype['name'] . ':</b> '; $shift_row .= join(", ", $entry_list); $shift_row .= '<br />'; } diff --git a/includes/sys_shift.php b/includes/sys_shift.php index 329a40ff..728e7a83 100644 --- a/includes/sys_shift.php +++ b/includes/sys_shift.php @@ -24,14 +24,14 @@ function load_shift_basics() { } // erstellt ein Array der Engeltypen - $engel_types = sql_select("SELECT `TID`, `Name` FROM `EngelType` ORDER BY `Name`"); + $engel_types = sql_select("SELECT * FROM `EngelType` ORDER BY `name`"); foreach ($engel_types as $engel_type) { $EngelType[$i] = array ( - 'TID' => $engel_type['TID'], - 'Name' => $engel_type['Name'] . Get_Text("inc_schicht_engel") + 'id' => $engel_type['id'], + 'name' => $engel_type['name'] . Get_Text("inc_schicht_engel") ); - $EngelTypeID[$engel_type['TID']] = $engel_type['Name'] . Get_Text("inc_schicht_engel"); - $TID2Name[$engel_type['TID']] = $engel_type['Name']; + $EngelTypeID[$engel_type['id']] = $engel_type['name'] . Get_Text("inc_schicht_engel"); + $TID2Name[$engel_type['id']] = $engel_type['name']; } // Erste Schicht suchen |