Adding round statistics

This commit is contained in:
Sebastian Grewe 2013-09-08 00:22:02 +02:00
parent 82e8941c02
commit a19b3f5e31
5 changed files with 115 additions and 0 deletions

View File

@ -29,6 +29,7 @@
<li class="icon-align-left"><a href="{$smarty.server.PHP_SELF}?page=statistics&action=pool">Pool</a></li>
<li class="icon-th-large"><a href="{$smarty.server.PHP_SELF}?page=statistics&action=blocks">Blocks</a></li>
<li class="icon-chart"><a href="{$smarty.server.PHP_SELF}?page=statistics&action=graphs">Graphs</a></li>
<li class="icon-chart"><a href="{$smarty.server.PHP_SELF}?page=statistics&action=round">Round</a></li>
</ul>
<h3>Other</h3>
<ul class="toggle">

View File

@ -0,0 +1,61 @@
<article class="module width_full">
<header><h3>Block Statistics</h3></header>
<table class="tablesorter">
<tbody>
<tr>
<td class="left">
<a href="{$smarty.server.PHP_SELF}?page={$smarty.request.page}&action={$smarty.request.action}&height={$BLOCKDETAILS.height}&prev=1"><i class="icon-left-open"></i></a>
</td>
<td class="right">
<a href="{$smarty.server.PHP_SELF}?page={$smarty.request.page}&action={$smarty.request.action}&height={$BLOCKDETAILS.height}&next=1"><i class="icon-right-open"></i></a>
</td>
</tr>
<tr class="odd">
<td>ID</td>
<td>{$BLOCKDETAILS.id|default:"0"}</td>
</tr>
<tr class="even">
<td>Height</td>
{if ! $GLOBAL.website.blockexplorer.disabled}
<td><a href="{$GLOBAL.website.blockexplorer.url}{$BLOCKDETAILS.blockhash}" target="_new">{$BLOCKDETAILS.height}</a></td>
{else}
<td>{$BLOCKDETAILS.height}</td>
{/if}
</tr>
<tr class="odd">
<td>Amount</td>
<td>{$BLOCKDETAILS.amount|default:"0"}</td>
</tr>
<tr class="even">
<td>Confirmations</td>
<td>{$BLOCKDETAILS.confirmations|default:"0"}</td>
</tr>
<tr class="odd">
<td>Difficulty</td>
<td>{$BLOCKDETAILS.difficulty|default:"0"}</td>
</tr>
<tr class="even">
<td>Time</td>
<td>{$BLOCKDETAILS.time|default:"0"}</td>
</tr>
<tr class="odd">
<td>Shares</td>
<td>{$BLOCKDETAILS.shares|default:"0"}</td>
</tr>
<tr class="even">
<td>Finder</td>
<td>{$BLOCKDETAILS.finder|default:"0"}</td>
</tr>
</tbody>
</table>
<footer>
<div class="submit_link">
<form action="{$smarty.server.PHP_SELF}" method="POST" id='height'>
<input type="hidden" name="page" value="{$smarty.request.page}">
<input type="hidden" name="action" value="{$smarty.request.action}">
<input type="text" class="pin" name="height" value="{$smarty.request.height|default:"%"}">
<input type="submit" value="Search" class="alt_btn">
</form>
</div>
</footer>
</article>

View File

@ -0,0 +1,3 @@
{include file="statistics/round/block_stats.tpl"}
{include file="statistics/round/round_transactions.tpl"}
{include file="statistics/round/round_shares.tpl"}

View File

@ -0,0 +1,27 @@
<article class="module width_half">
<header><h3>Round Shares</h3></header>
<table class="tablesorter" cellspacing="0">
<thead>
<tr>
<th align="center">Rank</th>
<th align="left">User Name</th>
<th align="right">Valid</th>
<th align="right">Invalid</th>
<th align="right" style="padding-right: 25px;">Invalid %</th>
</tr>
</thead>
<tbody>
{assign var=rank value=1}
{assign var=listed value=0}
{section contrib $ROUNDSHARES}
<tr{if $GLOBAL.userdata.username == $ROUNDSHARES[contrib].username}{assign var=listed value=1} style="background-color:#99EB99;"{else} class="{cycle values="odd,even"}"{/if}>
<td align="center">{$rank++}</td>
<td>{if $ROUNDSHARES[contrib].is_anonymous|default:"0" == 1}anonymous{else}{$ROUNDSHARES[contrib].username|escape}{/if}</td>
<td align="right">{$ROUNDSHARES[contrib].valid|number_format}</td>
<td align="right">{$ROUNDSHARES[contrib].invalid|number_format}</td>
<td align="right" style="padding-right: 25px;">{($ROUNDSHARES[contrib].invalid / $ROUNDSHARES[contrib].valid * 100)|number_format:"2"}</td>
</tr>
{/section}
</tbody>
</table>
</article>

View File

@ -0,0 +1,23 @@
<article class="module width_half">
<header><h3>Round Transactions</h3></header>
<table class="tablesorter" cellspacing="0">
<thead>
<tr>
<th align="center">TX #</th>
<th>User Name</th>
<th align="center">Type</th>
<th align="right" style="padding-right: 25px;">Amount</th>
</tr>
</thead>
<tbody>
{section txs $ROUNDTRANSACTIONS}
<tr class="{cycle values="odd,even"}">
<td align="center">{$ROUNDTRANSACTIONS[txs].id|default:"0"}</td>
<td>{$ROUNDTRANSACTIONS[txs].username|escape}</td>
<td align="center">{$ROUNDTRANSACTIONS[txs].type|default:""}</td>
<td align="right" style="padding-right: 25px;">{$ROUNDTRANSACTIONS[txs].amount|default:"0"|number_format:"8"}</td>
</tr>
{/section}
</tbody>
</table>
</article>