From e4a042c8c3e4fe6622c1a5022290c3e97ed89cec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20H=C3=A4usler?= Date: Wed, 24 Sep 2014 15:36:26 +0200 Subject: [PATCH] clear userlist --- includes/pages/admin_user.php | 19 +++++++++++-------- 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 @@ '; + $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 .= '

' . _('Edit user') . '

'; $html .= "Hallo,
" . "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.

\n"; $html .= "
\n"; @@ -264,6 +266,7 @@ function admin_user() { } } else { // Userliste, keine UID uebergeben... + $html .= '

' . _('All users') . '

'; $html .= "Neuen Engel eintragen »

\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

\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' => '' . count($angels) . '' ); $html .= table(array( 'Nick' => 'Nick', @@ -346,6 +345,10 @@ function admin_user() { 'edit' => '' ), $angels); } - return $html . ''; + return page(array( + '
', + $html, + '
' + )); } ?> 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');