Fixing Pagination, more Simple

This commit is contained in:
Ibnu Maksum
2024-03-27 09:44:48 +07:00
parent e11ab5ba01
commit 37a7da614e
16 changed files with 166 additions and 233 deletions

View File

@ -55,13 +55,9 @@ $ui->assign('c_all', $c_all);
if ($config['hide_uet'] != 'yes') {
//user expire
$query = ORM::for_table('tbl_user_recharges')
->where_lte('expiration', $mdate);
$paginator = Paginator::generate($query);
$expire = $query
->offset($paginator['startpoint'])
->limit($paginator['limit'])
->order_by_desc('expiration')
->find_many();
->where_lte('expiration', $mdate)
->order_by_desc('expiration');
$expire = Paginator::findMany($query);
// Get the total count of expired records for pagination
$totalCount = ORM::for_table('tbl_user_recharges')
@ -72,7 +68,6 @@ if ($config['hide_uet'] != 'yes') {
$paginator['total_count'] = $totalCount;
// Assign the pagination HTML to the template variable
$ui->assign('paginator', $paginator);
$ui->assign('expire', $expire);
}