From f63485a53939333ae7ce2a1f7de960683ece890d Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Fri, 7 Jun 2013 08:33:14 +0200 Subject: [PATCH] Fixing admin panel user display * Fixes #130. Removed total shares in favor of the hashrate. * Fixes hashrate display. * Added pagination template file to include pagination on other pages in the future. --- public/include/classes/statistics.class.php | 2 +- public/templates/mmcFE/admin/user/default.tpl | 21 ++----------------- public/templates/mmcFE/global/pagination.tpl | 15 +++++++++++++ 3 files changed, 18 insertions(+), 20 deletions(-) create mode 100644 public/templates/mmcFE/global/pagination.tpl diff --git a/public/include/classes/statistics.class.php b/public/include/classes/statistics.class.php index 4ed74bb4..f3924f13 100644 --- a/public/include/classes/statistics.class.php +++ b/public/include/classes/statistics.class.php @@ -189,13 +189,13 @@ class Statistics { a.username AS username, a.donate_percent AS donate_percent, a.email AS email, - COUNT(s.id) AS shares, ROUND(COUNT(s.id) * POW(2," . $this->config['difficulty'] . ") / 600 / 1000,2) AS hashrate FROM " . $this->user->getTableName() . " AS a LEFT JOIN " . $this->share->getTableName() . " AS s ON a.username = SUBSTRING_INDEX( s.username, '.', 1 ) WHERE a.username LIKE ? + AND s.time > DATE_SUB(now(), INTERVAL 10 MINUTE) GROUP BY username ORDER BY username "); diff --git a/public/templates/mmcFE/admin/user/default.tpl b/public/templates/mmcFE/admin/user/default.tpl index 5386a84f..92809395 100644 --- a/public/templates/mmcFE/admin/user/default.tpl +++ b/public/templates/mmcFE/admin/user/default.tpl @@ -9,21 +9,7 @@ {include file="global/block_header.tpl" BLOCK_HEADER="User Information"}
-
-
- - - - - - -
-
+{include file="global/pagination.tpl"}
@@ -32,7 +18,6 @@ - @@ -45,8 +30,7 @@ - - + @@ -66,7 +50,6 @@ - diff --git a/public/templates/mmcFE/global/pagination.tpl b/public/templates/mmcFE/global/pagination.tpl new file mode 100644 index 00000000..0bae6db5 --- /dev/null +++ b/public/templates/mmcFE/global/pagination.tpl @@ -0,0 +1,15 @@ +
+
+ + + + + + + +
Username E-Mail Hashrate  Shares   Est. Donation   Est. Payout    Balance   {$USERS[user].id} {$USERS[user].username} {$USERS[user].email}{$USERS[user].hashrate / 1024}{$USERS[user].shares}{$USERS[user].hashrate} {$USERS[user].payout.est_donation|number_format:"8"} {$USERS[user].payout.est_payout|number_format:"8"} {$USERS[user].balance|number_format:"8"}Username E-Mail HashrateShares Est. Donation Est. Payout Balance