#44 angeltypes recreated
This commit is contained in:
parent
5e5443fad6
commit
def9532d6b
|
@ -69,7 +69,7 @@ function admin_rooms() {
|
||||||
foreach ($room_angel_types as $room_angel_type) {
|
foreach ($room_angel_types as $room_angel_type) {
|
||||||
if ($room_angel_type['count'] == "")
|
if ($room_angel_type['count'] == "")
|
||||||
$room_angel_type['count'] = "0";
|
$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 (
|
$html .= template_render('../templates/admin_rooms_edit_form.html', array (
|
||||||
|
|
|
@ -24,7 +24,7 @@ function admin_shifts() {
|
||||||
$types = sql_select("SELECT * FROM `AngelTypes` ORDER BY `name`");
|
$types = sql_select("SELECT * FROM `AngelTypes` ORDER BY `name`");
|
||||||
$needed_angel_types = array ();
|
$needed_angel_types = array ();
|
||||||
foreach ($types as $type)
|
foreach ($types as $type)
|
||||||
$needed_angel_types[$type['TID']] = 0;
|
$needed_angel_types[$type['id']] = 0;
|
||||||
|
|
||||||
if (isset ($_REQUEST['preview']) || isset ($_REQUEST['back'])) {
|
if (isset ($_REQUEST['preview']) || isset ($_REQUEST['back'])) {
|
||||||
// Name/Bezeichnung der Schicht, darf leer sein
|
// Name/Bezeichnung der Schicht, darf leer sein
|
||||||
|
@ -92,11 +92,11 @@ function admin_shifts() {
|
||||||
elseif ($_REQUEST['angelmode'] == 'manually') {
|
elseif ($_REQUEST['angelmode'] == 'manually') {
|
||||||
$angelmode = 'manually';
|
$angelmode = 'manually';
|
||||||
foreach ($types as $type) {
|
foreach ($types as $type) {
|
||||||
if (isset ($_REQUEST['type_' . $type['TID']]) && preg_match("/^[0-9]+$/", trim($_REQUEST['type_' . $type['TID']]))) {
|
if (isset ($_REQUEST['type_' . $type['id']]) && preg_match("/^[0-9]+$/", trim($_REQUEST['type_' . $type['id']]))) {
|
||||||
$needed_angel_types[$type['TID']] = trim($_REQUEST['type_' . $type['TID']]);
|
$needed_angel_types[$type['id']] = trim($_REQUEST['type_' . $type['id']]);
|
||||||
} else {
|
} else {
|
||||||
$ok = false;
|
$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) {
|
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 .= '<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'];
|
$shifts_table .= '<td>' . $shift['name'];
|
||||||
foreach ($types as $type) {
|
foreach ($types as $type) {
|
||||||
if (isset ($needed_angel_types[$type['TID']]) && $needed_angel_types[$type['TID']] > 0)
|
if (isset ($needed_angel_types[$type['id']]) && $needed_angel_types[$type['id']] > 0)
|
||||||
$shifts_table .= '<br /><b>' . $type['Name'] . ':</b> ' . $needed_angel_types[$type['TID']] . ' missing';
|
$shifts_table .= '<br /><b>' . $type['name'] . ':</b> ' . $needed_angel_types[$type['id']] . ' missing';
|
||||||
}
|
}
|
||||||
$shifts_table .= '</td></tr>';
|
$shifts_table .= '</td></tr>';
|
||||||
}
|
}
|
||||||
|
@ -249,8 +249,8 @@ function admin_shifts() {
|
||||||
foreach ($types as $type) {
|
foreach ($types as $type) {
|
||||||
$angel_types .= template_render('../templates/admin_shifts_angel_types.html', array (
|
$angel_types .= template_render('../templates/admin_shifts_angel_types.html', array (
|
||||||
'id' => $type['TID'],
|
'id' => $type['TID'],
|
||||||
'type' => $type['Name'],
|
'type' => $type['name'],
|
||||||
'value' => $needed_angel_types[$type['TID']]
|
'value' => $needed_angel_types[$type['id']]
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
return template_render('../templates/admin_shifts.html', array (
|
return template_render('../templates/admin_shifts.html', array (
|
||||||
|
|
|
@ -3,6 +3,31 @@
|
||||||
|
|
||||||
// Engel registrieren
|
// Engel registrieren
|
||||||
function guest_register() {
|
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;
|
global $SubscribeMailinglist, $enable_tshirt_size;
|
||||||
|
|
||||||
$html = "";
|
$html = "";
|
||||||
|
@ -170,7 +195,7 @@ function guest_register() {
|
||||||
|
|
||||||
$engel_types = sql_select("SELECT * FROM `AngelTypes` ORDER BY `name`");
|
$engel_types = sql_select("SELECT * FROM `AngelTypes` ORDER BY `name`");
|
||||||
foreach ($engel_types as $engel_type) {
|
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 . "\"";
|
$html .= "<option value=\"" . $Name . "\"";
|
||||||
|
|
||||||
if ($_POST["Art"] == $Name)
|
if ($_POST["Art"] == $Name)
|
||||||
|
|
|
@ -79,11 +79,11 @@ function user_shifts() {
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($types as $type) {
|
foreach ($types as $type) {
|
||||||
if (isset ($_REQUEST['type_' . $type['TID']]) && preg_match("/^[0-9]+$/", trim($_REQUEST['type_' . $type['TID']]))) {
|
if (isset ($_REQUEST['type_' . $type['id']]) && preg_match("/^[0-9]+$/", trim($_REQUEST['type_' . $type['id']]))) {
|
||||||
$needed_angel_types[$type['TID']] = trim($_REQUEST['type_' . $type['TID']]);
|
$needed_angel_types[$type['id']] = trim($_REQUEST['type_' . $type['id']]);
|
||||||
} else {
|
} else {
|
||||||
$ok = false;
|
$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) {
|
if (array_sum($needed_angel_types) == 0) {
|
||||||
|
@ -105,8 +105,8 @@ function user_shifts() {
|
||||||
foreach ($types as $type) {
|
foreach ($types as $type) {
|
||||||
$angel_types .= template_render('../templates/admin_shifts_angel_types.html', array (
|
$angel_types .= template_render('../templates/admin_shifts_angel_types.html', array (
|
||||||
'id' => $type['TID'],
|
'id' => $type['TID'],
|
||||||
'type' => $type['Name'],
|
'type' => $type['name'],
|
||||||
'value' => $needed_angel_types[$type['TID']]
|
'value' => $needed_angel_types[$type['id']]
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
return template_render('../templates/user_shifts_edit.html', array (
|
return template_render('../templates/user_shifts_edit.html', array (
|
||||||
|
@ -206,7 +206,7 @@ function user_shifts() {
|
||||||
'title' => $shift['name'],
|
'title' => $shift['name'],
|
||||||
'location' => $shift['Name'],
|
'location' => $shift['Name'],
|
||||||
'angel' => $user_text,
|
'angel' => $user_text,
|
||||||
'type' => $type['Name'],
|
'type' => $type['name'],
|
||||||
'comment' => ""
|
'comment' => ""
|
||||||
));
|
));
|
||||||
} else {
|
} else {
|
||||||
|
@ -262,7 +262,7 @@ function user_shifts() {
|
||||||
} else
|
} else
|
||||||
$entry_list[] = ($angeltype['count'] - count($entries)) . ' Helfer gebraucht';
|
$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 .= join(", ", $entry_list);
|
||||||
$shift_row .= '<br />';
|
$shift_row .= '<br />';
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,14 +24,14 @@ function load_shift_basics() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// erstellt ein Array der Engeltypen
|
// 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) {
|
foreach ($engel_types as $engel_type) {
|
||||||
$EngelType[$i] = array (
|
$EngelType[$i] = array (
|
||||||
'TID' => $engel_type['TID'],
|
'id' => $engel_type['id'],
|
||||||
'Name' => $engel_type['Name'] . Get_Text("inc_schicht_engel")
|
'name' => $engel_type['name'] . Get_Text("inc_schicht_engel")
|
||||||
);
|
);
|
||||||
$EngelTypeID[$engel_type['TID']] = $engel_type['Name'] . Get_Text("inc_schicht_engel");
|
$EngelTypeID[$engel_type['id']] = $engel_type['name'] . Get_Text("inc_schicht_engel");
|
||||||
$TID2Name[$engel_type['TID']] = $engel_type['Name'];
|
$TID2Name[$engel_type['id']] = $engel_type['name'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Erste Schicht suchen
|
// Erste Schicht suchen
|
||||||
|
|
|
@ -200,6 +200,7 @@ tr:hover .hidden {
|
||||||
border: 1px solid #888;
|
border: 1px solid #888;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
color: #000;
|
color: #000;
|
||||||
|
margin-bottom: 10px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue