Merge branch 'bootstrap' of https://github.com/MPOS/php-mpos into bootstrap

Purty News
This commit is contained in:
root 2014-03-01 13:12:03 -07:00
commit bb0b9dc8be
2 changed files with 73 additions and 77 deletions

View File

@ -28,24 +28,24 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
$iLimit = 1000; $iLimit = 1000;
} }
if (@$_REQUEST['next'] && !empty($_REQUEST['height'])) {
$iHeight = @$roundstats->getNextBlockForStats($_REQUEST['height'], $iLimit);
if (!$iHeight) {
$aBlock = $block->getLast();
$iHeight = $aBlock['height'];
}
} else if (@$_REQUEST['prev'] && !empty($_REQUEST['height'])) {
$iHeight = $_REQUEST['height'];
} else if (!empty($_REQUEST['height']) && is_numeric($_REQUEST['height'])) {
$iHeight = $_REQUEST['height'];
} else {
$aBlock = $block->getLast();
$iHeight = $aBlock['height'];
}
if (@$_REQUEST['search']) { if (@$_REQUEST['search']) {
$iHeight = $roundstats->searchForBlockHeight($_REQUEST['search']); $iHeight = $roundstats->searchForBlockHeight($_REQUEST['search']);
} }
if (@$_REQUEST['next'] && !empty($_REQUEST['height'])) {
$iHeight = @$roundstats->getNextBlock($_REQUEST['height']);
if (!$iHeight) {
$iBlock = $block->getLast();
$iHeight = $iBlock['height'];
}
} else if (@$_REQUEST['prev'] && !empty($_REQUEST['height'])) {
$iHeight = $roundstats->getPreviousBlock($_REQUEST['height']);
} else if (empty($_REQUEST['height'])) {
$iBlock = $block->getLast();
$iHeight = $iBlock['height'];
} else {
$iHeight = $_REQUEST['height'];
}
$_REQUEST['height'] = $iHeight;
if (@$_REQUEST['filter']) { if (@$_REQUEST['filter']) {
$filter = $_REQUEST['filter']; $filter = $_REQUEST['filter'];
@ -65,13 +65,13 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
} }
} }
$smarty->assign('REPORTDATA', $aBlocksData); $smarty->assign('REPORTDATA', $aBlocksData);
$smarty->assign("USERLIST", $aUserList); $smarty->assign("USERLIST", $aUserList);
$smarty->assign("USERNAME", $userName); $smarty->assign("USERNAME", $userName);
$smarty->assign("USERID", $iUserId); $smarty->assign("USERID", $iUserId);
$smarty->assign("BLOCKLIMIT", $iLimit); $smarty->assign("BLOCKLIMIT", $iLimit);
$smarty->assign("HEIGHT", $iHeight); $smarty->assign("HEIGHT", $iHeight);
$smarty->assign("FILTER", $filter); $smarty->assign("FILTER", $filter);
} else { } else {
$debug->append('Using cached page', 3); $debug->append('Using cached page', 3);
} }

View File

