From df8b1bb974a8a7b8381fb03dc8781c2a8ffc8df2 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Mon, 13 May 2013 14:58:04 +0200 Subject: [PATCH] adding all available block inforation to block stats table --- public/include/pages/statistics/pool.inc.php | 2 +- public/templates/mmcFE/statistics/blocks/blocks_found.tpl | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/public/include/pages/statistics/pool.inc.php b/public/include/pages/statistics/pool.inc.php index 4eecffc0..cad2cf32 100644 --- a/public/include/pages/statistics/pool.inc.php +++ b/public/include/pages/statistics/pool.inc.php @@ -38,7 +38,7 @@ $aBlockData = $blocks->fetch_array(); $stmt->close(); // Grab the last 10 blocks found -$stmt = $mysqli->prepare("SELECT * FROM blocks ORDER BY height DESC LIMIT 10"); +$stmt = $mysqli->prepare("SELECT b.*, a.username as finder FROM blocks AS b LEFT JOIN accounts AS a ON b.account_id = a.id ORDER BY height DESC LIMIT 10"); $stmt->execute(); $blocksfound = $stmt->get_result(); $aBlocksFoundData = $blocksfound->fetch_all(MYSQLI_ASSOC); diff --git a/public/templates/mmcFE/statistics/blocks/blocks_found.tpl b/public/templates/mmcFE/statistics/blocks/blocks_found.tpl index 181cc3c8..ea0b251f 100644 --- a/public/templates/mmcFE/statistics/blocks/blocks_found.tpl +++ b/public/templates/mmcFE/statistics/blocks/blocks_found.tpl @@ -7,19 +7,20 @@ Validity Finder Date / Time + Difficulty Shares {assign var=rank value=1} {section block $BLOCKSFOUND} - {assign var=user value="."|explode:$BLOCKSFOUND[block].finder} {$BLOCKSFOUND[block].height} {if $BLOCKSFOUND[block].confirmations >= 120}Confirmed{else}{120 - $BLOCKSFOUND[block].confirmations} left{/if} - {$user.0|default:"unknown"} + {$BLOCKSFOUND[block].finder|default:"unknown"} {$BLOCKSFOUND[block].time|date_format:"%d/%m/%Y %H:%M:%S"} - {$BLOCKSFOUND[block].difficulty|number_format} + {$BLOCKSFOUND[block].difficulty|number_format:"8"} + {$BLOCKSFOUND[block].shares|number_format} {/section}