From 552f8d6912b9efbe939859de2a8435c264385f79 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Sat, 1 Mar 2014 21:01:32 +0100 Subject: [PATCH] [FIX] Reports page --- public/include/pages/admin/reports.inc.php | 44 ++++---- .../admin/reports/earnings_control.tpl | 104 +++++++++--------- 2 files changed, 71 insertions(+), 77 deletions(-) diff --git a/public/include/pages/admin/reports.inc.php b/public/include/pages/admin/reports.inc.php index 3139234c..1723fd2f 100644 --- a/public/include/pages/admin/reports.inc.php +++ b/public/include/pages/admin/reports.inc.php @@ -28,24 +28,24 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) { $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']) { $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']) { $filter = $_REQUEST['filter']; @@ -65,13 +65,13 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) { } } - $smarty->assign('REPORTDATA', $aBlocksData); - $smarty->assign("USERLIST", $aUserList); - $smarty->assign("USERNAME", $userName); - $smarty->assign("USERID", $iUserId); - $smarty->assign("BLOCKLIMIT", $iLimit); - $smarty->assign("HEIGHT", $iHeight); - $smarty->assign("FILTER", $filter); + $smarty->assign('REPORTDATA', $aBlocksData); + $smarty->assign("USERLIST", $aUserList); + $smarty->assign("USERNAME", $userName); + $smarty->assign("USERID", $iUserId); + $smarty->assign("BLOCKLIMIT", $iLimit); + $smarty->assign("HEIGHT", $iHeight); + $smarty->assign("FILTER", $filter); } else { $debug->append('Using cached page', 3); } diff --git a/public/templates/bootstrap/admin/reports/earnings_control.tpl b/public/templates/bootstrap/admin/reports/earnings_control.tpl index 8294ea51..ed9c4c98 100644 --- a/public/templates/bootstrap/admin/reports/earnings_control.tpl +++ b/public/templates/bootstrap/admin/reports/earnings_control.tpl @@ -1,64 +1,58 @@
-
-
-
-
- Earnings Information -
-
-
- - - - - -
- - - -
+
+
+
+
+ Earnings Information
-
- - - - - - - - -
-
- - {html_options class="form-control" name="id" options=$USERLIST selected=$USERID|default:"0"} -
-
-
- - -
-
-
- - -
-
-
- -
- - - -
-
- +
+
+ + + + + + + + + + + +
+ + +
+
+ + {html_options class="form-control" name="id" options=$USERLIST selected=$USERID|default:"0"} +
+
+
+ + +
+
+
+ + +
+
+
+ +
+ + + +
+
+ +
-