adding all available block inforation to block stats table
This commit is contained in:
parent
e990989340
commit
df8b1bb974
@ -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);
|
||||
|
||||
@ -7,19 +7,20 @@
|
||||
<th scope="col" align="left">Validity</th>
|
||||
<th scope="col" align="left">Finder</th>
|
||||
<th scope="col" align="left">Date / Time</th>
|
||||
<th scope="col" align="left">Difficulty</th>
|
||||
<th scope="col" align="left">Shares</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{assign var=rank value=1}
|
||||
{section block $BLOCKSFOUND}
|
||||
{assign var=user value="."|explode:$BLOCKSFOUND[block].finder}
|
||||
<tr class="{cycle values="odd,even"}">
|
||||
<td>{$BLOCKSFOUND[block].height}</td>
|
||||
<td>{if $BLOCKSFOUND[block].confirmations >= 120}<font color="green">Confirmed</font>{else}{120 - $BLOCKSFOUND[block].confirmations} left{/if}</td>
|
||||
<td>{$user.0|default:"unknown"}</td>
|
||||
<td>{$BLOCKSFOUND[block].finder|default:"unknown"}</td>
|
||||
<td>{$BLOCKSFOUND[block].time|date_format:"%d/%m/%Y %H:%M:%S"}</td>
|
||||
<td>{$BLOCKSFOUND[block].difficulty|number_format}</td>
|
||||
<td>{$BLOCKSFOUND[block].difficulty|number_format:"8"}</td>
|
||||
<td>{$BLOCKSFOUND[block].shares|number_format}</td>
|
||||
</tr>
|
||||
{/section}
|
||||
</tbody>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user