From 1174b11c0ad47f6677a38af023d20ac9c1d456e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20H=C3=A4usler?= Date: Sun, 29 Dec 2013 13:26:09 +0100 Subject: [PATCH] display freeloads in angel list --- includes/pages/admin_user.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/includes/pages/admin_user.php b/includes/pages/admin_user.php index 7b1fd22d..f3a6fa56 100644 --- a/includes/pages/admin_user.php +++ b/includes/pages/admin_user.php @@ -304,6 +304,7 @@ function admin_user() { 'Alter' => htmlspecialchars($angel['Alter']), 'email' => '' . htmlspecialchars($angel['email']) . '' . $popup, 'Gekommen' => '' . $angel['Gekommen'] . '', + 'freeloads' => sql_select_single_cell("SELECT COUNT(*) FROM `ShiftEntry` WHERE `freeloaded` = 1 AND `UID` = " . sql_escape($angel['UID'])), 'Aktiv' => '' . $angel['Aktiv'] . '', 'force_active' => '' . $angel['force_active'] . '', 'Tshirt' => '' . $angel['Tshirt'] . '', @@ -315,11 +316,15 @@ function admin_user() { $angels = array_map('prepare_angel_table', $angels); $Gekommen = sql_select_single_cell("SELECT COUNT(*) FROM `User` WHERE `Gekommen` = 1"); $Active = sql_select_single_cell("SELECT COUNT(*) FROM `User` WHERE `Aktiv` = 1"); + $force_active_count = sql_select_single_cell("SELECT COUNT(*) FROM `User` WHERE `force_active` = 1"); + $freeloads_count = sql_select_single_cell("SELECT COUNT(*) FROM `ShiftEntry` WHERE `freeloaded` = 1"); $Tshirt = sql_select_single_cell("SELECT COUNT(*) FROM `User` WHERE `Tshirt` = 1"); $angels[] = array( 'Nick' => 'Summe', 'Gekommen' => $Gekommen, 'Aktiv' => $Active, + 'force_active' => $force_active_count, + 'freeloads' => $freeloads_count, 'Tshirt' => $Tshirt ); $html .= table(array( @@ -329,6 +334,7 @@ function admin_user() { 'Alter' => 'Alter', 'email' => 'E-Mail', 'Gekommen' => '
Gekommen
', + 'freeloads' => '
' . _("Freeloads") . '
', 'Aktiv' => '
Aktiv
', 'force_active' => '
' . _("Forced") . '
', 'Tshirt' => '
T-Shirt
',