diff options
author | Philip Häusler <msquare@notrademark.de> | 2014-09-24 15:36:26 +0200 |
---|---|---|
committer | Philip Häusler <msquare@notrademark.de> | 2014-09-24 15:36:26 +0200 |
commit | e4a042c8c3e4fe6622c1a5022290c3e97ed89cec (patch) | |
tree | 64facb0e34d571bf5fbeb08c51da41c3842b17ea | |
parent | f06e4a0f4783638ef1929939b4cdbb45c9243a5a (diff) |
clear userlist
-rw-r--r-- | includes/pages/admin_user.php | 19 | ||||
-rw-r--r-- | includes/sys_menu.php | 2 |
2 files changed, 12 insertions, 9 deletions
diff --git a/includes/pages/admin_user.php b/includes/pages/admin_user.php index 8eb4d5bc..9bce56c8 100644 --- a/includes/pages/admin_user.php +++ b/includes/pages/admin_user.php @@ -1,4 +1,5 @@ <?php + function admin_user_title() { return _("All Angels"); } @@ -6,11 +7,12 @@ function admin_user_title() { function admin_user() { global $user, $privileges, $tshirt_sizes, $privileges; - $html = '<div class="col-md-12">'; + $html = ''; if (isset($_REQUEST['id']) && preg_match("/^[0-9]{1,}$/", $_REQUEST['id']) && sql_num_query("SELECT * FROM `User` WHERE `UID`=" . sql_escape($_REQUEST['id'])) > 0) { $id = $_REQUEST['id']; if (! isset($_REQUEST['action'])) { + $html .= '<h1>' . _('Edit user') . '</h1>'; $html .= "Hallo,<br />" . "hier kannst du den Eintrag ändern. Unter dem Punkt 'Gekommen' " . "wird der Engel als anwesend markiert, ein Ja bei Aktiv bedeutet, " . "dass der Engel aktiv war und damit ein Anspruch auf ein T-Shirt hat. " . "Wenn T-Shirt ein 'Ja' enthält, bedeutet dies, dass der Engel " . "bereits sein T-Shirt erhalten hat.<br /><br />\n"; $html .= "<form action=\"" . page_link_to("admin_user") . "&action=save&id=$id\" method=\"post\">\n"; @@ -264,6 +266,7 @@ function admin_user() { } } else { // Userliste, keine UID uebergeben... + $html .= '<h1>' . _('All users') . '</h1>'; $html .= "<a href=\"" . page_link_to("register") . "\">Neuen Engel eintragen »</a><br /><br />\n"; @@ -272,11 +275,6 @@ function admin_user() { $SQL = "SELECT * FROM `User` ORDER BY `" . sql_escape($_GET["OrderBy"]) . "` ASC"; $angels = sql_select($SQL); - // anzahl zeilen - $Zeilen = count($angels); - - $html .= "Anzahl Engel: $Zeilen<br /><br />\n"; - function prepare_angel_table($angel) { global $privileges; $groups = sql_select_single_col("SELECT `Name` FROM `UserGroups` JOIN `Groups` ON (`Groups`.`UID` = `UserGroups`.`group_id`) WHERE `UserGroups`.`uid`=" . sql_escape($angel["UID"]) . " ORDER BY `Groups`.`Name`"); @@ -330,7 +328,8 @@ function admin_user() { 'Aktiv' => $Active, 'force_active' => $force_active_count, 'freeloads' => $freeloads_count, - 'Tshirt' => $Tshirt + 'Tshirt' => $Tshirt , + 'edit' => '<strong>' . count($angels) . '</strong>' ); $html .= table(array( 'Nick' => '<a href="' . page_link_to("admin_user") . '&OrderBy=Nick">Nick</a>', @@ -346,6 +345,10 @@ function admin_user() { 'edit' => '' ), $angels); } - return $html . '</div>'; + return page(array( + '<div class="col-md-12">', + $html, + '</div>' + )); } ?> diff --git a/includes/sys_menu.php b/includes/sys_menu.php index fc17699f..f7a5ba3b 100644 --- a/includes/sys_menu.php +++ b/includes/sys_menu.php @@ -19,7 +19,7 @@ function header_toolbar() { $toolbar_items = array(); if (isset($user)) - $toolbar_items[] = toolbar_item_link('#', 'time', User_shift_state_render($user)); + $toolbar_items[] = toolbar_item_link(page_link_to('users') . '&action=view', 'time', User_shift_state_render($user)); if (! isset($user) && in_array('register', $privileges)) $toolbar_items[] = toolbar_item_link(page_link_to('register'), 'plus', register_title(), $p == 'register'); |