diff --git a/public/include/smarty_globals.inc.php b/public/include/smarty_globals.inc.php index fa5c7923..d37e45cc 100644 --- a/public/include/smarty_globals.inc.php +++ b/public/include/smarty_globals.inc.php @@ -12,12 +12,18 @@ $aRoundShares = $statistics->getRoundShares(); $iCurrentActiveWorkers = $worker->getCountAllActiveWorkers(); $iCurrentPoolHashrate = $statistics->getCurrentHashrate(); $iCurrentPoolShareRate = $statistics->getCurrentShareRate(); +if ($bitcoin->can_connect() === true){ + $dDifficulty = $bitcoin->query('getdifficulty'); +} else { + $dDifficulty = 1; +} $aGlobal = array( 'slogan' => $config['website']['slogan'], 'websitename' => $config['website']['name'], 'hashrate' => $iCurrentPoolHashrate, 'sharerate' => $iCurrentPoolShareRate, + 'ppsvalue' => number_format(round(50 / (pow(2,32) * $dDifficulty) * pow(2, $config['difficulty']), 12) ,12), 'workers' => $iCurrentActiveWorkers, 'roundshares' => $aRoundShares, 'fees' => $config['fees'], diff --git a/public/templates/mmcFE/global/sidebar.tpl b/public/templates/mmcFE/global/sidebar.tpl index 21a8e0aa..05f6e00e 100644 --- a/public/templates/mmcFE/global/sidebar.tpl +++ b/public/templates/mmcFE/global/sidebar.tpl @@ -6,8 +6,17 @@
- - + + + + + + + + + + +