summaryrefslogtreecommitdiff
path: root/includes/pages/admin_active.php
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2017-08-28 16:21:10 +0200
committerIgor Scheller <igor.scheller@igorshp.de>2017-08-28 17:34:00 +0200
commit73175e2b64c85c7a8c528c76452cd82ffa99f925 (patch)
tree7464fe30c04fe245424646a98cfd6247d060e517 /includes/pages/admin_active.php
parente1762e7764d4ee4f37757ecd2630f62a440dbf0e (diff)
#337: Added routing
Diffstat (limited to 'includes/pages/admin_active.php')
-rw-r--r--includes/pages/admin_active.php52
1 files changed, 37 insertions, 15 deletions
diff --git a/includes/pages/admin_active.php b/includes/pages/admin_active.php
index 2e06f90d..5b91e413 100644
--- a/includes/pages/admin_active.php
+++ b/includes/pages/admin_active.php
@@ -82,9 +82,13 @@ function admin_active()
$limit = '';
$msg = success(_('Marked angels.'), true);
} else {
- $set_active = '<a href="' . page_link_to('admin_active') . '&amp;serach=' . $search . '">&laquo; '
- . _('back') . '</a> | <a href="'
- . page_link_to('admin_active') . '&amp;search=' . $search . '&amp;count=' . $count . '&amp;set_active&amp;ack">'
+ $set_active = '<a href="' . page_link_to('admin_active', ['search' => $search]) . '">&laquo; '
+ . _('back')
+ . '</a> | <a href="'
+ . page_link_to(
+ 'admin_active',
+ ['search' => $search, 'count' => $count, 'set_active' => 1, 'ack' => 1]
+ ) . '">'
. _('apply')
. '</a>';
}
@@ -176,28 +180,46 @@ function admin_active()
$actions = [];
if ($usr['Aktiv'] == 0) {
- $actions[] = '<a href="'
- . page_link_to('admin_active') . '&amp;active=' . $usr['UID']
- . ($show_all_shifts ? '&amp;show_all_shifts=' : '') . '&amp;search=' . $search . '">'
+ $parameters = [
+ 'active' => $usr['UID'],
+ 'search' => $search,
+ ];
+ if ($show_all_shifts) {
+ $parameters['show_all_shifts'] = 1;
+ }
+ $actions[] = '<a href="' . page_link_to('admin_active', $parameters) . '">'
. _('set active')
. '</a>';
}
if ($usr['Aktiv'] == 1 && $usr['Tshirt'] == 0) {
- $actions[] = '<a href="'
- . page_link_to('admin_active') . '&amp;not_active=' . $usr['UID']
- . ($show_all_shifts ? '&amp;show_all_shifts=' : '') . '&amp;search=' . $search . '">'
+ $parametersRemove = [
+ 'not_active' => $usr['UID'],
+ 'search' => $search,
+ ];
+ $parametersShirt = [
+ 'tshirt' => $usr['UID'],
+ 'search' => $search,
+ ];
+ if ($show_all_shifts) {
+ $parametersRemove['show_all_shifts'] = 1;
+ $parametersShirt['show_all_shifts'] = 1;
+ }
+ $actions[] = '<a href="' . page_link_to('admin_active', $parametersRemove) . '">'
. _('remove active')
. '</a>';
- $actions[] = '<a href="'
- . page_link_to('admin_active') . '&amp;tshirt=' . $usr['UID']
- . ($show_all_shifts ? '&amp;show_all_shifts=' : '') . '&amp;search=' . $search . '">'
+ $actions[] = '<a href="' . page_link_to('admin_active', $parametersShirt) . '">'
. _('got t-shirt')
. '</a>';
}
if ($usr['Tshirt'] == 1) {
- $actions[] = '<a href="'
- . page_link_to('admin_active') . '&amp;not_tshirt=' . $usr['UID']
- . ($show_all_shifts ? '&amp;show_all_shifts=' : '') . '&amp;search=' . $search . '">'
+ $parameters = [
+ 'not_tshirt' => $usr['UID'],
+ 'search' => $search,
+ ];
+ if ($show_all_shifts) {
+ $parameters['show_all_shifts'] = 1;
+ }
+ $actions[] = '<a href="' . page_link_to('admin_active', $parameters) . '">'
. _('remove t-shirt')
. '</a>';
}