From 0767c6ab235cf7f11fd1000985a1f7e5df4182e0 Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Tue, 26 Mar 2024 14:39:28 +0700 Subject: [PATCH] Change paginator, to make easy customization using pagination.tpl --- CHANGELOG.md | 9 +++ system/autoload/Paginator.php | 86 ++++++++++++++++++--- system/controllers/bandwidth.php | 127 +++++++++++++++++-------------- system/controllers/customers.php | 80 +++++++++---------- system/controllers/dashboard.php | 11 +-- system/controllers/logs.php | 20 +++-- system/controllers/order.php | 6 +- system/controllers/plan.php | 10 ++- system/controllers/pool.php | 10 ++- system/controllers/radius.php | 27 ++++--- system/controllers/reports.php | 17 +++-- system/controllers/routers.php | 12 +-- system/controllers/services.php | 30 +++++--- system/controllers/settings.php | 51 ++++++------- system/controllers/voucher.php | 5 +- ui/ui/balance.tpl | 2 +- ui/ui/bandwidth.tpl | 2 +- ui/ui/customers-view.tpl | 2 +- ui/ui/customers.tpl | 4 +- ui/ui/dashboard.tpl | 2 +- ui/ui/hotspot.tpl | 2 +- ui/ui/logs-radius.tpl | 2 +- ui/ui/logs.tpl | 2 +- ui/ui/pagination.tpl | 19 +++++ ui/ui/plan.tpl | 2 +- ui/ui/pool.tpl | 2 +- ui/ui/pppoe.tpl | 2 +- ui/ui/radius-nas.tpl | 2 +- ui/ui/reports-activation.tpl | 2 +- ui/ui/reports-daily.tpl | 2 +- ui/ui/routers.tpl | 2 +- ui/ui/user-activation-list.tpl | 2 +- ui/ui/user-orderHistory.tpl | 2 +- ui/ui/users.tpl | 2 +- version.json | 2 +- 35 files changed, 336 insertions(+), 224 deletions(-) create mode 100644 ui/ui/pagination.tpl diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bf3a1d8..785537da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,15 @@ # CHANGELOG +## 2024.3.26 + +- Change paginator, to make easy customization using pagination.tpl + +## 2024.3.25 + +- Fix maps on HTTP +- Fix Cancel payment + ## 2024.3.23 - Maps full height diff --git a/system/autoload/Paginator.php b/system/autoload/Paginator.php index 53337202..a4d5c651 100644 --- a/system/autoload/Paginator.php +++ b/system/autoload/Paginator.php @@ -8,22 +8,86 @@ class Paginator { - public static function build($table, $colVal = [], $query='', $per_page = '10') + public static function generate($query, $search = [], $per_page = '10') + { + global $routes; + $adjacents = "2"; + $page = _get('p', 1); + $page = (empty($page) ? 1 : $page); + $url = U . implode('/', $routes); + if (count($search) > 0) { + $url .= '&' . http_build_query($search); + } + $url .= '&p='; + $totalReq = $query->count(); + $next = $page + 1; + $lastpage = ceil($totalReq / $per_page); + $lpm1 = $lastpage - 1; + $limit = $per_page; + $startpoint = ($page * $limit) - $limit; + if ($lastpage >= 1) { + $pages = []; + if ($lastpage < 7 + ($adjacents * 2)) { + for ($counter = 1; $counter <= $lastpage; $counter++) { + $pages[] = $counter; + } + } elseif ($lastpage > 5 + ($adjacents * 2)) { + if ($page < 1 + ($adjacents * 2)) { + for ($counter = 1; $counter < 4 + ($adjacents * 2); $counter++) { + $pages[] = $counter; + } + $pages[] = "..."; + $pages[] = $lpm1; + $pages[] = $lastpage; + } elseif ($lastpage - ($adjacents * 2) > $page && $page > ($adjacents * 2)) { + $pages[] = "1"; + $pages[] = "2"; + $pages[] = "..."; + for ($counter = $page - $adjacents; $counter <= $page + $adjacents; $counter++) { + $pages[] = $counter; + } + $pages[] = "..."; + $pages[] = $lpm1; + $pages[] = $lastpage; + } else { + $pages[] = "1"; + $pages[] = "2"; + $pages[] = "..."; + for ($counter = $lastpage - (2 + ($adjacents * 2)); $counter <= $lastpage; $counter++) { + $pages[] = $counter; + } + } + } + + $result = [ + 'count' => $lastpage, + 'limit' => $per_page, + 'startpoint' => $startpoint, + 'url' => $url, + 'page' => $page, + 'pages' => $pages, + 'prev' => ($page>0) ? ($page-1): "0", + 'next' => ($page>= $lastpage) ? $lastpage : $page+1 + ]; + print_r($result); + return $result; + } + } + public static function build($table, $colVal = [], $query = '', $per_page = '10') { global $routes; - global $_L; $url = U . implode('/', $routes); $query = urlencode($query); $adjacents = "2"; $page = (int)(empty(_get('p')) ? 1 : _get('p')); $pagination = ""; - foreach($colVal as $k=>$v) { - if(!is_array($v) && strpos($v,'%') === false) { + foreach ($colVal as $k => $v) { + if (!is_array($v) && strpos($v, '%') === false) { $table = $table->where($k, $v); - }else{ - if(is_array($v)){ + } else { + if (is_array($v)) { $table = $table->where_in($k, $v); - }else{ + } else { $table = $table->where_like($k, $v); } } @@ -103,7 +167,7 @@ class Paginator $page = (int)(!isset($routes['2']) ? 1 : $routes['2']); $pagination = ""; - if(is_object($table)){ + if (is_object($table)) { if ($w1 != '') { $totalReq = $table->where($w1, $c1)->count(); } elseif ($w2 != '') { @@ -115,7 +179,7 @@ class Paginator } else { $totalReq = $table->count(); } - }else{ + } else { if ($w1 != '') { $totalReq = ORM::for_table($table)->where($w1, $c1)->count(); } elseif ($w2 != '') { @@ -209,13 +273,13 @@ class Paginator $adjacents = "2"; $page = (int)(!isset($routes['2']) ? 1 : $routes['2']); $pagination = ""; - if(is_object($table)){ + if (is_object($table)) { if ($w1 != '') { $totalReq = $table->where_raw($w1, $c1)->count(); } else { $totalReq = $table->count(); } - }else{ + } else { if ($w1 != '') { $totalReq = ORM::for_table($table)->where_raw($w1, $c1)->count(); } else { diff --git a/system/controllers/bandwidth.php b/system/controllers/bandwidth.php index cf12e38f..6720f9f7 100644 --- a/system/controllers/bandwidth.php +++ b/system/controllers/bandwidth.php @@ -1,4 +1,5 @@ assign('_admin', $admin); if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) { - r2(U."dashboard",'e',Lang::T('You do not have permission to access this page')); + r2(U . "dashboard", 'e', Lang::T('You do not have permission to access this page')); } switch ($action) { case 'list': - $ui->assign('xfooter', ''); + $ui->assign('xfooter', ''); run_hook('view_list_bandwidth'); #HOOK - $name = _post('name'); - if ($name != ''){ - $paginator = Paginator::build(ORM::for_table('tbl_bandwidth'), ['name_bw' => '%' . $name . '%'], $name); - $d = ORM::for_table('tbl_bandwidth')->where_like('name_bw','%'.$name.'%')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many(); - }else{ - $paginator = Paginator::build(ORM::for_table('tbl_bandwidth')); - $d = ORM::for_table('tbl_bandwidth')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many(); - } + $name = _post('name'); + if ($name != '') { + $query = ORM::for_table('tbl_bandwidth')->where_like('name_bw', '%' . $name . '%'); + $paginator = Paginator::generate($query, ['name' => $name]); + $d = $query->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many(); + } else { + $query = ORM::for_table('tbl_bandwidth'); + $paginator = Paginator::generate($query); + $d = $query->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many(); + } - $ui->assign('d',$d); - $ui->assign('paginator',$paginator); + $ui->assign('d', $d); + $ui->assign('paginator', $paginator); $ui->display('bandwidth.tpl'); break; case 'add': if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) { - _alert(Lang::T('You do not have permission to access this page'),'danger', "dashboard"); + _alert(Lang::T('You do not have permission to access this page'), 'danger', "dashboard"); } run_hook('view_add_bandwidth'); #HOOK $ui->display('bandwidth-add.tpl'); @@ -43,28 +46,28 @@ switch ($action) { case 'edit': if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) { - _alert(Lang::T('You do not have permission to access this page'),'danger', "dashboard"); + _alert(Lang::T('You do not have permission to access this page'), 'danger', "dashboard"); } $id = $routes['2']; run_hook('view_edit_bandwith'); #HOOK $d = ORM::for_table('tbl_bandwidth')->find_one($id); - if($d){ - $ui->assign('burst',explode(" ", $d['burst'])); - $ui->assign('d',$d); + if ($d) { + $ui->assign('burst', explode(" ", $d['burst'])); + $ui->assign('d', $d); $ui->display('bandwidth-edit.tpl'); - }else{ + } else { r2(U . 'bandwidth/list', 'e', $_L['Account_Not_Found']); } break; case 'delete': if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) { - _alert(Lang::T('You do not have permission to access this page'),'danger', "dashboard"); + _alert(Lang::T('You do not have permission to access this page'), 'danger', "dashboard"); } $id = $routes['2']; run_hook('delete_bandwidth'); #HOOK $d = ORM::for_table('tbl_bandwidth')->find_one($id); - if($d){ + if ($d) { $d->delete(); r2(U . 'bandwidth/list', 's', Lang::T('Data Deleted Successfully')); } @@ -72,40 +75,48 @@ switch ($action) { case 'add-post': if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) { - _alert(Lang::T('You do not have permission to access this page'),'danger', "dashboard"); + _alert(Lang::T('You do not have permission to access this page'), 'danger', "dashboard"); } $name = _post('name'); $rate_down = _post('rate_down'); $rate_down_unit = _post('rate_down_unit'); - $rate_up = _post('rate_up'); - $rate_up_unit = _post('rate_up_unit'); + $rate_up = _post('rate_up'); + $rate_up_unit = _post('rate_up_unit'); run_hook('add_bandwidth'); #HOOK $isBurst = true; $burst = ""; - if(isset($_POST['burst'])){ - foreach($_POST['burst'] as $b){ - if(empty($b)){ + if (isset($_POST['burst'])) { + foreach ($_POST['burst'] as $b) { + if (empty($b)) { $isBurst = false; } } - if($isBurst){ + if ($isBurst) { $burst = implode(' ', $_POST['burst']); }; } $msg = ''; - if(Validator::Length($name,16,4) == false){ - $msg .= 'Name should be between 5 to 15 characters'. '
'; + if (Validator::Length($name, 16, 4) == false) { + $msg .= 'Name should be between 5 to 15 characters' . '
'; } - if($rate_down_unit == 'Kbps'){ $unit_rate_down = $rate_down * 1024; }else{ $unit_rate_down = $rate_down * 1048576; } - if($rate_up_unit == 'Kbps'){ $unit_rate_up = $min_up * 1024; }else{ $unit_rate_up = $min_up * 1048576; } - - $d = ORM::for_table('tbl_bandwidth')->where('name_bw',$name)->find_one(); - if($d){ - $msg .= Lang::T('Name Bandwidth Already Exist'). '
'; + if ($rate_down_unit == 'Kbps') { + $unit_rate_down = $rate_down * 1024; + } else { + $unit_rate_down = $rate_down * 1048576; + } + if ($rate_up_unit == 'Kbps') { + $unit_rate_up = $min_up * 1024; + } else { + $unit_rate_up = $min_up * 1048576; } - if($msg == ''){ + $d = ORM::for_table('tbl_bandwidth')->where('name_bw', $name)->find_one(); + if ($d) { + $msg .= Lang::T('Name Bandwidth Already Exist') . '
'; + } + + if ($msg == '') { $d = ORM::for_table('tbl_bandwidth')->create(); $d->name_bw = $name; $d->rate_down = $rate_down; @@ -116,53 +127,53 @@ switch ($action) { $d->save(); r2(U . 'bandwidth/list', 's', Lang::T('Data Created Successfully')); - }else{ + } else { r2(U . 'bandwidth/add', 'e', $msg); } break; case 'edit-post': if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) { - _alert(Lang::T('You do not have permission to access this page'),'danger', "dashboard"); + _alert(Lang::T('You do not have permission to access this page'), 'danger', "dashboard"); } $name = _post('name'); $rate_down = _post('rate_down'); $rate_down_unit = _post('rate_down_unit'); - $rate_up = _post('rate_up'); - $rate_up_unit = _post('rate_up_unit'); - run_hook('edit_bandwidth'); #HOOK + $rate_up = _post('rate_up'); + $rate_up_unit = _post('rate_up_unit'); + run_hook('edit_bandwidth'); #HOOK $isBurst = true; $burst = ""; - if(isset($_POST['burst'])){ - foreach($_POST['burst'] as $b){ - if(empty($b)){ + if (isset($_POST['burst'])) { + foreach ($_POST['burst'] as $b) { + if (empty($b)) { $isBurst = false; } } - if($isBurst){ + if ($isBurst) { $burst = implode(' ', $_POST['burst']); }; } $msg = ''; - if(Validator::Length($name,16,4) == false){ - $msg .= 'Name should be between 5 to 15 characters'. '
'; + if (Validator::Length($name, 16, 4) == false) { + $msg .= 'Name should be between 5 to 15 characters' . '
'; } $id = _post('id'); $d = ORM::for_table('tbl_bandwidth')->find_one($id); - if($d){ - }else{ - $msg .= Lang::T('Data Not Found'). '
'; + if ($d) { + } else { + $msg .= Lang::T('Data Not Found') . '
'; } - if($d['name_bw'] != $name){ - $c = ORM::for_table('tbl_bandwidth')->where('name_bw',$name)->find_one(); - if($c){ - $msg .= Lang::T('Name Bandwidth Already Exist'). '
'; + if ($d['name_bw'] != $name) { + $c = ORM::for_table('tbl_bandwidth')->where('name_bw', $name)->find_one(); + if ($c) { + $msg .= Lang::T('Name Bandwidth Already Exist') . '
'; } } - if($msg == ''){ + if ($msg == '') { $d->name_bw = $name; $d->rate_down = $rate_down; $d->rate_down_unit = $rate_down_unit; @@ -172,11 +183,11 @@ switch ($action) { $d->save(); r2(U . 'bandwidth/list', 's', Lang::T('Data Updated Successfully')); - }else{ - r2(U . 'bandwidth/edit/'.$id, 'e', $msg); + } else { + r2(U . 'bandwidth/edit/' . $id, 'e', $msg); } break; default: $ui->display('a404.tpl'); -} \ No newline at end of file +} diff --git a/system/controllers/customers.php b/system/controllers/customers.php index b956613c..a5b5a604 100644 --- a/system/controllers/customers.php +++ b/system/controllers/customers.php @@ -12,7 +12,7 @@ $ui->assign('_system_menu', 'customers'); $action = $routes['1']; $ui->assign('_admin', $admin); -if (empty ($action)) { +if (empty($action)) { $action = 'list'; } @@ -21,35 +21,6 @@ $leafletpickerHeader = << '%' . $search . '%', - 'fullname' => '%' . $search . '%', - 'phonenumber' => '%' . $search . '%', - 'email' => '%' . $search . '%', - 'service_type' => '%' . $search . '%' - ], $search); - $d = ORM::for_table('tbl_customers') - ->where_raw("(`username` LIKE '%$search%' OR `fullname` LIKE '%$search%' OR `phonenumber` LIKE '%$search%' OR `email` LIKE '%$search%')") - ->offset($paginator['startpoint']) - ->limit($paginator['limit']) - ->order_by_asc('username') - ->find_many(); - } else { - $paginator = Paginator::build(ORM::for_table('tbl_customers')); - $d = ORM::for_table('tbl_customers') - ->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many(); - } - - $ui->assign('search', htmlspecialchars($search)); - $ui->assign('d', $d); - $ui->assign('paginator', $paginator); - $ui->display('customers.tpl'); - break; - case 'csv': if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) { _alert(Lang::T('You do not have permission to access this page'), 'danger', "dashboard"); @@ -216,14 +187,14 @@ switch ($action) { ->where('customer_id', $customer['id']) ->find_many(); $v = $routes['3']; - if (empty ($v)) { + if (empty($v)) { $v = 'activation'; } if ($v == 'order') { $v = 'order'; - $paginator = Paginator::build(ORM::for_table('tbl_payment_gateway'), ['username' => $customer['username']]); - $order = ORM::for_table('tbl_payment_gateway') - ->where('username', $customer['username']) + $query = ORM::for_table('tbl_transactions')->where('username', $customer['username']); + $paginator = Paginator::generate($query); + $order = $query ->offset($paginator['startpoint']) ->limit($paginator['limit']) ->order_by_desc('id') @@ -231,10 +202,9 @@ switch ($action) { $ui->assign('paginator', $paginator); $ui->assign('order', $order); } else if ($v == 'activation') { - $paginator = Paginator::build(ORM::for_table('tbl_transactions'), ['username' => $customer['username']]); - $activation = ORM::for_table('tbl_transactions') - ->where('username', $customer['username']) - ->offset($paginator['startpoint']) + $query = ORM::for_table('tbl_transactions')->where('username', $customer['username']); + $paginator = Paginator::generate($query); + $activation = $query->offset($paginator['startpoint']) ->limit($paginator['limit']) ->order_by_desc('id') ->find_many(); @@ -376,13 +346,13 @@ switch ($action) { // Retrieve the customer ID of the newly created customer $customerId = $d->id(); // Save Customers Attributes details - if (!empty ($custom_field_names) && !empty ($custom_field_values)) { + if (!empty($custom_field_names) && !empty($custom_field_values)) { $totalFields = min(count($custom_field_names), count($custom_field_values)); for ($i = 0; $i < $totalFields; $i++) { $name = $custom_field_names[$i]; $value = $custom_field_values[$i]; - if (!empty ($name)) { + if (!empty($name)) { $customField = ORM::for_table('tbl_customers_fields')->create(); $customField->customer_id = $customerId; $customField->field_name = $name; @@ -475,7 +445,7 @@ switch ($action) { // Update Customers Attributes values in tbl_customers_fields table foreach ($customFields as $customField) { $fieldName = $customField['field_name']; - if (isset ($_POST['custom_fields'][$fieldName])) { + if (isset($_POST['custom_fields'][$fieldName])) { $customFieldValue = $_POST['custom_fields'][$fieldName]; $customField->set('field_value', $customFieldValue); $customField->save(); @@ -483,7 +453,7 @@ switch ($action) { } // Add new Customers Attributess - if (isset ($_POST['custom_field_name']) && isset ($_POST['custom_field_value'])) { + if (isset($_POST['custom_field_name']) && isset($_POST['custom_field_value'])) { $newCustomFieldNames = $_POST['custom_field_name']; $newCustomFieldValues = $_POST['custom_field_value']; @@ -506,7 +476,7 @@ switch ($action) { } // Delete Customers Attributess - if (isset ($_POST['delete_custom_fields'])) { + if (isset($_POST['delete_custom_fields'])) { $fieldsToDelete = $_POST['delete_custom_fields']; foreach ($fieldsToDelete as $fieldName) { // Delete the Customers Attributes with the given field name @@ -536,7 +506,7 @@ switch ($action) { Mikrotik::removeHotspotActiveUser($client, $d['username']); } else { $client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']); - if (!empty ($d['pppoe_password'])) { + if (!empty($d['pppoe_password'])) { Mikrotik::setPpoeUser($client, $c['username'], $d['pppoe_password']); } else { Mikrotik::setPpoeUser($client, $c['username'], $password); @@ -553,5 +523,25 @@ switch ($action) { break; default: - r2(U . 'customers/list', 'e', 'action not defined'); + $search = _post('search'); + run_hook('list_customers'); #HOOK + if ($search != '') { + $query = ORM::for_table('tbl_customers')->where_raw("(`username` LIKE '%$search%' OR `fullname` LIKE '%$search%' OR `phonenumber` LIKE '%$search%' OR `email` LIKE '%$search%')"); + $paginator = Paginator::generate($query, ['search' => $search]); + $d = $query->offset($paginator['startpoint']) + ->limit($paginator['limit']) + ->order_by_asc('username') + ->find_many(); + } else { + $query = ORM::for_table('tbl_customers'); + $paginator = Paginator::generate($query); + $d = ORM::for_table('tbl_customers') + ->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many(); + } + + $ui->assign('search', htmlspecialchars($search)); + $ui->assign('d', $d); + $ui->assign('paginator', $paginator); + $ui->display('customers.tpl'); + break; } diff --git a/system/controllers/dashboard.php b/system/controllers/dashboard.php index caeeda52..a51bbe07 100644 --- a/system/controllers/dashboard.php +++ b/system/controllers/dashboard.php @@ -19,7 +19,7 @@ $month_n = date('n'); $iday = ORM::for_table('tbl_transactions') ->where('recharged_on', $mdate) ->where_not_equal('method', 'Customer - Balance') - ->where_not_equal('method', 'Recharge Balance - Administrator') + ->where_not_equal('method', 'Recharge Balance - Administrator') ->sum('price'); if ($iday == '') { @@ -54,9 +54,10 @@ $ui->assign('c_all', $c_all); if ($config['hide_uet'] != 'yes') { //user expire - $paginator = Paginator::build(ORM::for_table('tbl_user_recharges')); - $expire = ORM::for_table('tbl_user_recharges') - ->where_lte('expiration', $mdate) + $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') @@ -150,7 +151,7 @@ if (file_exists($cacheMSfile) && time() - filemtime($cacheMSfile) < 43200) { ->select_expr('SUM(price)', 'total') ->where_raw("YEAR(recharged_on) = YEAR(CURRENT_DATE())") // Filter by the current year ->where_not_equal('method', 'Customer - Balance') - ->where_not_equal('method', 'Recharge Balance - Administrator') + ->where_not_equal('method', 'Recharge Balance - Administrator') ->group_by_expr('MONTH(recharged_on)') ->find_many(); diff --git a/system/controllers/logs.php b/system/controllers/logs.php index 1427194d..0677f21c 100644 --- a/system/controllers/logs.php +++ b/system/controllers/logs.php @@ -26,11 +26,13 @@ switch ($action) { r2(U . "logs/list/", 's', "Delete logs older than $keep days"); } if ($q != '') { - $paginator = Paginator::build(ORM::for_table('tbl_logs'), ['description' => '%' . $q . '%'], $q); - $d = ORM::for_table('tbl_logs')->where_like('description', '%' . $q . '%')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many(); + $query = ORM::for_table('tbl_logs')->where_like('description', '%' . $q . '%'); + $paginator = Paginator::generate($query, ['q' => $q]); + $d = $query->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many(); } else { - $paginator = Paginator::build(ORM::for_table('tbl_logs')); - $d = ORM::for_table('tbl_logs')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many(); + $query = ORM::for_table('tbl_logs'); + $paginator = Paginator::generate($query); + $d = $query->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many(); } $ui->assign('d', $d); @@ -46,11 +48,13 @@ switch ($action) { r2(U . "logs/radius/", 's', "Delete logs older than $keep days"); } if ($q != '') { - $paginator = Paginator::build(ORM::for_table('radpostauth', 'radius'), ['username' => '%' . $q . '%'], $q); - $d = ORM::for_table('radpostauth', 'radius')->where_like('username', '%' . $q . '%')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many(); + $query = ORM::for_table('radpostauth', 'radius')->where_like('username', '%' . $q . '%'); + $paginator = Paginator::generate($query, ['q' => $q]); + $d = $query->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many(); } else { - $paginator = Paginator::build(ORM::for_table('radpostauth', 'radius')); - $d = ORM::for_table('radpostauth', 'radius')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many(); + $query = ORM::for_table('radpostauth', 'radius'); + $paginator = Paginator::generate($query); + $d = $query->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many(); } $ui->assign('d', $d); diff --git a/system/controllers/order.php b/system/controllers/order.php index 410144ec..7495a7bf 100644 --- a/system/controllers/order.php +++ b/system/controllers/order.php @@ -19,9 +19,9 @@ switch ($action) { break; case 'history': $ui->assign('_system_menu', 'history'); - $paginator = Paginator::build(ORM::for_table('tbl_payment_gateway'), ['username' => $user['username']]); - $d = ORM::for_table('tbl_payment_gateway') - ->where('username', $user['username']) + $query = ORM::for_table('tbl_payment_gateway')->where('username', $user['username']); + $paginator = Paginator::generate($query); + $d = $query ->order_by_desc('id') ->offset($paginator['startpoint'])->limit($paginator['limit']) ->find_many(); diff --git a/system/controllers/plan.php b/system/controllers/plan.php index 5dc28a7d..21e76bf7 100644 --- a/system/controllers/plan.php +++ b/system/controllers/plan.php @@ -68,11 +68,13 @@ switch ($action) { $ui->assign('_title', Lang::T('Customer')); $search = _post('search'); if ($search != '') { - $paginator = Paginator::build(ORM::for_table('tbl_user_recharges'), ['username' => '%' . $search . '%'], $search); - $d = ORM::for_table('tbl_user_recharges')->where_like('username', '%' . $search . '%')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many(); + $query = ORM::for_table('tbl_user_recharges')->where_like('username', '%' . $search . '%'); + $paginator = Paginator::generate($query, ['search' => $search]); + $d = $query->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many(); } else { - $paginator = Paginator::build(ORM::for_table('tbl_user_recharges')); - $d = ORM::for_table('tbl_user_recharges')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_array(); + $query = ORM::for_table('tbl_user_recharges'); + $paginator = Paginator::generate($query); + $d = $query->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_array(); } run_hook('view_list_billing'); #HOOK if ($isApi) { diff --git a/system/controllers/pool.php b/system/controllers/pool.php index 5d0f928b..4ec35f6e 100644 --- a/system/controllers/pool.php +++ b/system/controllers/pool.php @@ -23,11 +23,13 @@ switch ($action) { $name = _post('name'); if ($name != '') { - $paginator = Paginator::build(ORM::for_table('tbl_pool'), ['pool_name' => '%' . $name . '%'], $name); - $d = ORM::for_table('tbl_pool')->where_like('pool_name', '%' . $name . '%')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many(); + $query = ORM::for_table('tbl_pool')->where_like('pool_name', '%' . $name . '%'); + $paginator = Paginator::generate($query, ['name' => $name]); + $d = $query->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many(); } else { - $paginator = Paginator::build(ORM::for_table('tbl_pool')); - $d = ORM::for_table('tbl_pool')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many(); + $query = ORM::for_table('tbl_pool'); + $paginator = Paginator::generate($query); + $d = $query->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many(); } $ui->assign('d', $d); diff --git a/system/controllers/radius.php b/system/controllers/radius.php index d76461f9..f9c55957 100644 --- a/system/controllers/radius.php +++ b/system/controllers/radius.php @@ -1,4 +1,5 @@ assign('_admin', $admin); if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) { - _alert(Lang::T('You do not have permission to access this page'),'danger', "dashboard"); + _alert(Lang::T('You do not have permission to access this page'), 'danger', "dashboard"); } switch ($action) { @@ -134,20 +135,18 @@ switch ($action) { $ui->assign('_title', "Network Access Server"); $name = _post('name'); if (empty($name)) { - $paginator = Paginator::build(ORM::for_table('nas', 'radius')); - $nas = ORM::for_table('nas', 'radius')->offset($paginator['startpoint'])->limit($paginator['limit'])->find_many(); + $query = ORM::for_table('nas', 'radius'); + $paginator = Paginator::generate($query); + $nas = $query->offset($paginator['startpoint'])->limit($paginator['limit'])->find_many(); } else { - $paginator = Paginator::build(ORM::for_table('nas', 'radius'), [ - 'nasname' => '%'.$search.'%', - 'shortname' => '%'.$search.'%', - 'description' => '%'.$search.'%' - ]); - $nas = ORM::for_table('nas', 'radius') - ->where_like('nasname', $search) - ->where_like('shortname', $search) - ->where_like('description', $search) - ->offset($paginator['startpoint'])->limit($paginator['limit']) - ->find_many(); + $query = ORM::for_table('nas', 'radius') + ->where_like('nasname', $search) + ->where_like('shortname', $search) + ->where_like('description', $search); + $paginator = Paginator::generate($query, ['name' => $name]); + $nas = $query + ->offset($paginator['startpoint'])->limit($paginator['limit']) + ->find_many(); } $ui->assign('paginator', $paginator); $ui->assign('name', $name); diff --git a/system/controllers/reports.php b/system/controllers/reports.php index ca79b027..cd159fc4 100644 --- a/system/controllers/reports.php +++ b/system/controllers/reports.php @@ -30,11 +30,13 @@ switch ($action) { r2(U . "logs/list/", 's', "Delete logs older than $keep days"); } if ($q != '') { - $paginator = Paginator::build(ORM::for_table('tbl_transactions'), ['invoice' => '%' . $q . '%'], $q); - $d = ORM::for_table('tbl_transactions')->where_like('invoice', '%' . $q . '%')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many(); + $query = ORM::for_table('tbl_transactions')->where_like('invoice', '%' . $q . '%'); + $paginator = Paginator::generate($query, ['q' => $q]); + $d = $where->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many(); } else { - $paginator = Paginator::build(ORM::for_table('tbl_transactions')); - $d = ORM::for_table('tbl_transactions')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many(); + $query = ORM::for_table('tbl_transactions'); + $paginator = Paginator::generate($query); + $d = $where->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many(); } $ui->assign('activation', $d); @@ -43,9 +45,10 @@ switch ($action) { $ui->display('reports-activation.tpl'); break; case 'daily-report': - $paginator = Paginator::build(ORM::for_table('tbl_transactions'), ['recharged_on' => $mdate]); - $d = ORM::for_table('tbl_transactions')->where('recharged_on', $mdate)->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many(); - $dr = ORM::for_table('tbl_transactions')->where('recharged_on', $mdate)->sum('price'); + $query = ORM::for_table('tbl_transactions')->where('recharged_on', $mdate); + $paginator = Paginator::generate($query); + $d = $query->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many(); + $dr = $query->sum('price'); $ui->assign('d', $d); $ui->assign('dr', $dr); diff --git a/system/controllers/routers.php b/system/controllers/routers.php index 49f68ef7..92357c32 100644 --- a/system/controllers/routers.php +++ b/system/controllers/routers.php @@ -17,7 +17,7 @@ use PEAR2\Net\RouterOS; require_once 'system/autoload/PEAR2/Autoload.php'; if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) { - _alert(Lang::T('You do not have permission to access this page'),'danger', "dashboard"); + _alert(Lang::T('You do not have permission to access this page'), 'danger', "dashboard"); } switch ($action) { @@ -26,11 +26,13 @@ switch ($action) { $name = _post('name'); if ($name != '') { - $paginator = Paginator::build(ORM::for_table('tbl_routers'), ['name' => '%' . $name . '%'], $name); - $d = ORM::for_table('tbl_routers')->where_like('name', '%' . $name . '%')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many(); + $query = ORM::for_table('tbl_routers')->where_like('name', '%' . $name . '%'); + $paginator = Paginator::generate($query, ['name' => $name]); + $d = $query->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many(); } else { - $paginator = Paginator::build(ORM::for_table('tbl_routers')); - $d = ORM::for_table('tbl_routers')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many(); + $query = ORM::for_table('tbl_routers'); + $paginator = Paginator::generate($query); + $d = $query->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many(); } $ui->assign('d', $d); diff --git a/system/controllers/services.php b/system/controllers/services.php index ab025528..90059d9f 100644 --- a/system/controllers/services.php +++ b/system/controllers/services.php @@ -119,11 +119,13 @@ switch ($action) { $name = _post('name'); if ($name != '') { - $paginator = Paginator::build(ORM::for_table('tbl_plans'), ['name_plan' => '%' . $name . '%', 'type' => 'Hotspot'], $name); - $d = ORM::for_table('tbl_bandwidth')->join('tbl_plans', array('tbl_bandwidth.id', '=', 'tbl_plans.id_bw'))->where('tbl_plans.type', 'Hotspot')->where_like('tbl_plans.name_plan', '%' . $name . '%')->offset($paginator['startpoint'])->limit($paginator['limit'])->find_many(); + $query = ORM::for_table('tbl_bandwidth')->join('tbl_plans', array('tbl_bandwidth.id', '=', 'tbl_plans.id_bw'))->where('tbl_plans.type', 'Hotspot')->where_like('tbl_plans.name_plan', '%' . $name . '%'); + $paginator = Paginator::generate($query, ['name'=> $name]); + $d = $query->offset($paginator['startpoint'])->limit($paginator['limit'])->find_many(); } else { - $paginator = Paginator::build(ORM::for_table('tbl_plans'), ['type' => 'Hotspot']); - $d = ORM::for_table('tbl_bandwidth')->join('tbl_plans', array('tbl_bandwidth.id', '=', 'tbl_plans.id_bw'))->where('tbl_plans.type', 'Hotspot')->offset($paginator['startpoint'])->limit($paginator['limit'])->find_many(); + $query = ORM::for_table('tbl_bandwidth')->join('tbl_plans', array('tbl_bandwidth.id', '=', 'tbl_plans.id_bw'))->where('tbl_plans.type', 'Hotspot'); + $paginator = Paginator::generate($query); + $d = $query->offset($paginator['startpoint'])->limit($paginator['limit'])->find_many(); } $ui->assign('d', $d); @@ -393,11 +395,13 @@ switch ($action) { $name = _post('name'); if ($name != '') { - $paginator = Paginator::build(ORM::for_table('tbl_plans'), ['name_plan' => '%' . $name . '%', 'type' => 'PPPOE'], $name); - $d = ORM::for_table('tbl_bandwidth')->join('tbl_plans', array('tbl_bandwidth.id', '=', 'tbl_plans.id_bw'))->where('tbl_plans.type', 'PPPOE')->where_like('tbl_plans.name_plan', '%' . $name . '%')->offset($paginator['startpoint'])->limit($paginator['limit'])->find_many(); + $query = ORM::for_table('tbl_bandwidth')->join('tbl_plans', array('tbl_bandwidth.id', '=', 'tbl_plans.id_bw'))->where('tbl_plans.type', 'PPPOE')->where_like('tbl_plans.name_plan', '%' . $name . '%'); + $paginator = Paginator::generate($query, ['name' => $name]); + $d =$query->offset($paginator['startpoint'])->limit($paginator['limit'])->find_many(); } else { - $paginator = Paginator::build(ORM::for_table('tbl_plans'), ['type' => 'PPPOE'], $name); - $d = ORM::for_table('tbl_bandwidth')->join('tbl_plans', array('tbl_bandwidth.id', '=', 'tbl_plans.id_bw'))->where('tbl_plans.type', 'PPPOE')->offset($paginator['startpoint'])->limit($paginator['limit'])->find_many(); + $query = ORM::for_table('tbl_bandwidth')->join('tbl_plans', array('tbl_bandwidth.id', '=', 'tbl_plans.id_bw'))->where('tbl_plans.type', 'PPPOE'); + $paginator = Paginator::generate($query); + $d =$query->offset($paginator['startpoint'])->limit($paginator['limit'])->find_many(); } $ui->assign('d', $d); @@ -646,11 +650,13 @@ switch ($action) { $ui->assign('_title', Lang::T('Balance Plans')); $name = _post('name'); if ($name != '') { - $paginator = Paginator::build(ORM::for_table('tbl_plans'), ['name_plan' => '%' . $name . '%', 'type' => 'Balance'], $name); - $d = ORM::for_table('tbl_plans')->where('tbl_plans.type', 'Balance')->where_like('tbl_plans.name_plan', '%' . $name . '%')->offset($paginator['startpoint'])->limit($paginator['limit'])->find_many(); + $query = ORM::for_table('tbl_plans')->where('tbl_plans.type', 'Balance')->where_like('tbl_plans.name_plan', '%' . $name . '%'); + $paginator = Paginator::generate($query, ['name' => $name]); + $d = $query->offset($paginator['startpoint'])->limit($paginator['limit'])->find_many(); } else { - $paginator = Paginator::build(ORM::for_table('tbl_plans'), ['type' => 'Balance'], $name); - $d = ORM::for_table('tbl_plans')->where('tbl_plans.type', 'Balance')->offset($paginator['startpoint'])->limit($paginator['limit'])->find_many(); + $query = ORM::for_table('tbl_plans')->where('tbl_plans.type', 'Balance'); + $paginator = Paginator::generate($query); + $d = $query->offset($paginator['startpoint'])->limit($paginator['limit'])->find_many(); } $ui->assign('d', $d); diff --git a/system/controllers/settings.php b/system/controllers/settings.php index 7d20d163..fa50eb8a 100644 --- a/system/controllers/settings.php +++ b/system/controllers/settings.php @@ -30,7 +30,7 @@ switch ($action) { r2(U . "settings/app", 's', 'Test Telegram has been send
Result: ' . $result); } - $UPLOAD_URL_PATH = str_replace($root_path,'', $UPLOAD_PATH); + $UPLOAD_URL_PATH = str_replace($root_path, '', $UPLOAD_PATH); if (file_exists($UPLOAD_PATH . DIRECTORY_SEPARATOR . 'logo.png')) { $logo = $UPLOAD_URL_PATH . DIRECTORY_SEPARATOR . 'logo.png?' . time(); } else { @@ -276,59 +276,58 @@ switch ($action) { $search = _req('search'); if ($search != '') { if ($admin['user_type'] == 'SuperAdmin') { - $paginator = Paginator::build(ORM::for_table('tbl_users'), ['username' => '%' . $search . '%'], $search); - $d = ORM::for_table('tbl_users') - ->where_like('username', '%' . $search . '%') + $query = ORM::for_table('tbl_users') + ->where_like('username', '%' . $search . '%'); + $paginator = Paginator::generate($query, ['search' => $search]); + $d = $query ->offset($paginator['startpoint']) ->limit($paginator['limit'])->order_by_asc('id')->findArray(); } else if ($admin['user_type'] == 'Admin') { - $paginator = Paginator::build(ORM::for_table('tbl_users'), [ - 'username' => '%' . $search . '%', - ['user_type' => 'Report'], - ['user_type' => 'Agent'], - ['user_type' => 'Sales'], - ['id' => $admin['id']] - ], $search); - $d = ORM::for_table('tbl_users') - ->where_like('username', '%' . $search . '%') - ->where_any_is([ + $query = ORM::for_table('tbl_users') + ->where_like('username', '%' . $search . '%')->where_any_is([ ['user_type' => 'Report'], ['user_type' => 'Agent'], ['user_type' => 'Sales'], ['id' => $admin['id']] - ]) + ]); + $paginator = Paginator::generate($query, ['search' => $search]); + $d = $query ->offset($paginator['startpoint']) ->limit($paginator['limit'])->order_by_asc('id')->findArray(); } else { - $paginator = Paginator::build(ORM::for_table('tbl_users'), ['username' => '%' . $search . '%'], $search); - $d = ORM::for_table('tbl_users') + $query = ORM::for_table('tbl_users') ->where_like('username', '%' . $search . '%') ->where_any_is([ ['id' => $admin['id']], ['root' => $admin['id']] - ]) + ]); + $paginator = Paginator::generate($query, ['search' => $search]); + $d = $query ->offset($paginator['startpoint']) ->limit($paginator['limit'])->order_by_asc('id')->findArray(); } } else { if ($admin['user_type'] == 'SuperAdmin') { - $paginator = Paginator::build(ORM::for_table('tbl_users')); - $d = ORM::for_table('tbl_users')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_asc('id')->findArray(); + $query = ORM::for_table('tbl_users'); + $paginator = Paginator::generate($query); + $d = $query->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_asc('id')->findArray(); } else if ($admin['user_type'] == 'Admin') { - $paginator = Paginator::build(ORM::for_table('tbl_users')); - $d = ORM::for_table('tbl_users')->where_any_is([ + $query = ORM::for_table('tbl_users')->where_any_is([ ['user_type' => 'Report'], ['user_type' => 'Agent'], ['user_type' => 'Sales'], ['id' => $admin['id']] - ])->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_asc('id')->findArray(); + ]); + $paginator = Paginator::generate($query); + $d = $query->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_asc('id')->findArray(); } else { - $paginator = Paginator::build(ORM::for_table('tbl_users')); - $d = ORM::for_table('tbl_users') + $query = ORM::for_table('tbl_users') ->where_any_is([ ['id' => $admin['id']], ['root' => $admin['id']] - ]) + ]); + $paginator = Paginator::generate($query); + $d = $query ->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_asc('id')->findArray(); } } diff --git a/system/controllers/voucher.php b/system/controllers/voucher.php index e9d65bad..5fe9a4f3 100644 --- a/system/controllers/voucher.php +++ b/system/controllers/voucher.php @@ -40,8 +40,9 @@ switch ($action) { case 'list-activated': $ui->assign('_system_menu', 'list-activated'); - $paginator = Paginator::build(ORM::for_table('tbl_transactions'), ['username' => $user['username']]); - $d = ORM::for_table('tbl_transactions')->where('username', $user['username'])->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many(); + $query = ORM::for_table('tbl_transactions')->where('username', $user['username']); + $paginator = Paginator::generate($query); + $d = $query->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many(); $ui->assign('d', $d); $ui->assign('paginator', $paginator); diff --git a/ui/ui/balance.tpl b/ui/ui/balance.tpl index 057c608a..54570792 100644 --- a/ui/ui/balance.tpl +++ b/ui/ui/balance.tpl @@ -46,7 +46,7 @@ - {$paginator['contents']} + {include file="pagination.tpl"} diff --git a/ui/ui/bandwidth.tpl b/ui/ui/bandwidth.tpl index 0c4df8ce..8ec665dd 100644 --- a/ui/ui/bandwidth.tpl +++ b/ui/ui/bandwidth.tpl @@ -48,7 +48,7 @@ - {$paginator['contents']} + {include file="pagination.tpl"} diff --git a/ui/ui/customers-view.tpl b/ui/ui/customers-view.tpl index 8cb1ae3d..fbc25a9b 100644 --- a/ui/ui/customers-view.tpl +++ b/ui/ui/customers-view.tpl @@ -228,7 +228,7 @@ {/if} - {$paginator['contents']} + {include file="pagination.tpl"} diff --git a/ui/ui/customers.tpl b/ui/ui/customers.tpl index 1949f277..d87ad173 100644 --- a/ui/ui/customers.tpl +++ b/ui/ui/customers.tpl @@ -16,7 +16,7 @@
-
diff --git a/ui/ui/dashboard.tpl b/ui/ui/dashboard.tpl index be8de2ab..07993ba5 100644 --- a/ui/ui/dashboard.tpl +++ b/ui/ui/dashboard.tpl @@ -163,7 +163,7 @@ {/foreach} -   {$paginator['contents']} +   {include file="pagination.tpl"} {/if} diff --git a/ui/ui/hotspot.tpl b/ui/ui/hotspot.tpl index d79204f3..fa2440a3 100644 --- a/ui/ui/hotspot.tpl +++ b/ui/ui/hotspot.tpl @@ -85,7 +85,7 @@ - {$paginator['contents']} + {include file="pagination.tpl"} diff --git a/ui/ui/logs-radius.tpl b/ui/ui/logs-radius.tpl index 4178e2f1..904c8d0e 100644 --- a/ui/ui/logs-radius.tpl +++ b/ui/ui/logs-radius.tpl @@ -53,7 +53,7 @@ - {$paginator['contents']} + {include file="pagination.tpl"} diff --git a/ui/ui/logs.tpl b/ui/ui/logs.tpl index dd60cdfa..00df9ebf 100644 --- a/ui/ui/logs.tpl +++ b/ui/ui/logs.tpl @@ -50,7 +50,7 @@ - {$paginator['contents']} + {include file="pagination.tpl"} diff --git a/ui/ui/pagination.tpl b/ui/ui/pagination.tpl new file mode 100644 index 00000000..9b4ef089 --- /dev/null +++ b/ui/ui/pagination.tpl @@ -0,0 +1,19 @@ +{if $paginator} + +{/if} \ No newline at end of file diff --git a/ui/ui/plan.tpl b/ui/ui/plan.tpl index fb9e886d..35a34d9c 100644 --- a/ui/ui/plan.tpl +++ b/ui/ui/plan.tpl @@ -79,7 +79,7 @@ - {$paginator['contents']} + {include file="pagination.tpl"} diff --git a/ui/ui/pool.tpl b/ui/ui/pool.tpl index 6c0efd66..4c8dc915 100644 --- a/ui/ui/pool.tpl +++ b/ui/ui/pool.tpl @@ -61,7 +61,7 @@ - {$paginator['contents']} + {include file="pagination.tpl"} diff --git a/ui/ui/pppoe.tpl b/ui/ui/pppoe.tpl index 41c242c7..7db044a7 100644 --- a/ui/ui/pppoe.tpl +++ b/ui/ui/pppoe.tpl @@ -82,7 +82,7 @@ - {$paginator['contents']} + {include file="pagination.tpl"} diff --git a/ui/ui/radius-nas.tpl b/ui/ui/radius-nas.tpl index 8e749fa3..7b6fee56 100644 --- a/ui/ui/radius-nas.tpl +++ b/ui/ui/radius-nas.tpl @@ -64,7 +64,7 @@ - {$paginator['contents']} + {include file="pagination.tpl"} diff --git a/ui/ui/reports-activation.tpl b/ui/ui/reports-activation.tpl index 020c4982..0f57b49a 100644 --- a/ui/ui/reports-activation.tpl +++ b/ui/ui/reports-activation.tpl @@ -61,7 +61,7 @@ - {$paginator['contents']} + {include file="pagination.tpl"} diff --git a/ui/ui/reports-daily.tpl b/ui/ui/reports-daily.tpl index f076fb9f..998b3e83 100644 --- a/ui/ui/reports-daily.tpl +++ b/ui/ui/reports-daily.tpl @@ -51,7 +51,7 @@ - {$paginator['contents']} + {include file="pagination.tpl"}

{Lang::T('Total Income')}:

diff --git a/ui/ui/routers.tpl b/ui/ui/routers.tpl index 2c0dae73..9aad56a3 100644 --- a/ui/ui/routers.tpl +++ b/ui/ui/routers.tpl @@ -61,7 +61,7 @@
- {$paginator['contents']} + {include file="pagination.tpl"} diff --git a/ui/ui/user-activation-list.tpl b/ui/ui/user-activation-list.tpl index 8b89e1df..11513f14 100644 --- a/ui/ui/user-activation-list.tpl +++ b/ui/ui/user-activation-list.tpl @@ -34,7 +34,7 @@ - {$paginator['contents']} + {include file="pagination.tpl"} diff --git a/ui/ui/user-orderHistory.tpl b/ui/ui/user-orderHistory.tpl index 78c87593..03aa2379 100644 --- a/ui/ui/user-orderHistory.tpl +++ b/ui/ui/user-orderHistory.tpl @@ -46,7 +46,7 @@ - {$paginator['contents']} + {include file="pagination.tpl"} diff --git a/ui/ui/users.tpl b/ui/ui/users.tpl index c809938a..1ce6ca9a 100644 --- a/ui/ui/users.tpl +++ b/ui/ui/users.tpl @@ -71,7 +71,7 @@ - {$paginator['contents']} + {include file="pagination.tpl"} diff --git a/version.json b/version.json index cbc7f71f..ad181ed8 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "2024.3.23" + "version": "2024.3.26" } \ No newline at end of file