From 0b5bc1fe71ae0d482078551c2a87d0ac23841a5d Mon Sep 17 00:00:00 2001 From: Focuslinkstech <45756999+Focuslinkstech@users.noreply.github.com> Date: Thu, 5 Sep 2024 09:48:21 +0100 Subject: [PATCH 1/5] Add margin to tables list in customer dashboard to give it unique view --- ui/ui/user-ui/dashboard.tpl | 615 +++++++++++++------------- ui/ui/user-ui/orderPlan.tpl | 840 +++++++++++++++++++----------------- 2 files changed, 751 insertions(+), 704 deletions(-) diff --git a/ui/ui/user-ui/dashboard.tpl b/ui/ui/user-ui/dashboard.tpl index 82d5e9f1..ef959a9b 100644 --- a/ui/ui/user-ui/dashboard.tpl +++ b/ui/ui/user-ui/dashboard.tpl @@ -4,11 +4,13 @@
{if $unpaid } -
-
-

{Lang::T('Unpaid Order')}

-
- +
+
+

{Lang::T('Unpaid Order')}

+
+
+
@@ -28,25 +30,26 @@
{Lang::T('expired')}
-
+ +
{/if}
@@ -55,7 +58,7 @@
{$Announcement_Customer = "{$PAGES_PATH}/Announcement_Customer.html"} {if file_exists($Announcement_Customer)} - {include file=$Announcement_Customer} + {include file=$Announcement_Customer} {/if}
@@ -65,337 +68,353 @@

{Lang::T('Your Account Information')}

- - - - - - - - - - - -
{Lang::T('Username')}{$_user['username']}
{Lang::T('Password')}
{Lang::T('Service Type')} - {if $_user.service_type == 'Hotspot'} +
+ + + + + + + + + + + + - + {/if} + + - {if $_c['enable_balance'] == 'yes'} + {if $_c['enable_balance'] == 'yes'} - {/if} -
{Lang::T('Username')}{$_user['username']}
{Lang::T('Password')}
{Lang::T('Service Type')} + {if $_user.service_type == 'Hotspot'} Hotspot - {elseif $_user.service_type == 'PPPoE'} + {elseif $_user.service_type == 'PPPoE'} PPPoE - {elseif $_user.service_type == 'Others' || $_user.service_type == null} + {elseif $_user.service_type == 'Others' || $_user.service_type == null} Others - {/if} -
{Lang::T('Balance')} {Lang::moneyFormat($_user['balance'])} {if $_user['auto_renewal'] == 1} - {Lang::T('Auto Renewal On')} + {Lang::T('Auto Renewal + On')} {else} - {Lang::T('Auto Renewal Off')} + {Lang::T('Auto Renewal + Off')} {/if}
+ {/if} +
+
{if $abills && count($abills)>0} -
-

{Lang::T('Additional Billing')}

-
+
+

{Lang::T('Additional Billing')}

+
+ +
{assign var="total" value=0} {foreach $abills as $k => $v} - - - - + + + + {/foreach}
{str_replace(' Bill', '', $k)} - {if strpos($v, ':') === false} - {Lang::moneyFormat($v)} - - {assign var="total" value=$v+$total} - {else} - {assign var="exp" value=explode(':',$v)} - {Lang::moneyFormat($exp[0])} - {if $exp[1]==0}{Lang::T('paid off')}{else}{$exp[1]}x{/if} - {if $exp[1]>0} - {assign var="total" value=$exp[0]+$total} - {/if} - {/if} -
{str_replace(' Bill', '', $k)} + {if strpos($v, ':') === false} + {Lang::moneyFormat($v)} + + {assign var="total" value=$v+$total} + {else} + {assign var="exp" value=explode(':',$v)} + {Lang::moneyFormat($exp[0])} + {if $exp[1]==0}{Lang::T('paid + off')}{else}{$exp[1]}x{/if} + {if $exp[1]>0} + {assign var="total" value=$exp[0]+$total} + {/if} + {/if} +
{Lang::T('Total')} {if $total==0} - {ucwords(Lang::T('paid off'))} + {ucwords(Lang::T('paid off'))} {else} - {Lang::moneyFormat($total)} + {Lang::moneyFormat($total)} {/if}
+
   {/if}
{if $_bills} -
- {foreach $_bills as $_bill} - {if $_bill['routers'] != 'radius'} -
-

