php-mpos/public/include/pages/statistics.inc.php
Sebastian Grewe bdcc3f747c Addressing #96, missing difficulty on stats page
* Properly assign template variable
* Removed unneeded additional template
2013-06-04 09:08:30 +02:00

19 lines
558 B
PHP

<?php
// Make sure we are called from index.php
if (!defined('SECURITY'))
die('Hacking attempt');
if ($bitcoin->can_connect() === true){
$dDifficulty = $bitcoin->query('getdifficulty');
$iBlock = $bitcoin->query('getblockcount');
} else {
$dDifficulty = 1;
$iBlock = 0;
$_SESSION['POPUP'][] = array('CONTENT' => 'Unable to connect to litecoind RPC service: ' . $bitcoin->can_connect(), 'TYPE' => 'errormsg');
}
$smarty->assign("CURRENTBLOCK", $iBlock);
$smarty->assign("DIFFICULTY", $dDifficulty);
$smarty->assign("CONTENT", "default.tpl");