Re-Adding shares for admin user panel

* Re-enables estimations
* Still fixes #130 which had issues with hashrates, those are still
  fixed
This commit is contained in:
Sebastian Grewe 2013-06-07 08:42:07 +02:00
parent f63485a539
commit 4b05846a78
2 changed files with 5 additions and 1 deletions

View File

@ -189,7 +189,8 @@ class Statistics {
a.username AS username,
a.donate_percent AS donate_percent,
a.email AS email,
ROUND(COUNT(s.id) * POW(2," . $this->config['difficulty'] . ") / 600 / 1000,2) AS hashrate
ROUND(COUNT(s.id) * POW(2," . $this->config['difficulty'] . ") / 600 / 1000,2) AS hashrate,
( SELECT COUNT(id) FROM " . $this->share->getTableName() . " WHERE a.username = SUBSTRING_INDEX( s.username, '.', 1 ) ) AS shares
FROM " . $this->user->getTableName() . " AS a
LEFT JOIN " . $this->share->getTableName() . " AS s
ON a.username = SUBSTRING_INDEX( s.username, '.', 1 )

View File

@ -17,6 +17,7 @@
<th class="center">ID</th>
<th>Username</th>
<th>E-Mail</th>
<th class="right">Shares&nbsp;&nbsp;</th>
<th class="right">Hashrate&nbsp;&nbsp;</th>
<th class="right">Est. Donation&nbsp;&nbsp;</th>
<th class="right">Est. Payout&nbsp;&nbsp;&nbsp;</th>
@ -30,6 +31,7 @@
<td class="center">{$USERS[user].id}</td>
<td>{$USERS[user].username}</td>
<td>{$USERS[user].email}</td>
<td class="right">{$USERS[user].shares}</td>
<td class="right">{$USERS[user].hashrate}</td>
<td class="right">{$USERS[user].payout.est_donation|number_format:"8"}</td>
<td class="right">{$USERS[user].payout.est_payout|number_format:"8"}</td>
@ -49,6 +51,7 @@
<th class="center">ID</th>
<th>Username</th>
<th>E-Mail</th>
<th class="right">Shares&nbsp;&nbsp;</th>
<th class="right">Hashrate</th>
<th class="right">Est. Donation</th>
<th class="right">Est. Payout</th>