diff --git a/public/include/pages/statistics/blocks.inc.php b/public/include/pages/statistics/blocks.inc.php new file mode 100644 index 00000000..7ba0bfdd --- /dev/null +++ b/public/include/pages/statistics/blocks.inc.php @@ -0,0 +1,22 @@ +getBlocksFound($iLimit); +$aBlockData = $aBlocksFoundData[0]; + +// Propagate content our template +$smarty->assign("BLOCKSFOUND", $aBlocksFoundData); +$smarty->assign("BLOCKLIMIT", $iLimit); + +if ($_SESSION['AUTHENTICATED']) { + $smarty->assign("CONTENT", "blocks_found.tpl"); +} else { + $smarty->assign("CONTENT", "default.tpl"); +} +?> diff --git a/public/include/pages/statistics/pool.inc.php b/public/include/pages/statistics/pool.inc.php index af0a4ebf..238b00b5 100644 --- a/public/include/pages/statistics/pool.inc.php +++ b/public/include/pages/statistics/pool.inc.php @@ -27,7 +27,8 @@ $aContributorsShares = $statistics->getTopContributors('shares', 15); $aContributorsHashes = $statistics->getTopContributors('hashes', 15); // Grab the last 10 blocks found -$aBlocksFoundData = $statistics->getBlocksFound(10); +$iLimit = 10; +$aBlocksFoundData = $statistics->getBlocksFound($iLimit); $aBlockData = $aBlocksFoundData[0]; // Estimated time to find the next block @@ -47,6 +48,7 @@ if (!empty($aBlockData)) { $smarty->assign("ESTTIME", $iEstTime); $smarty->assign("TIMESINCELAST", $dTimeSinceLast); $smarty->assign("BLOCKSFOUND", $aBlocksFoundData); +$smarty->assign("BLOCKLIMIT", $iLimit); $smarty->assign("CONTRIBSHARES", $aContributorsShares); $smarty->assign("CONTRIBHASHES", $aContributorsHashes); $smarty->assign("CURRENTBLOCK", $iBlock); diff --git a/public/templates/mmcFE/global/navigation.tpl b/public/templates/mmcFE/global/navigation.tpl index 83400cae..52b99a3f 100644 --- a/public/templates/mmcFE/global/navigation.tpl +++ b/public/templates/mmcFE/global/navigation.tpl @@ -14,7 +14,7 @@