add paginator
add paginator to dashboard expire user list
This commit is contained in:
parent
9d1d287e9a
commit
a25112a37f
@ -52,7 +52,25 @@ if (empty($c_all)) {
|
|||||||
$ui->assign('c_all', $c_all);
|
$ui->assign('c_all', $c_all);
|
||||||
|
|
||||||
//user expire
|
//user expire
|
||||||
$expire = ORM::for_table('tbl_user_recharges')->whereLte('expiration', $mdate)->order_by_desc('id')->limit(30)->find_many();
|
$paginator = Paginator::build(ORM::for_table('tbl_user_recharges'));
|
||||||
|
$expire = ORM::for_table('tbl_user_recharges')
|
||||||
|
->where_lte('expiration', $mdate)
|
||||||
|
->offset($paginator['startpoint'])
|
||||||
|
->limit($paginator['limit'])
|
||||||
|
->order_by_desc('id')
|
||||||
|
->find_many();
|
||||||
|
|
||||||
|
// Get the total count of expired records for pagination
|
||||||
|
$totalCount = ORM::for_table('tbl_user_recharges')
|
||||||
|
->where_lte('expiration', $mdate)
|
||||||
|
->count();
|
||||||
|
|
||||||
|
// 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);
|
||||||
$ui->assign('expire', $expire);
|
$ui->assign('expire', $expire);
|
||||||
|
|
||||||
//activity log
|
//activity log
|
||||||
|
@ -119,6 +119,7 @@
|
|||||||
{/foreach}
|
{/foreach}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
{$paginator['contents']}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -162,4 +163,4 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{include file="sections/footer.tpl"}
|
{include file="sections/footer.tpl"}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user