From 1d29f8111ee098f5b81fb88ae7c4e81e0244c6ac Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Mon, 8 Jan 2024 15:24:35 +0700 Subject: [PATCH] Order Expired by Expired date --- system/controllers/dashboard.php | 3 +-- ui/ui/dashboard.tpl | 8 +++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/system/controllers/dashboard.php b/system/controllers/dashboard.php index fdef3ae..1adbe93 100644 --- a/system/controllers/dashboard.php +++ b/system/controllers/dashboard.php @@ -57,7 +57,7 @@ $expire = ORM::for_table('tbl_user_recharges') ->where_lte('expiration', $mdate) ->offset($paginator['startpoint']) ->limit($paginator['limit']) - ->order_by_desc('id') + ->order_by_desc('expiration') ->find_many(); // Get the total count of expired records for pagination @@ -67,7 +67,6 @@ $totalCount = ORM::for_table('tbl_user_recharges') // Pass the total count and current page to the paginator $paginator['total_count'] = $totalCount; -$paginator['current_page'] = $paginator['current_page']; // Assign the pagination HTML to the template variable $ui->assign('paginator', $paginator); diff --git a/ui/ui/dashboard.tpl b/ui/ui/dashboard.tpl index a063292..77b45d1 100644 --- a/ui/ui/dashboard.tpl +++ b/ui/ui/dashboard.tpl @@ -119,7 +119,7 @@ {/foreach} -   {$paginator['contents']} +   {$paginator['contents']} @@ -150,7 +150,9 @@ $.getJSON("./version.json?" + Math.random(), function(data) { var localVersion = data.version; $('#version').html('Version: ' + localVersion); - $.getJSON("https://raw.githubusercontent.com/hotspotbilling/phpnuxbill/master/version.json?" + Math + $.getJSON( + "https://raw.githubusercontent.com/hotspotbilling/phpnuxbill/master/version.json?" + + Math .random(), function(data) { var latestVersion = data.version; @@ -163,4 +165,4 @@ }); -{include file="sections/footer.tpl"} +{include file="sections/footer.tpl"} \ No newline at end of file