Addressing #96, missing difficulty on stats page

* Properly assign template variable
* Removed unneeded additional template
This commit is contained in:
Sebastian Grewe 2013-06-04 09:08:30 +02:00
parent da1d7daaa2
commit bdcc3f747c
3 changed files with 5 additions and 27 deletions

View File

@ -5,14 +5,14 @@ if (!defined('SECURITY'))
die('Hacking attempt');
if ($bitcoin->can_connect() === true){
$iDifficulty = $bitcoin->query('getdifficulty');
$dDifficulty = $bitcoin->query('getdifficulty');
$iBlock = $bitcoin->query('getblockcount');
} else {
$iDifficulty = 1;
$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("CURRENTDIFFICULTY", $iDifficulty);
$smarty->assign("CONTENT", "pool/default.tpl");
$smarty->assign("DIFFICULTY", $dDifficulty);
$smarty->assign("CONTENT", "default.tpl");

View File

@ -53,6 +53,6 @@ $smarty->assign("REWARD", $config['reward']);
if ($_SESSION['AUTHENTICATED']) {
$smarty->assign("CONTENT", "authenticated.tpl");
} else {
$smarty->assign("CONTENT", "default.tpl");
$smarty->assign("CONTENT", "../default.tpl");
}
?>

View File

@ -1,22 +0,0 @@
{include file="global/block_header.tpl" BLOCK_HEADER="Pool Statistics"}
<table class="" width="50%" style="font-size:14px;">
<tbody>
<tr>
<td class="leftheader">Pool Hash Rate</td>
<td>{$GLOBAL.hashrate / 1000} Mhash/s</td>
</tr>
<tr>
<td class="leftheader">Current Total Miners</td>
<td>{$GLOBAL.workers}</td>
</tr>
<tr>
<td class="leftheader">Current Block</td>
<td><a href="http://explorer.litecoin.net/search?q={$CURRENTBLOCK}" target="_new">{$CURRENTBLOCK}</a></td>
</tr>
<tr>
<td class="leftheader">Current Difficulty</td>
<td><a href="http://allchains.info/" target="_new">{$DIFFICULTY}</a></td>
</tr>
</tbody>
</table>
{include file="global/block_footer.tpl"}