getting ready for customizeable dashboard with widget

This commit is contained in:
iBNu Maksum
2025-02-14 17:08:05 +07:00
parent 30bdb89d91
commit eff0c7dab7
27 changed files with 1112 additions and 2 deletions

View File

@ -0,0 +1,30 @@
<?php
class customer_expired
{
public function getWidget()
{
global $ui, $current_date;
//user expire
$query = ORM::for_table('tbl_user_recharges')
->where_lte('expiration', $current_date)
->order_by_desc('expiration');
$expire = Paginator::findMany($query);
// Get the total count of expired records for pagination
$totalCount = ORM::for_table('tbl_user_recharges')
->where_lte('expiration', $current_date)
->count();
// Pass the total count and current page to the paginator
$paginator['total_count'] = $totalCount;
// Assign the pagination HTML to the template variable
$ui->assign('expire', $expire);
return $ui->fetch('widget/customer_expired.tpl');
}
}