diff options
author | Philip Häusler <msquare@notrademark.de> | 2015-08-14 14:06:33 +0200 |
---|---|---|
committer | Philip Häusler <msquare@notrademark.de> | 2015-08-14 14:06:33 +0200 |
commit | e8daa4d2ce91a5376b3770a8cd60385339b67a81 (patch) | |
tree | 5b1b0ce3132231ce02c71b0723587ee5dbaa1a9c /includes/pages | |
parent | 18e49ee06af09894299f262e29d19e7fac419f53 (diff) |
add table of needed shirts to user active page
Diffstat (limited to 'includes/pages')
-rw-r--r-- | includes/pages/admin_active.php | 38 |
1 files changed, 29 insertions, 9 deletions
diff --git a/includes/pages/admin_active.php b/includes/pages/admin_active.php index b79d1bd1..78796391 100644 --- a/includes/pages/admin_active.php +++ b/includes/pages/admin_active.php @@ -145,14 +145,23 @@ function admin_active() { $matched_users[] = $usr; } - - $shirt_statistics = sql_select(" + + $given_shirt_statistics = sql_select(" SELECT `Size`, count(`Size`) AS `count` FROM `User` WHERE `Tshirt`=1 GROUP BY `Size` - ORDER BY `count` DESC"); - $shirt_statistics[] = array( + ORDER BY `Size` DESC"); + $given_shirt_statistics[] = array( + 'Size' => '<b>' . _("Sum") . '</b>', + 'count' => '<b>' . sql_select_single_cell("SELECT count(*) FROM `User` WHERE `Tshirt`=1") . '</b>' + ); + $needed_shirt_statistics = sql_select(" + SELECT `Size`, count(`Size`) AS `count` + FROM `User` + GROUP BY `Size` + ORDER BY `Size` DESC"); + $needed_shirt_statistics[] = array( 'Size' => '<b>' . _("Sum") . '</b>', 'count' => '<b>' . sql_select_single_cell("SELECT count(*) FROM `User` WHERE `Tshirt`=1") . '</b>' ); @@ -178,11 +187,22 @@ function admin_active() { 'tshirt' => _("T-shirt?"), 'actions' => "" ), $matched_users), - '<h2>' . _("Given shirts") . '</h2>', - table(array( - 'Size' => _("Size"), - 'count' => _("Count") - ), $shirt_statistics) + div('row', [ + div('col-md-6', [ + '<h2>' . _("Needed shirts") . '</h2>' , + table(array( + 'Size' => _("Size"), + 'count' => _("Count") + ), $needed_shirt_statistics) + ]), + div('col-md-6', [ + '<h2>' . _("Given shirts") . '</h2>', + table(array( + 'Size' => _("Size"), + 'count' => _("Count") + ), $given_shirt_statistics) + ]) + ]) )); } ?> |