adding user to top stats to always display even if not part of results

This commit is contained in:
Sebastian Grewe 2013-05-22 15:45:32 +02:00
parent 30df260738
commit f42b4d81ca
2 changed files with 20 additions and 3 deletions

View File

@ -11,14 +11,23 @@
</thead>
<tbody>
{assign var=rank value=1}
{assign var=listed value=0}
{section contrib $CONTRIBHASHES}
<tr class="{cycle values="odd,even"}">
<tr class="{cycle values="odd,even"}" {if $GLOBAL.userdata.username == $CONTRIBHASHES[contrib].account}{assign var=listed value=1} style="background-color:#99EB99;"{/if}>
<td>{$rank++}</td>
<td>{$CONTRIBHASHES[contrib].account}</td>
<td>{$CONTRIBHASHES[contrib].hashrate|number_format}</td>
<td>{math equation="round(reward / ( diff * pow(2,32) / ( hashrate * 1000 ) / 3600 / 24),3)" diff=$DIFFICULTY reward=$REWARD hashrate=$CONTRIBHASHES[contrib].hashrate}</td>
<td>{math equation="round(reward / ( diff * pow(2,32) / ( hashrate * 1000 ) / 3600 / 24) * (0.2 / 100) ,3)" diff=$DIFFICULTY reward=$REWARD hashrate=$CONTRIBHASHES[contrib].hashrate}</td>
</tr>
{/section}
{if $listed != 1}
<tr style="background-color:#99EB99;">
<td>n/a</td>
<td>{$GLOBAL.userdata.username}</td>
<td>{$GLOBAL.userdata.hashrate}</td>
<td>{math equation="round(reward / ( diff * pow(2,32) / ( hashrate * 1000 ) / 3600 / 24) * (0.2 / 100) ,3)" diff=$DIFFICULTY reward=$REWARD hashrate=$GLOBAL.userdata.hashrate}</td>
</tr>
{/if}
</tbody>
</table>
<div id="pagination" class="pagination"></div>

View File

@ -10,13 +10,21 @@
</thead>
<tbody>
{assign var=rank value=1}
{assign var=listed value=0}
{section hashrate $CONTRIBSHARES}
<tr class="{cycle values="odd,even"}">
<tr class="{cycle values="odd,even"}"{if $GLOBAL.userdata.username == $CONTRIBSHARES[hashrate].account}{assign var=listed value=1} style="background-color:#99EB99;"{/if}>
<td>{$rank++}</td>
<td>{$CONTRIBSHARES[hashrate].account}</td>
<td>{$CONTRIBSHARES[hashrate].shares|number_format}</td>
</tr>
{/section}
{if $listed != 1}
<tr style="background-color:#99EB99;">
<td>n/a</td>
<td>{$GLOBAL.userdata.username}</td>
<td>{$GLOBAL.userdata.shares.valid}</td>
</tr>
{/if}
</tbody>
</table>
<div id="pagination" class="pagination"></div>