- {foreach $radius_pppoe as $plan}
-
- {/foreach}
+ {if $_user['service_type'] == 'PPPoE'}
+ {if Lang::arrayCount($radius_pppoe)>0}
+
+ {foreach $radius_pppoe as $plan}
+
+
+
+
+
+
+
+
+ {Lang::T('Type')} |
+ {$plan['type']} |
+
+
+ {Lang::T('Price')} |
+ {Lang::moneyFormat($plan['price'])} |
+
+
+ {Lang::T('Validity')} |
+ {$plan['validity']} {$plan['validity_unit']} |
+
+
+
+
- {/if}
- {elseif $_user['service_type'] == 'Hotspot'}
- {if Lang::arrayCount($radius_hotspot)>0}
-
- - {if $_c['radius_plan']==''}Radius Plan{else}{$_c['radius_plan']}{/if}
- - {if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if}
-
-
- {foreach $radius_hotspot as $plan}
-
-
-
-
-
-
-
- {Lang::T('Type')} |
- {$plan['type']} |
-
-
- {Lang::T('Price')} |
- {Lang::moneyFormat($plan['price'])} |
-
-
- {Lang::T('Validity')} |
- {$plan['validity']} {$plan['validity_unit']} |
-
-
-
-
-
-
- {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
-
{Lang::T('Buy for friend')}
- {/if}
-
-
-
- {/foreach}
+
+
+ {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' &&
+ $_user['balance']>=$plan['price']}
+
{Lang::T('Buy for friend')}
+ {/if}
- {/if}
- {elseif $_user['service_type'] == 'Others' || $_user['service_type'] == '' && (Lang::arrayCount($radius_pppoe)>0 || Lang::arrayCount($radius_hotspot)>0)}
-
- - {if $_c['radius_plan']==''}Radius Plan{else}{$_c['radius_plan']}{/if}
- - {if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_plan']}{/if}
-
- {if Lang::arrayCount($radius_pppoe)>0}
-
- {foreach $radius_pppoe as $plan}
-
-
-
-
-
-
-
- {Lang::T('Type')} |
- {$plan['type']} |
-
-
- {Lang::T('Price')} |
- {Lang::moneyFormat($plan['price'])} |
-
-
- {Lang::T('Validity')} |
- {$plan['validity']} {$plan['validity_unit']} |
-
-
-
-
-
-
- {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
-
{Lang::T('Buy for friend')}
- {/if}
-
-
-
- {/foreach}
+
+
+ {/foreach}
+
+ {/if}
+ {elseif $_user['service_type'] == 'Hotspot'}
+ {if Lang::arrayCount($radius_hotspot)>0}
+
+ - {if $_c['radius_plan']==''}Radius Plan{else}{$_c['radius_plan']}{/if}
+ - {if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if}
+
+
+ {foreach $radius_hotspot as $plan}
+
+
+
+
+
+
+
+
+ {Lang::T('Type')} |
+ {$plan['type']} |
+
+
+ {Lang::T('Price')} |
+ {Lang::moneyFormat($plan['price'])} |
+
+
+ {Lang::T('Validity')} |
+ {$plan['validity']} {$plan['validity_unit']} |
+
+
+
+
- {/if}
- {if Lang::arrayCount($radius_hotspot)>0}
-
- - {if $_c['radius_plan']==''}Radius Plan{else}{$_c['radius_plan']}{/if}
- - {if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if}
-
-
- {foreach $radius_hotspot as $plan}
-
-
-
-
-
-
-
- {Lang::T('Type')} |
- {$plan['type']} |
-
-
- {Lang::T('Price')} |
- {Lang::moneyFormat($plan['price'])} |
-
-
- {Lang::T('Validity')} |
- {$plan['validity']} {$plan['validity_unit']} |
-
-
-
-
-
-
- {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
-
{Lang::T('Buy for friend')}
- {/if}
-
-
-
- {/foreach}
+
+
+ {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' &&
+ $_user['balance']>=$plan['price']}
+
{Lang::T('Buy for friend')}
+ {/if}
- {/if}
- {/if}
+
+
+ {/foreach}
+
+ {/if}
+ {elseif $_user['service_type'] == 'Others' || $_user['service_type'] == '' && (Lang::arrayCount($radius_pppoe)>0
+ || Lang::arrayCount($radius_hotspot)>0)}
+
+ - {if $_c['radius_plan']==''}Radius Plan{else}{$_c['radius_plan']}{/if}
+ - {if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_plan']}{/if}
+
+ {if Lang::arrayCount($radius_pppoe)>0}
+
+ {foreach $radius_pppoe as $plan}
+
+
+
+
+
+
+
+
+ {Lang::T('Type')} |
+ {$plan['type']} |
+
+
+ {Lang::T('Price')} |
+ {Lang::moneyFormat($plan['price'])} |
+
+
+ {Lang::T('Validity')} |
+ {$plan['validity']} {$plan['validity_unit']} |
+
+
+
+
+
+
+
+ {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' &&
+ $_user['balance']>=$plan['price']}
+
{Lang::T('Buy for friend')}
+ {/if}
+
+
+
+ {/foreach}
+
+ {/if}
+ {if Lang::arrayCount($radius_hotspot)>0}
+
+ - {if $_c['radius_plan']==''}Radius Plan{else}{$_c['radius_plan']}{/if}
+ - {if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if}
+
+
+ {foreach $radius_hotspot as $plan}
+
+
+
+
+
+
+
+
+ {Lang::T('Type')} |
+ {$plan['type']} |
+
+
+ {Lang::T('Price')} |
+ {Lang::moneyFormat($plan['price'])} |
+
+
+ {Lang::T('Validity')} |
+ {$plan['validity']} {$plan['validity_unit']} |
+
+
+
+
+
+
+
+ {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' &&
+ $_user['balance']>=$plan['price']}
+
{Lang::T('Buy for friend')}
+ {/if}
+
+
+
+ {/foreach}
+
+ {/if}
+ {/if}
{/if}
{foreach $routers as $router}
- {if Validator::isRouterHasPlan($plans_hotspot, $router['name']) || Validator::isRouterHasPlan($plans_pppoe, $router['name'])}
-
-
- {if $router['description'] != ''}
-
- {$router['description']}
-
- {/if}
- {if $_user['service_type'] == 'Hotspot' && Validator::countRouterPlan($plans_hotspot, $router['name'])>0}
-
-
- {foreach $plans_hotspot as $plan}
- {if $router['name'] eq $plan['routers']}
-
-
-
-
-
-
-
- {Lang::T('Type')} |
- {$plan['type']} |
-
-
- {Lang::T('Price')} |
- {Lang::moneyFormat($plan['price'])} |
-
-
- {Lang::T('Validity')} |
- {$plan['validity']} {$plan['validity_unit']} |
-
-
-
-
-
-
- {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
-
{Lang::T('Buy for friend')}
- {/if}
-
-
-
- {/if}
- {/foreach}
-
- {/if}
- {if $_user['service_type'] == 'PPPoE' && Validator::countRouterPlan($plans_pppoe,$router['name'])>0}
-
-
- {foreach $plans_pppoe as $plan}
- {if $router['name'] eq $plan['routers']}
-
-
-
-
-
-
-
- {Lang::T('Type')} |
- {$plan['type']} |
-
-
- {Lang::T('Price')} |
- {Lang::moneyFormat($plan['price'])} |
-
-
- {Lang::T('Validity')} |
- {$plan['validity']} {$plan['validity_unit']} |
-
-
-
-
-
-
- {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
-
{Lang::T('Buy for friend')}
- {/if}
-
-
-
- {/if}
- {/foreach}
-
- {/if}
- {if $_user['service_type'] == 'Others' || $_user['service_type'] == '' && (Validator::countRouterPlan($plans_hotspot, $router['name'])>0 || Validator::countRouterPlan($plans_pppoe, $router['name'])>0)}
-
-
- {foreach $plans_hotspot as $plan}
- {if $router['name'] eq $plan['routers']}
-
-
-
-
-
-
-
- {Lang::T('Type')} |
- {$plan['type']} |
-
-
- {Lang::T('Price')} |
- {Lang::moneyFormat($plan['price'])} |
-
-
- {Lang::T('Validity')} |
- {$plan['validity']} {$plan['validity_unit']} |
-
-
-
-
-
-
- {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
-
{Lang::T('Buy for friend')}
- {/if}
-
-
-
- {/if}
- {/foreach}
-
-
-
- {foreach $plans_pppoe as $plan}
- {if $router['name'] eq $plan['routers']}
-
-
-
-
-
-
-
- {Lang::T('Type')} |
- {$plan['type']} |
-
-
- {Lang::T('Price')} |
- {Lang::moneyFormat($plan['price'])} |
-
-
- {Lang::T('Validity')} |
- {$plan['validity']} {$plan['validity_unit']} |
-
-
-
-
-
-
- {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
-
{Lang::T('Buy for friend')}
- {/if}
-
-
-
- {/if}
- {/foreach}
-
- {/if}
-
+ {if Validator::isRouterHasPlan($plans_hotspot, $router['name']) || Validator::isRouterHasPlan($plans_pppoe,
+ $router['name'])}
+
+
+ {if $router['description'] != ''}
+
+ {$router['description']}
+
{/if}
+ {if $_user['service_type'] == 'Hotspot' && Validator::countRouterPlan($plans_hotspot, $router['name'])>0}
+
+
+ {foreach $plans_hotspot as $plan}
+ {if $router['name'] eq $plan['routers']}
+
+
+
+
+
+
+
+
+ {Lang::T('Type')} |
+ {$plan['type']} |
+
+
+ {Lang::T('Price')} |
+ {Lang::moneyFormat($plan['price'])} |
+
+
+ {Lang::T('Validity')} |
+ {$plan['validity']} {$plan['validity_unit']} |
+
+
+
+
+
+
+
+ {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' &&
+ $_user['balance']>=$plan['price']}
+
{Lang::T('Buy for friend')}
+ {/if}
+
+
+
+ {/if}
+ {/foreach}
+
+ {/if}
+ {if $_user['service_type'] == 'PPPoE' && Validator::countRouterPlan($plans_pppoe,$router['name'])>0}
+
+
+ {foreach $plans_pppoe as $plan}
+ {if $router['name'] eq $plan['routers']}
+
+
+
+
+
+
+
+
+ {Lang::T('Type')} |
+ {$plan['type']} |
+
+
+ {Lang::T('Price')} |
+ {Lang::moneyFormat($plan['price'])} |
+
+
+ {Lang::T('Validity')} |
+ {$plan['validity']} {$plan['validity_unit']} |
+
+
+
+
+
+
+
+ {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' &&
+ $_user['balance']>=$plan['price']}
+
{Lang::T('Buy for friend')}
+ {/if}
+
+
+
+ {/if}
+ {/foreach}
+
+ {/if}
+ {if $_user['service_type'] == 'Others' || $_user['service_type'] == '' &&
+ (Validator::countRouterPlan($plans_hotspot, $router['name'])>0 || Validator::countRouterPlan($plans_pppoe,
+ $router['name'])>0)}
+
+
+ {foreach $plans_hotspot as $plan}
+ {if $router['name'] eq $plan['routers']}
+
+
+
+
+
+
+
+
+ {Lang::T('Type')} |
+ {$plan['type']} |
+
+
+ {Lang::T('Price')} |
+ {Lang::moneyFormat($plan['price'])} |
+
+
+ {Lang::T('Validity')} |
+ {$plan['validity']} {$plan['validity_unit']} |
+
+
+
+
+
+
+
+ {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' &&
+ $_user['balance']>=$plan['price']}
+
{Lang::T('Buy for friend')}
+ {/if}
+
+
+
+ {/if}
+ {/foreach}
+
+
+
+ {foreach $plans_pppoe as $plan}
+ {if $router['name'] eq $plan['routers']}
+
+
+
+
+
+
+
+
+ {Lang::T('Type')} |
+ {$plan['type']} |
+
+
+ {Lang::T('Price')} |
+ {Lang::moneyFormat($plan['price'])} |
+
+
+ {Lang::T('Validity')} |
+ {$plan['validity']} {$plan['validity_unit']} |
+
+
+
+
+
+
+
+ {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' &&
+ $_user['balance']>=$plan['price']}
+
{Lang::T('Buy for friend')}
+ {/if}
+
+
+
+ {/if}
+ {/foreach}
+
+ {/if}
+
+ {/if}
{/foreach}
-{include file="user-ui/footer.tpl"}
+{include file="user-ui/footer.tpl"}
\ No newline at end of file
From d060e210329bdb1f21581a3a21d2331d384f2cc7 Mon Sep 17 00:00:00 2001
From: Focuslinkstech <45756999+Focuslinkstech@users.noreply.github.com>
Date: Thu, 5 Sep 2024 10:05:23 +0100
Subject: [PATCH 2/5] Added to Balance list
---
ui/ui/user-ui/orderBalance.tpl | 50 ++++++++++++++++++----------------
1 file changed, 26 insertions(+), 24 deletions(-)
diff --git a/ui/ui/user-ui/orderBalance.tpl b/ui/ui/user-ui/orderBalance.tpl
index ce5ecfe2..f18a7897 100644
--- a/ui/ui/user-ui/orderBalance.tpl
+++ b/ui/ui/user-ui/orderBalance.tpl
@@ -3,35 +3,37 @@
{if $_c['enable_balance'] == 'yes'}
-
-
-
- {foreach $plans_balance as $plan}
-
-
-
-
-
-
-
- {Lang::T('Price')} |
- {Lang::moneyFormat($plan['price'])} |
-
-
-
-
-
+
+
+
+ {foreach $plans_balance as $plan}
+
+
+
+
+
+
+
+
+ {Lang::T('Price')} |
+ {Lang::moneyFormat($plan['price'])} |
+
+
+
- {/foreach}
+
+
+ {/foreach}
+
{/if}
-{include file="user-ui/footer.tpl"}
+{include file="user-ui/footer.tpl"}
\ No newline at end of file
From af753d3a52478181473d8e81920a2562f06f174d Mon Sep 17 00:00:00 2001
From: Focuslinkstech <45756999+Focuslinkstech@users.noreply.github.com>
Date: Thu, 5 Sep 2024 10:07:22 +0100
Subject: [PATCH 3/5] remove excess div
---
ui/ui/user-ui/orderBalance.tpl | 1 -
1 file changed, 1 deletion(-)
diff --git a/ui/ui/user-ui/orderBalance.tpl b/ui/ui/user-ui/orderBalance.tpl
index f18a7897..e541751d 100644
--- a/ui/ui/user-ui/orderBalance.tpl
+++ b/ui/ui/user-ui/orderBalance.tpl
@@ -35,5 +35,4 @@
{/if}
-
{include file="user-ui/footer.tpl"}
\ No newline at end of file
From aa787af017e3aa9c223bf62918388593235794fe Mon Sep 17 00:00:00 2001
From: Focuslinkstech <45756999+Focuslinkstech@users.noreply.github.com>
Date: Thu, 5 Sep 2024 10:36:28 +0100
Subject: [PATCH 4/5] fix bandwidth name not displayed on active packages on
customer dashboard
---
system/autoload/User.php | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/system/autoload/User.php b/system/autoload/User.php
index e8e6e65f..9cf47823 100644
--- a/system/autoload/User.php
+++ b/system/autoload/User.php
@@ -210,14 +210,15 @@ class User
->select('tbl_user_recharges.id', 'id')
->selects([
'customer_id', 'username', 'plan_id', 'namebp', 'recharged_on', 'recharged_time', 'expiration', 'time',
- 'status', 'method', 'plan_type', 'name_bw',
+ 'status', 'method', 'plan_type',
['tbl_user_recharges.routers', 'routers'],
['tbl_user_recharges.type', 'type'],
'admin_id', 'prepaid'
])
+ ->left_outer_join('tbl_plans', ['tbl_plans.id', '=', 'tbl_user_recharges.plan_id'])
+ ->left_outer_join('tbl_bandwidth', ['tbl_bandwidth.id', '=', 'tbl_plans.id_bw'])
+ ->select('tbl_bandwidth.*')
->where('customer_id', $id)
- ->left_outer_join('tbl_plans', array('tbl_plans.id', '=', 'tbl_user_recharges.plan_id'))
- ->left_outer_join('tbl_bandwidth', array('tbl_bandwidth.id', '=', 'tbl_plans.id_bw'))
->find_many();
return $d;
}
From cf9a11ef9477b757d7f095f8c8ff82e46ee8701e Mon Sep 17 00:00:00 2001
From: Focuslinkstech <45756999+Focuslinkstech@users.noreply.github.com>
Date: Fri, 6 Sep 2024 11:48:20 +0100
Subject: [PATCH 5/5] add margin to the reports table list
---
ui/ui/reports.tpl | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/ui/ui/reports.tpl b/ui/ui/reports.tpl
index 331a44cd..eee6e0fb 100644
--- a/ui/ui/reports.tpl
+++ b/ui/ui/reports.tpl
@@ -80,8 +80,9 @@