@ -1,64 +1,60 @@
<form action="{$smarty.server.SCRIPT_NAME}" method="post" role="form"> <form action="{$smarty.server.SCRIPT_NAME}" method="post" role="form">
<input type="hidden" name="page" value="{$smarty.request.page|escape|escape}"> <input type="hidden" name="page" value="{$smarty.request.page|escape|escape}">
<input type="hidden" name="action" value="{$smarty.request.action|escape|escape}"> <input type="hidden" name="action" value="{$smarty.request.action|escape|escape}">
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<div class="panel panel-info"> <div class="panel panel-info">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-search fa-fw"></i> Earnings Information Earnings Information
</div>
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover">
<thead>
<td>
<a href="{$smarty.server.SCRIPT_NAME}?page={$smarty.request.page|escape}&action={$smarty.request.action|escape}&height={if is_array($REPORTDATA) && count($REPORTDATA) > ($BLOCKLIMIT - 1)}{$REPORTDATA[$BLOCKLIMIT - 1].height}{/if}&prev=1&limit={$BLOCKLIMIT}&id={$USERID}&filter={$FILTER}"<i class="icon-left-open"></i></a>
</td>
<td>
<a href="{$smarty.server.SCRIPT_NAME}?page={$smarty.request.page|escape}&action={$smarty.request.action|escape}&height={if is_array($REPORTDATA) && count($REPORTDATA) > 0}{$REPORTDATA[0].height}{/if}&next=1&limit={$BLOCKLIMIT}&id={$USERID}&filter={$FILTER}"><i class="icon-right-open"></i></a>
</td>
</thead>
</table>
</div> </div>
<div class="table-responsive"> <div class="panel-body">
<table class="table table-striped table-bordered table-hover"> <div class="table-responsive">
<tbody> <table class="table table-striped table-bordered table-hover">
<tr> <thead>
<td> <tr>
<div class="form-group"> <td colspan="4">
<label>Select User</label> <a href="{$smarty.server.SCRIPT_NAME}?page={$smarty.request.page|escape}&action={$smarty.request.action|escape}&height={if is_array($REPORTDATA) && count($REPORTDATA) > ($BLOCKLIMIT - 1)}{$REPORTDATA[$BLOCKLIMIT - 1].height}{/if}&prev=1&limit={$BLOCKLIMIT}&id={$USERID}&filter={$FILTER}"<i class="fa fa-chevron-left fa-fw"></i></a>
{html_options class="form-control" name="id" options=$USERLIST selected=$USERID|default:"0"} <a href="{$smarty.server.SCRIPT_NAME}?page={$smarty.request.page|escape}&action={$smarty.request.action|escape}&height={if is_array($REPORTDATA) && count($REPORTDATA) > 0}{$REPORTDATA[0].height}{/if}&next=1&limit={$BLOCKLIMIT}&id={$USERID}&filter={$FILTER}"><i class="fa fa-chevron-right fa-fw pull-right"></i></a>
</div> </td>
</td> </tr>
<td> </thead>
<div class="form-group"> <tbody>
<label>Block Limit</label> <tr>
<input size="10" class="form-control" type="text" name="limit" value="{$BLOCKLIMIT|default:"20"}" /> <td>
</div> <div class="form-group">
</td> <label>Select User</label>
<td> {html_options class="form-control" name="id" options=$USERLIST selected=$USERID|default:"0"}
<div class="form-group"> </div>
<label>Starting block height</label> </td>
<input type="text" class="form-control" name="search" value="{$HEIGHT|default:"%"}"> <td>
</div> <div class="form-group">
</td> <label>Block Limit</label>
<td> <input size="10" class="form-control" type="text" name="limit" value="{$BLOCKLIMIT|default:"20"}" />
<div class="form-group"> </div>
<label>SHOW EMPTY ROUNDS</label> </td>
<br> <td>
<input type="hidden" name="filter" value="0" /> <div class="form-group">
<input type="checkbox" data-size="small" name="filter" id="filter" value="1" {if $FILTER}checked{/if}/> <label>Starting block height</label>
<script> <input type="text" class="form-control" name="search" value="{$HEIGHT|default:"%"}">
$("[id='filter']").bootstrapSwitch(); </div>
</script> </td>
</div> <td>
</td> <div class="form-group">
</tbody> <label>Show empty rounds</label>
</table> <br>
<input type="submit" value="Submit" class="btn btn-outline btn-success btn-lg btn-block"> <input type="hidden" name="filter" value="0" />
<input type="checkbox" data-size="small" name="filter" id="filter" value="1" {if $FILTER}checked{/if}/>
<script>
$("[id='filter']").bootstrapSwitch();
</script>
</div>
</td>
</tbody>
</table>
<input type="submit" value="Submit" class="btn btn-outline btn-success btn-lg btn-block">
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div>
</form> </form>