diff --git a/includes/controller/user_driver_licenses_controller.php b/includes/controller/user_driver_licenses_controller.php index 9562cfe0..491a70b2 100644 --- a/includes/controller/user_driver_licenses_controller.php +++ b/includes/controller/user_driver_licenses_controller.php @@ -123,7 +123,7 @@ function user_driver_license_edit_controller() if (UserDriverLicense_valid($user_driver_license)) { if ($user_driver_license['user_id'] == null) { - $user_driver_license = UserDriverLicenses_create($user_driver_license, $user); + $user_driver_license = UserDriverLicenses_create($user_driver_license, $user_source['UID']); } else { UserDriverLicenses_update($user_driver_license); } diff --git a/includes/model/Room_model.php b/includes/model/Room_model.php index a96ca715..3eb9f452 100644 --- a/includes/model/Room_model.php +++ b/includes/model/Room_model.php @@ -53,12 +53,18 @@ function Room_create($name, $from_frab, $public, $number = null) /** * Returns room by id. * - * @param int $room_id RID + * @param int $room_id RID + * @param bool $show_only * @return array|false */ -function Room($room_id) +function Room($room_id, $show_only = true) { - $room_source = sql_select("SELECT * FROM `Room` WHERE `RID`='" . sql_escape($room_id) . "' AND `show` = 'Y'"); + $room_source = sql_select(" + SELECT * + FROM `Room` + WHERE `RID`='" . sql_escape($room_id) . "' + " . ($show_only ? "AND `show` = 'Y'" : '') + ); if ($room_source === false) { return false; diff --git a/includes/pages/admin_rooms.php b/includes/pages/admin_rooms.php index 9738f888..61923689 100644 --- a/includes/pages/admin_rooms.php +++ b/includes/pages/admin_rooms.php @@ -45,7 +45,7 @@ function admin_rooms() } if (test_request_int('id')) { - $room = Room($_REQUEST['id']); + $room = Room($_REQUEST['id'], false); if ($room === false) { engelsystem_error('Unable to load room.'); } @@ -209,7 +209,11 @@ function admin_rooms() ]), sprintf(_('Do you want to delete room %s?'), $name), buttons([ - button(page_link_to('admin_rooms') . '&show=delete&id=' . $room_id . '&ack', _('Delete'), 'delete') + button( + page_link_to('admin_rooms') . '&show=delete&id=' . $room_id . '&ack', + _('Delete'), + 'delete btn-danger' + ) ]) ]); } diff --git a/includes/pages/admin_user.php b/includes/pages/admin_user.php index ef0c9df8..8e11c5f3 100644 --- a/includes/pages/admin_user.php +++ b/includes/pages/admin_user.php @@ -41,18 +41,20 @@ function admin_user() $html .= '' . "\n"; $html .= '
Nick | ' . ' |
lastLogIn | ' . date('Y-m-d H:i', $user_source['lastLogIn']) . ' |
Name | ' . ' |
Vorname | ' . ' |
Alter | ' . ' |
Telefon | ' . ' |
Handy | ' . ' |
DECT | ' . ' |
Nick | ' . ' |
Last login | ' + . date('Y-m-d H:i', $user_source['lastLogIn']) + . ' |
Name | ' . ' |
Vorname | ' . ' |
Alter | ' . ' |
Telefon | ' . ' |
Handy | ' . ' |
DECT | ' . ' |
" . ' | |
" . ' | |
jabber | " . ' |
jabber | " . ' |
Size | ' . html_select_key('size', 'eSize', $tshirt_sizes, $user_source['Size']) . ' |
T-Shirt | ' . "\n"; $html .= html_options('eTshirt', $options, $user_source['Tshirt']) . ' |
Hometown | ' . ' |
Hometown | ' . ' |