Browse Source

php - add commas and remove unneeded decimals

master
kanoi 11 years ago
parent
commit
dea48455b6
  1. 5
      pool/base.php
  2. 4
      pool/page.php

5
pool/base.php

@ -30,6 +30,7 @@ function siprefmt($amt)
{
global $sipre;
$dot = 2;
$pref = floor(log10($amt)/3);
if ($pref < 0)
$pref = 0;
@ -43,7 +44,9 @@ function siprefmt($amt)
$pref++;
}
return number_format($amt, 2).$sipre[$pref];
if ($pref == 0)
$dot = 0;
return number_format($amt, $dot).$sipre[$pref];
}
#
function difffmt($amt)

4
pool/page.php

@ -196,10 +196,10 @@ function pgtop($dotop, $user, $douser)
}
if (isset($info['blockacc']))
$pac = $info['blockacc'];
$pac = number_format($info['blockacc'], 0);
if (isset($info['blockerr']))
$per = $info['blockerr'];
$per = number_format($info['blockerr'], 0);
if (isset($info['u_hashrate5m']))
{

Loading…
Cancel
Save