{$_bill['routers']}

-
- {if $_bill['type'] == 'Hotspot'} - {if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if} - {else} - {if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_plan']}{/if} - {/if} -
-
+
+ {foreach $_bills as $_bill} + {if $_bill['routers'] != 'radius'} +
+

{$_bill['routers']}

+
+ {if $_bill['type'] == 'Hotspot'} + {if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if} {else} -
-

{if $_c['radius_plan']==''}Radius Plan{else}{$_c['radius_plan']}{/if}

-
+ {if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_plan']}{/if} {/if} - - - - - - - - - - - - - - - - - - - - - - {if $nux_ip neq ''} - - - - - {/if} - {if $nux_mac neq ''} - - - - - {/if} - {if $_bill['type'] == 'Hotspot' && $_bill['status'] == 'on' && $_bill['routers'] != 'radius' && $_c['hs_auth_method'] != 'hchap'} - - - - - {/if} - {if $_bill['type'] == 'Hotspot' && $_bill['status'] == 'on' && $_c['hs_auth_method'] == 'hchap'} - - - - - {/if} - - - - -
{Lang::T('Plan Name')} - {$_bill['namebp']} - {if $_bill['status'] != 'on'} - {Lang::T('expired')} - {/if} -
{Lang::T('Bandwidth')} - {$_bill['name_bw']} -
{Lang::T('Created On')} - {if $_bill['time'] ne ''}{Lang::dateAndTimeFormat($_bill['recharged_on'],$_bill['recharged_time'])} - {/if} 
{Lang::T('Expires On')} - {if $_bill['time'] ne ''}{Lang::dateAndTimeFormat($_bill['expiration'],$_bill['time'])}{/if}  -
{Lang::T('Type')} - {if $_bill['prepaid'] eq yes}Prepaid{else}Postpaid{/if} - {$_bill['plan_type']} -
{Lang::T('Current IP')}{$nux_ip}
{Lang::T('Current MAC')}{$nux_mac}
{Lang::T('Login Status')} - -
{Lang::T('Login Status')} - {if $logged == '1'} - {Lang::T('You are Online, Check Status')} - {else} - {Lang::T('Not Online, Login now?')} - {/if} -
- {if $_bill['status'] == 'on'} - - {/if} - - {if $_bill['status'] != 'on' && $_bill['prepaid'] != 'yes' && $_c['extend_expired']} - {Lang::T('Extend')} - {/if} - {Lang::T('Recharge')} - {Lang::T('Sync')} -
- {/foreach} +
+ {else} +
+

{if $_c['radius_plan']==''}Radius Plan{else}{$_c['radius_plan']}{/if}

+
+ {/if} +
+ + + + + + + + + + + + + + + + + + + + + + {if $nux_ip neq ''} + + + + + {/if} + {if $nux_mac neq ''} + + + + + {/if} + {if $_bill['type'] == 'Hotspot' && $_bill['status'] == 'on' && $_bill['routers'] != 'radius' && + $_c['hs_auth_method'] != 'hchap'} + + + + + {/if} + {if $_bill['type'] == 'Hotspot' && $_bill['status'] == 'on' && $_c['hs_auth_method'] == 'hchap'} + + + + + {/if} + + + + +
{Lang::T('Plan Name')} + {$_bill['namebp']} + {if $_bill['status'] != 'on'} + {Lang::T('expired')} + {/if} +
{Lang::T('Bandwidth')} + {$_bill['name_bw']} +
{Lang::T('Created On')} + {if $_bill['time'] ne + ''}{Lang::dateAndTimeFormat($_bill['recharged_on'],$_bill['recharged_time'])} + {/if} 
{Lang::T('Expires On')} + {if $_bill['time'] ne + ''}{Lang::dateAndTimeFormat($_bill['expiration'],$_bill['time'])}{/if}  +
{Lang::T('Type')} + {if $_bill['prepaid'] eq yes}Prepaid{else}Postpaid{/if} + {$_bill['plan_type']} +
{Lang::T('Current IP')}{$nux_ip}
{Lang::T('Current MAC')}{$nux_mac}
{Lang::T('Login Status')} + +
{Lang::T('Login Status')} + {if $logged == '1'} + {Lang::T('You + are + Online, Check Status')} + {else} + {Lang::T('Not Online, Login now?')} + {/if} +
+ {if $_bill['status'] == 'on'} + + {/if} + + {if $_bill['status'] != 'on' && $_bill['prepaid'] != 'yes' && $_c['extend_expired']} + {Lang::T('Extend')} + {/if} + {Lang::T('Recharge')} + {Lang::T('Sync')} +
+
+    + {/foreach} +
{/if} {if $_c['disable_voucher'] == 'yes'} - + {/if} {if $_bills} - {foreach $_bills as $_bill} - {if $_bill['type'] == 'Hotspot' && $_bill['status'] == 'on' && $_c['hs_auth_method'] != 'hchap'} - - {/if} - {/foreach} + {foreach $_bills as $_bill} + {if $_bill['type'] == 'Hotspot' && $_bill['status'] == 'on' && $_c['hs_auth_method'] != 'hchap'} + + {/if} + {/foreach} {/if} {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes'} -
-
-

{Lang::T("Transfer Balance")}

-
-
-
-
-
- -
-
- -
-
- -
+
+
+

{Lang::T("Transfer Balance")}

+
+
+ +
+
+
- - -
-
-

{Lang::T("Recharge a friend")}

-
-
-
-
-
- -
-
- -
-
-
-
+ } +
+
+

{Lang::T("Recharge a friend")}

+
+
+
+
+
+ +
+
+ +
+
+
+
+
{/if}
{if $_c['disable_voucher'] != 'yes'} -
-
-

{Lang::T('Voucher Activation')}

-
-
-
-
- - - - - - - -
-
-
-
-
- - - {Lang::T('Order Voucher')} - - {if $_c['payment_gateway'] != 'none' or $_c['payment_gateway'] == '' } - - - {Lang::T('Order Package')} - - {/if} +
+
+

{Lang::T('Voucher Activation')}

+
+
+
+
+ + + + + + +
+
+
+
+
+ + + {Lang::T('Order Voucher')} + + {if $_c['payment_gateway'] != 'none' or $_c['payment_gateway'] == '' } + + + {Lang::T('Order Package')} + + {/if}
+
{/if}
{if isset($hostname) && $hchap == 'true' && $_c['hs_auth_method'] == 'hchap'} - - + + {/if} {include file="user-ui/footer.tpl"} \ No newline at end of file diff --git a/ui/ui/user-ui/orderPlan.tpl b/ui/ui/user-ui/orderPlan.tpl index bb435c1c..f79ed4dd 100644 --- a/ui/ui/user-ui/orderPlan.tpl +++ b/ui/ui/user-ui/orderPlan.tpl @@ -6,419 +6,447 @@
{Lang::T('Order Internet Package')}
{if $_c['radius_enable']} - {if $_user['service_type'] == 'PPPoE'} - {if Lang::arrayCount($radius_pppoe)>0} - -
- {foreach $radius_pppoe as $plan} -
-
-
{$plan['name_plan']}
-
- - - - - - - - - - - - - - - -
{Lang::T('Type')}{$plan['type']}
{Lang::T('Price')}{Lang::moneyFormat($plan['price'])}
{Lang::T('Validity')}{$plan['validity']} {$plan['validity_unit']}
-
-
-
- {Lang::T('Buy')} - {if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']} - {Lang::T('Pay With Balance')} - {/if} -
- {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']} - {Lang::T('Buy for friend')} - {/if} -
-
-
- {/foreach} + {if $_user['service_type'] == 'PPPoE'} + {if Lang::arrayCount($radius_pppoe)>0} + +
+ {foreach $radius_pppoe as $plan} +
+
+
{$plan['name_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} - -
- {foreach $radius_hotspot as $plan} -
-
-
{$plan['name_plan']}
-
- - - - - - - - - - - - - - - -
{Lang::T('Type')}{$plan['type']}
{Lang::T('Price')}{Lang::moneyFormat($plan['price'])}
{Lang::T('Validity')}{$plan['validity']} {$plan['validity_unit']}
-
-
-
- {Lang::T('Buy')} - {if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']} - {Lang::T('Pay With Balance')} - {/if} -
- {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']} - {Lang::T('Buy for friend')} - {/if} -
-
-
- {/foreach} +
+
+ {Lang::T('Buy')} + {if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']} + {Lang::T('Pay With Balance')} + {/if} +
+ {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 Lang::arrayCount($radius_pppoe)>0} -
- {foreach $radius_pppoe as $plan} -
-
-
{$plan['name_plan']}
-
- - - - - - - - - - - - - - - -
{Lang::T('Type')}{$plan['type']}
{Lang::T('Price')}{Lang::moneyFormat($plan['price'])}
{Lang::T('Validity')}{$plan['validity']} {$plan['validity_unit']}
-
-
-
- {Lang::T('Buy')} - {if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']} - {Lang::T('Pay With Balance')} - {/if} -
- {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} + +
+ {foreach $radius_hotspot as $plan} +
+
+
{$plan['name_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} - -
- {foreach $radius_hotspot as $plan} -
-
-
{$plan['name_plan']}
-
- - - - - - - - - - - - - - - -
{Lang::T('Type')}{$plan['type']}
{Lang::T('Price')}{Lang::moneyFormat($plan['price'])}
{Lang::T('Validity')}{$plan['validity']} {$plan['validity_unit']}
-
-
-
- {Lang::T('Buy')} - {if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']} - {Lang::T('Pay With Balance')} - {/if} -
- {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']} - {Lang::T('Buy for friend')} - {/if} -
-
-
- {/foreach} +
+
+ {Lang::T('Buy')} + {if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']} + {Lang::T('Pay With Balance')} + {/if} +
+ {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 Lang::arrayCount($radius_pppoe)>0} +
+ {foreach $radius_pppoe as $plan} +
+
+
{$plan['name_plan']}
+
+
+ + + + + + + + + + + + + + + +
{Lang::T('Type')}{$plan['type']}
{Lang::T('Price')}{Lang::moneyFormat($plan['price'])}
{Lang::T('Validity')}{$plan['validity']} {$plan['validity_unit']}
+
+
+
+
+ {Lang::T('Buy')} + {if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']} + {Lang::T('Pay With Balance')} + {/if} +
+ {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} + +
+ {foreach $radius_hotspot as $plan} +
+
+
{$plan['name_plan']}
+
+
+ + + + + + + + + + + + + + + +
{Lang::T('Type')}{$plan['type']}
{Lang::T('Price')}{Lang::moneyFormat($plan['price'])}
{Lang::T('Validity')}{$plan['validity']} {$plan['validity_unit']}
+
+
+
+
+ {Lang::T('Buy')} + {if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']} + {Lang::T('Pay With Balance')} + {/if} +
+ {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'])} -
-
{$router['name']}
- {if $router['description'] != ''} -
- {$router['description']} -
- {/if} - {if $_user['service_type'] == 'Hotspot' && Validator::countRouterPlan($plans_hotspot, $router['name'])>0} -
{if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if} -
-
- {foreach $plans_hotspot as $plan} - {if $router['name'] eq $plan['routers']} -
-
-
{$plan['name_plan']}
-
- - - - - - - - - - - - - - - -
{Lang::T('Type')}{$plan['type']}
{Lang::T('Price')}{Lang::moneyFormat($plan['price'])}
{Lang::T('Validity')}{$plan['validity']} {$plan['validity_unit']}
-
-
-
- {Lang::T('Buy')} - {if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']} - {Lang::T('Pay With Balance')} - {/if} -
- {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} -
{if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_plan']}{/if}
-
- {foreach $plans_pppoe as $plan} - {if $router['name'] eq $plan['routers']} -
-
-
{$plan['name_plan']}
-
- - - - - - - - - - - - - - - -
{Lang::T('Type')}{$plan['type']}
{Lang::T('Price')}{Lang::moneyFormat($plan['price'])}
{Lang::T('Validity')}{$plan['validity']} {$plan['validity_unit']}
-
-
-
- {Lang::T('Buy')} - {if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']} - {Lang::T('Pay With Balance')} - {/if} -
- {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)} -
{if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if} -
-
- {foreach $plans_hotspot as $plan} - {if $router['name'] eq $plan['routers']} -
-
-
{$plan['name_plan']}
-
- - - - - - - - - - - - - - - -
{Lang::T('Type')}{$plan['type']}
{Lang::T('Price')}{Lang::moneyFormat($plan['price'])}
{Lang::T('Validity')}{$plan['validity']} {$plan['validity_unit']}
-
-
-
- {Lang::T('Buy')} - {if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']} - {Lang::T('Pay With Balance')} - {/if} -
- {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']} - {Lang::T('Buy for friend')} - {/if} -
-
-
- {/if} - {/foreach} -
-
{if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_plan']}{/if}
-
- {foreach $plans_pppoe as $plan} - {if $router['name'] eq $plan['routers']} -
-
-
{$plan['name_plan']}
-
- - - - - - - - - - - - - - - -
{Lang::T('Type')}{$plan['type']}
{Lang::T('Price')}{Lang::moneyFormat($plan['price'])}
{Lang::T('Validity')}{$plan['validity']} {$plan['validity_unit']}
-
-
-
- {Lang::T('Buy')} - {if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']} - {Lang::T('Pay With Balance')} - {/if} -
- {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'])} +
+
{$router['name']}
+ {if $router['description'] != ''} +
+ {$router['description']} +
{/if} + {if $_user['service_type'] == 'Hotspot' && Validator::countRouterPlan($plans_hotspot, $router['name'])>0} +
{if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if} +
+
+ {foreach $plans_hotspot as $plan} + {if $router['name'] eq $plan['routers']} +
+
+
{$plan['name_plan']}
+
+
+ + + + + + + + + + + + + + + +
{Lang::T('Type')}{$plan['type']}
{Lang::T('Price')}{Lang::moneyFormat($plan['price'])}
{Lang::T('Validity')}{$plan['validity']} {$plan['validity_unit']}
+
+
+
+
+ {Lang::T('Buy')} + {if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']} + {Lang::T('Pay With Balance')} + {/if} +
+ {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} +
{if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_plan']}{/if}
+
+ {foreach $plans_pppoe as $plan} + {if $router['name'] eq $plan['routers']} +
+
+
{$plan['name_plan']}
+
+
+ + + + + + + + + + + + + + + +
{Lang::T('Type')}{$plan['type']}
{Lang::T('Price')}{Lang::moneyFormat($plan['price'])}
{Lang::T('Validity')}{$plan['validity']} {$plan['validity_unit']}
+
+
+
+
+ {Lang::T('Buy')} + {if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']} + {Lang::T('Pay With Balance')} + {/if} +
+ {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)} +
{if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if} +
+
+ {foreach $plans_hotspot as $plan} + {if $router['name'] eq $plan['routers']} +
+
+
{$plan['name_plan']}
+
+
+ + + + + + + + + + + + + + + +
{Lang::T('Type')}{$plan['type']}
{Lang::T('Price')}{Lang::moneyFormat($plan['price'])}
{Lang::T('Validity')}{$plan['validity']} {$plan['validity_unit']}
+
+
+
+
+ {Lang::T('Buy')} + {if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']} + {Lang::T('Pay With Balance')} + {/if} +
+ {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && + $_user['balance']>=$plan['price']} + {Lang::T('Buy for friend')} + {/if} +
+
+
+ {/if} + {/foreach} +
+
{if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_plan']}{/if}
+
+ {foreach $plans_pppoe as $plan} + {if $router['name'] eq $plan['routers']} +
+
+
{$plan['name_plan']}
+
+
+ + + + + + + + + + + + + + + +
{Lang::T('Type')}{$plan['type']}
{Lang::T('Price')}{Lang::moneyFormat($plan['price'])}
{Lang::T('Validity')}{$plan['validity']} {$plan['validity_unit']}
+
+
+
+
+ {Lang::T('Buy')} + {if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']} + {Lang::T('Pay With Balance')} + {/if} +
+ {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'} -
-
{Lang::T('Buy Balance Plans')}
-
- {foreach $plans_balance as $plan} -
-
-
{$plan['name_plan']}
-
- - - - - - - -
{Lang::T('Price')}{Lang::moneyFormat($plan['price'])}
-
- +
+
{Lang::T('Buy Balance Plans')}
+
+ {foreach $plans_balance as $plan} +
+
+
{$plan['name_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 @@
-
-
   +
+
   +
@@ -126,6 +127,7 @@
+