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' => '', + 'freeloads' => sql_select_single_cell("SELECT COUNT(*) FROM `ShiftEntry` WHERE `freeloaded` = 1 AND `UID` = " . sql_escape($angel['UID'])), 'Aktiv' => '', 'force_active' => '', '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' => '
', + 'freeloads' => '