summaryrefslogtreecommitdiff
path: root/includes/pages/admin_free.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/pages/admin_free.php')
-rw-r--r--includes/pages/admin_free.php85
1 files changed, 44 insertions, 41 deletions
diff --git a/includes/pages/admin_free.php b/includes/pages/admin_free.php
index db0c239f..947dd93b 100644
--- a/includes/pages/admin_free.php
+++ b/includes/pages/admin_free.php
@@ -8,12 +8,12 @@ function admin_free_title()
function admin_free()
{
global $privileges;
-
+
$search = "";
if (isset($_REQUEST['search'])) {
$search = strip_request_item('search');
}
-
+
$angeltypesearch = "";
if (empty($_REQUEST['angeltype'])) {
$_REQUEST['angeltype'] = '';
@@ -24,15 +24,15 @@ function admin_free()
}
$angeltypesearch .= ") ";
}
-
+
$angel_types_source = sql_select("SELECT `id`, `name` FROM `AngelTypes` ORDER BY `name`");
$angel_types = [
- '' => 'alle Typen'
- ];
+ '' => 'alle Typen'
+ ];
foreach ($angel_types_source as $angel_type) {
$angel_types[$angel_type['id']] = $angel_type['name'];
}
-
+
$users = sql_select("
SELECT `User`.*
FROM `User`
@@ -42,7 +42,7 @@ function admin_free()
WHERE `User`.`Gekommen` = 1 AND `Shifts`.`SID` IS NULL
GROUP BY `User`.`UID`
ORDER BY `Nick`");
-
+
$free_users_table = [];
if ($search == "") {
$tokens = [];
@@ -59,44 +59,47 @@ function admin_free()
break;
}
}
- if (! $match) {
+ if (!$match) {
continue;
}
}
-
+
$free_users_table[] = [
- 'name' => User_Nick_render($usr),
- 'shift_state' => User_shift_state_render($usr),
- 'dect' => $usr['DECT'],
- 'jabber' => $usr['jabber'],
- 'email' => $usr['email_by_human_allowed'] ? $usr['email'] : glyph('eye-close'),
- 'actions' => in_array('admin_user', $privileges) ? button(page_link_to('admin_user') . '&id=' . $usr['UID'], _("edit"), 'btn-xs') : ''
- ];
+ 'name' => User_Nick_render($usr),
+ 'shift_state' => User_shift_state_render($usr),
+ 'dect' => $usr['DECT'],
+ 'jabber' => $usr['jabber'],
+ 'email' => $usr['email_by_human_allowed'] ? $usr['email'] : glyph('eye-close'),
+ 'actions' =>
+ in_array('admin_user', $privileges)
+ ? button(page_link_to('admin_user') . '&id=' . $usr['UID'], _("edit"), 'btn-xs')
+ : ''
+ ];
}
return page_with_title(admin_free_title(), [
- form([
- div('row', [
- div('col-md-4', [
- form_text('search', _("Search"), $search)
- ]),
- div('col-md-4', [
- form_select('angeltype', _("Angeltype"), $angel_types, $_REQUEST['angeltype'])
- ]),
- div('col-md-2', [
- form_checkbox('confirmed_only', _("Only confirmed"), isset($_REQUEST['confirmed_only']))
- ]),
- div('col-md-2', [
- form_submit('submit', _("Search"))
- ])
- ])
- ]),
- table([
- 'name' => _("Nick"),
- 'shift_state' => '',
- 'dect' => _("DECT"),
- 'jabber' => _("Jabber"),
- 'email' => _("E-Mail"),
- 'actions' => ''
- ], $free_users_table)
- ]);
+ form([
+ div('row', [
+ div('col-md-4', [
+ form_text('search', _("Search"), $search)
+ ]),
+ div('col-md-4', [
+ form_select('angeltype', _("Angeltype"), $angel_types, $_REQUEST['angeltype'])
+ ]),
+ div('col-md-2', [
+ form_checkbox('confirmed_only', _("Only confirmed"), isset($_REQUEST['confirmed_only']))
+ ]),
+ div('col-md-2', [
+ form_submit('submit', _("Search"))
+ ])
+ ])
+ ]),
+ table([
+ 'name' => _("Nick"),
+ 'shift_state' => '',
+ 'dect' => _("DECT"),
+ 'jabber' => _("Jabber"),
+ 'email' => _("E-Mail"),
+ 'actions' => ''
+ ], $free_users_table)
+ ]);
}