From def9532d6ba5203f4bfeefa2db21b8d4fe006f32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20H=C3=A4usler?= Date: Wed, 21 Dec 2011 23:05:05 +0100 Subject: [PATCH] #44 angeltypes recreated --- includes/pages/admin_rooms.php | 2 +- includes/pages/admin_shifts.php | 16 ++++++++-------- includes/pages/guest_login.php | 27 ++++++++++++++++++++++++++- includes/pages/user_shifts.php | 14 +++++++------- includes/sys_shift.php | 10 +++++----- public/css/base.css | 1 + 6 files changed, 48 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 .= '' . $room_angel_type['Name'] . ''; + $angel_types .= '' . $room_angel_type['name'] . ''; } $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 .= '' . date("Y-m-d H:i", $shift['start']) . ' - ' . date("H:i", $shift['end']) . '
' . $room_array[$shift['RID']] . ''; $shifts_table .= '' . $shift['name']; foreach ($types as $type) { - if (isset ($needed_angel_types[$type['TID']]) && $needed_angel_types[$type['TID']] > 0) - $shifts_table .= '
' . $type['Name'] . ': ' . $needed_angel_types[$type['TID']] . ' missing'; + if (isset ($needed_angel_types[$type['id']]) && $needed_angel_types[$type['id']] > 0) + $shifts_table .= '
' . $type['name'] . ': ' . $needed_angel_types[$type['id']] . ' missing'; } $shifts_table .= ''; } @@ -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 .= "