Merge pull request #290 from Focuslinkstech/Development

This commit is contained in:
iBNu Maksum 2024-09-06 17:56:17 +07:00 committed by GitHub
commit f8351e46f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 785 additions and 734 deletions

View File

@ -210,14 +210,15 @@ class User
->select('tbl_user_recharges.id', 'id') ->select('tbl_user_recharges.id', 'id')
->selects([ ->selects([
'customer_id', 'username', 'plan_id', 'namebp', 'recharged_on', 'recharged_time', 'expiration', 'time', '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.routers', 'routers'],
['tbl_user_recharges.type', 'type'], ['tbl_user_recharges.type', 'type'],
'admin_id', 'prepaid' '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) ->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(); ->find_many();
return $d; return $d;
} }

View File

@ -80,8 +80,9 @@
</div> </div>
</div> </div>
</span> </span>
<div class="box box-primary box-solid"> <div class="box box-primary box-solid">
<div class="table-responsive">&nbsp;&nbsp; <div class="table-responsive">&nbsp;&nbsp;
<div style="margin-left: 5px; margin-right: 5px;">
<table class="table table-bordered table-condensed"> <table class="table table-bordered table-condensed">
<thead> <thead>
<tr> <tr>
@ -126,6 +127,7 @@
</tbody> </tbody>
</table> </table>
</div> </div>
</div>
<div class="box-footer"> <div class="box-footer">
<p class="text-center small text-info">{Lang::T('All Transactions at Date')}: <p class="text-center small text-info">{Lang::T('All Transactions at Date')}:
{Lang::dateAndTimeFormat($sd, $ts)} - {Lang::dateAndTimeFormat($ed, $te)}</p> {Lang::dateAndTimeFormat($sd, $ts)} - {Lang::dateAndTimeFormat($ed, $te)}</p>

View File

@ -4,11 +4,13 @@
<div class="row"> <div class="row">
<div class="col col-md-6 col-md-push-6"> <div class="col col-md-6 col-md-push-6">
{if $unpaid } {if $unpaid }
<div class="box box-danger box-solid"> <div class="box box-danger box-solid">
<div class="box-header"> <div class="box-header">
<h3 class="box-title">{Lang::T('Unpaid Order')}</h3> <h3 class="box-title">{Lang::T('Unpaid Order')}</h3>
</div> </div>
<table class="table table-condensed table-bordered table-striped table-hover" style="margin-bottom: 0px;"> <div style="margin-left: 5px; margin-right: 5px;">
<table class="table table-condensed table-bordered table-striped table-hover"
style="margin-bottom: 0px;">
<tbody> <tbody>
<tr> <tr>
<td>{Lang::T('expired')}</td> <td>{Lang::T('expired')}</td>
@ -28,25 +30,26 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
<div class="box-footer p-2">
<div class="btn-group btn-group-justified mb15">
<div class="btn-group">
<a href="{$_url}order/view/{$unpaid['id']}/cancel" class="btn btn-danger btn-sm"
onclick="return confirm('{Lang::T('Cancel it?')}')">
<span class="glyphicon glyphicon-trash"></span>
{Lang::T('Cancel')}
</a>
</div>
<div class="btn-group">
<a class="btn btn-success btn-block btn-sm" href="{$_url}order/view/{$unpaid['id']}">
<span class="icon"><i class="ion ion-card"></i></span>
<span>{Lang::T('PAY NOW')}</span>
</a>
</div>
</div>
</div>
</div> </div>
<div class="box-footer p-2">
<div class="btn-group btn-group-justified mb15">
<div class="btn-group">
<a href="{$_url}order/view/{$unpaid['id']}/cancel" class="btn btn-danger btn-sm"
onclick="return confirm('{Lang::T('Cancel it?')}')">
<span class="glyphicon glyphicon-trash"></span>
{Lang::T('Cancel')}
</a>
</div>
<div class="btn-group">
<a class="btn btn-success btn-block btn-sm" href="{$_url}order/view/{$unpaid['id']}">
<span class="icon"><i class="ion ion-card"></i></span>
<span>{Lang::T('PAY NOW')}</span>
</a>
</div>
</div>
</div>
</div>
{/if} {/if}
<div class="box box-info box-solid"> <div class="box box-info box-solid">
<div class="box-header"> <div class="box-header">
@ -55,7 +58,7 @@
<div class="box-body"> <div class="box-body">
{$Announcement_Customer = "{$PAGES_PATH}/Announcement_Customer.html"} {$Announcement_Customer = "{$PAGES_PATH}/Announcement_Customer.html"}
{if file_exists($Announcement_Customer)} {if file_exists($Announcement_Customer)}
{include file=$Announcement_Customer} {include file=$Announcement_Customer}
{/if} {/if}
</div> </div>
</div> </div>
@ -65,337 +68,353 @@
<div class="box-header"> <div class="box-header">
<h3 class="box-title">{Lang::T('Your Account Information')}</h3> <h3 class="box-title">{Lang::T('Your Account Information')}</h3>
</div> </div>
<table class="table table-bordered table-striped table-bordered table-hover mb-0" <div style="margin-left: 5px; margin-right: 5px;">
style="margin-bottom: 0px;"> <table class="table table-bordered table-striped table-bordered table-hover mb-0"
<tr> style="margin-bottom: 0px;">
<td class="small text-success text-uppercase text-normal">{Lang::T('Username')}</td> <tr>
<td class="small mb15">{$_user['username']}</td> <td class="small text-success text-uppercase text-normal">{Lang::T('Username')}</td>
</tr> <td class="small mb15">{$_user['username']}</td>
<tr> </tr>
<td class="small text-success text-uppercase text-normal">{Lang::T('Password')}</td> <tr>
<td class="small mb15"><input type="password" value="{$_user['password']}" <td class="small text-success text-uppercase text-normal">{Lang::T('Password')}</td>
style="width:100%; border: 0px;" onmouseleave="this.type = 'password'" <td class="small mb15"><input type="password" value="{$_user['password']}"
onmouseenter="this.type = 'text'" onclick="this.select()"></td> style="width:100%; border: 0px;" onmouseleave="this.type = 'password'"
</tr> onmouseenter="this.type = 'text'" onclick="this.select()"></td>
<tr> </tr>
<td class="small text-success text-uppercase text-normal">{Lang::T('Service Type')}</td> <tr>
<td class="small mb15"> <td class="small text-success text-uppercase text-normal">{Lang::T('Service Type')}</td>
{if $_user.service_type == 'Hotspot'} <td class="small mb15">
{if $_user.service_type == 'Hotspot'}
Hotspot Hotspot
{elseif $_user.service_type == 'PPPoE'} {elseif $_user.service_type == 'PPPoE'}
PPPoE PPPoE
{elseif $_user.service_type == 'Others' || $_user.service_type == null} {elseif $_user.service_type == 'Others' || $_user.service_type == null}
Others Others
{/if} {/if}
</td> </td>
</tr> </tr>
{if $_c['enable_balance'] == 'yes'} {if $_c['enable_balance'] == 'yes'}
<tr> <tr>
<td class="small text-warning text-uppercase text-normal">{Lang::T('Balance')}</td> <td class="small text-warning text-uppercase text-normal">{Lang::T('Balance')}</td>
<td class="small mb15 text-bold"> <td class="small mb15 text-bold">
{Lang::moneyFormat($_user['balance'])} {Lang::moneyFormat($_user['balance'])}
{if $_user['auto_renewal'] == 1} {if $_user['auto_renewal'] == 1}
<a class="label label-success pull-right" href="{$_url}home&renewal=0" <a class="label label-success pull-right" href="{$_url}home&renewal=0"
onclick="return confirm('{Lang::T('Disable auto renewal?')}')">{Lang::T('Auto Renewal On')}</a> onclick="return confirm('{Lang::T('Disable auto renewal?')}')">{Lang::T('Auto Renewal
On')}</a>
{else} {else}
<a class="label label-danger pull-right" href="{$_url}home&renewal=1" <a class="label label-danger pull-right" href="{$_url}home&renewal=1"
onclick="return confirm('{Lang::T('Enable auto renewal?')}')">{Lang::T('Auto Renewal Off')}</a> onclick="return confirm('{Lang::T('Enable auto renewal?')}')">{Lang::T('Auto Renewal
Off')}</a>
{/if} {/if}
</td> </td>
</tr> </tr>
{/if} {/if}
</table> </table>
</div>
{if $abills && count($abills)>0} {if $abills && count($abills)>0}
<div class="box-header"> <div class="box-header">
<h3 class="box-title">{Lang::T('Additional Billing')}</h3> <h3 class="box-title">{Lang::T('Additional Billing')}</h3>
</div> </div>
<div style="margin-left: 5px; margin-right: 5px;">
<table class="table table-bordered table-striped table-bordered table-hover mb-0" <table class="table table-bordered table-striped table-bordered table-hover mb-0"
style="margin-bottom: 0px;"> style="margin-bottom: 0px;">
{assign var="total" value=0} {assign var="total" value=0}
{foreach $abills as $k => $v} {foreach $abills as $k => $v}
<tr> <tr>
<td class="small text-success text-uppercase text-normal">{str_replace(' Bill', '', $k)}</td> <td class="small text-success text-uppercase text-normal">{str_replace(' Bill', '', $k)}</td>
<td class="small mb15"> <td class="small mb15">
{if strpos($v, ':') === false} {if strpos($v, ':') === false}
{Lang::moneyFormat($v)} {Lang::moneyFormat($v)}
<sup title="recurring">∞</sup> <sup title="recurring">∞</sup>
{assign var="total" value=$v+$total} {assign var="total" value=$v+$total}
{else} {else}
{assign var="exp" value=explode(':',$v)} {assign var="exp" value=explode(':',$v)}
{Lang::moneyFormat($exp[0])} {Lang::moneyFormat($exp[0])}
<sup <sup title="{$exp[1]} more times">{if $exp[1]==0}{Lang::T('paid
title="{$exp[1]} more times">{if $exp[1]==0}{Lang::T('paid off')}{else}{$exp[1]}x{/if}</sup> off')}{else}{$exp[1]}x{/if}</sup>
{if $exp[1]>0} {if $exp[1]>0}
{assign var="total" value=$exp[0]+$total} {assign var="total" value=$exp[0]+$total}
{/if} {/if}
{/if} {/if}
</td> </td>
</tr> </tr>
{/foreach} {/foreach}
<tr> <tr>
<td class="small text-success text-uppercase text-normal"><b>{Lang::T('Total')}</b></td> <td class="small text-success text-uppercase text-normal"><b>{Lang::T('Total')}</b></td>
<td class="small mb15"><b> <td class="small mb15"><b>
{if $total==0} {if $total==0}
{ucwords(Lang::T('paid off'))} {ucwords(Lang::T('paid off'))}
{else} {else}
{Lang::moneyFormat($total)} {Lang::moneyFormat($total)}
{/if} {/if}
</b></td> </b></td>
</tr> </tr>
</table> </table>
</div> &nbsp;&nbsp;
{/if} {/if}
</div> </div>
{if $_bills} {if $_bills}
<div class="box box-primary box-solid"> <div class="box box-primary box-solid">
{foreach $_bills as $_bill} {foreach $_bills as $_bill}
{if $_bill['routers'] != 'radius'} {if $_bill['routers'] != 'radius'}
<div class="box-header"> <div class="box-header">
<h3 class="box-title">{$_bill['routers']}</h3> <h3 class="box-title">{$_bill['routers']}</h3>
<div class="btn-group pull-right"> <div class="btn-group pull-right">
{if $_bill['type'] == 'Hotspot'} {if $_bill['type'] == 'Hotspot'}
{if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if} {if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if}
{else}
{if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_plan']}{/if}
{/if}
</div>
</div>
{else} {else}
<div class="box-header"> {if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_plan']}{/if}
<h3 class="box-title">{if $_c['radius_plan']==''}Radius Plan{else}{$_c['radius_plan']}{/if}</h3>
</div>
{/if} {/if}
<table class="table table-bordered table-striped table-bordered table-hover" style="margin-bottom: 0px;"> </div>
<tr>
<td class="small text-primary text-uppercase text-normal">{Lang::T('Plan Name')}</td>
<td class="small mb15">
{$_bill['namebp']}
{if $_bill['status'] != 'on'}
<a class="label label-danger pull-right" href="{$_url}order/package">{Lang::T('expired')}</a>
{/if}
</td>
</tr>
<tr>
<td class="small text-primary text-uppercase text-normal">{Lang::T('Bandwidth')}</td>
<td class="small mb15">
{$_bill['name_bw']}
</td>
</tr>
<tr>
<td class="small text-info text-uppercase text-normal">{Lang::T('Created On')}</td>
<td class="small mb15">
{if $_bill['time'] ne ''}{Lang::dateAndTimeFormat($_bill['recharged_on'],$_bill['recharged_time'])}
{/if}&nbsp;</td>
</tr>
<tr>
<td class="small text-danger text-uppercase text-normal">{Lang::T('Expires On')}</td>
<td class="small mb15 text-danger">
{if $_bill['time'] ne ''}{Lang::dateAndTimeFormat($_bill['expiration'],$_bill['time'])}{/if}&nbsp;
</td>
</tr>
<tr>
<td class="small text-success text-uppercase text-normal">{Lang::T('Type')}</td>
<td class="small mb15 text-success">
<b>{if $_bill['prepaid'] eq yes}Prepaid{else}Postpaid{/if}</b>
{$_bill['plan_type']}
</td>
</tr>
{if $nux_ip neq ''}
<tr>
<td class="small text-primary text-uppercase text-normal">{Lang::T('Current IP')}</td>
<td class="small mb15">{$nux_ip}</td>
</tr>
{/if}
{if $nux_mac neq ''}
<tr>
<td class="small text-primary text-uppercase text-normal">{Lang::T('Current MAC')}</td>
<td class="small mb15">{$nux_mac}</td>
</tr>
{/if}
{if $_bill['type'] == 'Hotspot' && $_bill['status'] == 'on' && $_bill['routers'] != 'radius' && $_c['hs_auth_method'] != 'hchap'}
<tr>
<td class="small text-primary text-uppercase text-normal">{Lang::T('Login Status')}</td>
<td class="small mb15" id="login_status_{$_bill['id']}">
<img src="ui/ui/images/loading.gif">
</td>
</tr>
{/if}
{if $_bill['type'] == 'Hotspot' && $_bill['status'] == 'on' && $_c['hs_auth_method'] == 'hchap'}
<tr>
<td class="small text-primary text-uppercase text-normal">{Lang::T('Login Status')}</td>
<td class="small mb15">
{if $logged == '1'}
<a href="http://{$hostname}/status"
class="btn btn-success btn-xs btn-block">{Lang::T('You are Online, Check Status')}</a>
{else}
<a href="{$_url}home&mikrotik=login"
onclick="return confirm('{Lang::T('Connect to Internet')}')"
class="btn btn-danger btn-xs btn-block">{Lang::T('Not Online, Login now?')}</a>
{/if}
</td>
</tr>
{/if}
<tr>
<td class="small text-primary text-uppercase text-normal">
{if $_bill['status'] == 'on'}
<a href="{$_url}home&deactivate={$_bill['id']}"
onclick="return confirm('{Lang::T('Deactivate')}?')" class="btn btn-danger btn-xs"><i
class="glyphicon glyphicon-trash"></i></a>
{/if}
</td>
<td class="small row">
{if $_bill['status'] != 'on' && $_bill['prepaid'] != 'yes' && $_c['extend_expired']}
<a class="btn btn-warning text-black btn-sm"
href="{$_url}home&extend={$_bill['id']}&stoken={App::getToken()}"
onclick="return confirm('{Text::toHex($_c['extend_confirmation'])}')">{Lang::T('Extend')}</a>
{/if}
<a class="btn btn-primary pull-right btn-sm"
href="{$_url}home&recharge={$_bill['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Recharge')}?')">{Lang::T('Recharge')}</a>
<a class="btn btn-warning text-black pull-right btn-sm"
href="{$_url}home&sync={$_bill['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Sync account if you failed login to internet')}?')"
data-toggle="tooltip" data-placement="top" title="{Lang::T('Sync account if you failed login to internet')}"><span
class="glyphicon glyphicon-refresh" aria-hidden="true"></span> {Lang::T('Sync')}</a>
</td>
</tr>
</table>
{/foreach}
</div> </div>
{else}
<div class="box-header">
<h3 class="box-title">{if $_c['radius_plan']==''}Radius Plan{else}{$_c['radius_plan']}{/if}</h3>
</div>
{/if}
<div style="margin-left: 5px; margin-right: 5px;">
<table class="table table-bordered table-striped table-bordered table-hover"
style="margin-bottom: 0px;">
<tr>
<td class="small text-primary text-uppercase text-normal">{Lang::T('Plan Name')}</td>
<td class="small mb15">
{$_bill['namebp']}
{if $_bill['status'] != 'on'}
<a class="label label-danger pull-right"
href="{$_url}order/package">{Lang::T('expired')}</a>
{/if}
</td>
</tr>
<tr>
<td class="small text-primary text-uppercase text-normal">{Lang::T('Bandwidth')}</td>
<td class="small mb15">
{$_bill['name_bw']}
</td>
</tr>
<tr>
<td class="small text-info text-uppercase text-normal">{Lang::T('Created On')}</td>
<td class="small mb15">
{if $_bill['time'] ne
''}{Lang::dateAndTimeFormat($_bill['recharged_on'],$_bill['recharged_time'])}
{/if}&nbsp;</td>
</tr>
<tr>
<td class="small text-danger text-uppercase text-normal">{Lang::T('Expires On')}</td>
<td class="small mb15 text-danger">
{if $_bill['time'] ne
''}{Lang::dateAndTimeFormat($_bill['expiration'],$_bill['time'])}{/if}&nbsp;
</td>
</tr>
<tr>
<td class="small text-success text-uppercase text-normal">{Lang::T('Type')}</td>
<td class="small mb15 text-success">
<b>{if $_bill['prepaid'] eq yes}Prepaid{else}Postpaid{/if}</b>
{$_bill['plan_type']}
</td>
</tr>
{if $nux_ip neq ''}
<tr>
<td class="small text-primary text-uppercase text-normal">{Lang::T('Current IP')}</td>
<td class="small mb15">{$nux_ip}</td>
</tr>
{/if}
{if $nux_mac neq ''}
<tr>
<td class="small text-primary text-uppercase text-normal">{Lang::T('Current MAC')}</td>
<td class="small mb15">{$nux_mac}</td>
</tr>
{/if}
{if $_bill['type'] == 'Hotspot' && $_bill['status'] == 'on' && $_bill['routers'] != 'radius' &&
$_c['hs_auth_method'] != 'hchap'}
<tr>
<td class="small text-primary text-uppercase text-normal">{Lang::T('Login Status')}</td>
<td class="small mb15" id="login_status_{$_bill['id']}">
<img src="ui/ui/images/loading.gif">
</td>
</tr>
{/if}
{if $_bill['type'] == 'Hotspot' && $_bill['status'] == 'on' && $_c['hs_auth_method'] == 'hchap'}
<tr>
<td class="small text-primary text-uppercase text-normal">{Lang::T('Login Status')}</td>
<td class="small mb15">
{if $logged == '1'}
<a href="http://{$hostname}/status" class="btn btn-success btn-xs btn-block">{Lang::T('You
are
Online, Check Status')}</a>
{else}
<a href="{$_url}home&mikrotik=login"
onclick="return confirm('{Lang::T('Connect to Internet')}')"
class="btn btn-danger btn-xs btn-block">{Lang::T('Not Online, Login now?')}</a>
{/if}
</td>
</tr>
{/if}
<tr>
<td class="small text-primary text-uppercase text-normal">
{if $_bill['status'] == 'on'}
<a href="{$_url}home&deactivate={$_bill['id']}"
onclick="return confirm('{Lang::T('Deactivate')}?')" class="btn btn-danger btn-xs"><i
class="glyphicon glyphicon-trash"></i></a>
{/if}
</td>
<td class="small row">
{if $_bill['status'] != 'on' && $_bill['prepaid'] != 'yes' && $_c['extend_expired']}
<a class="btn btn-warning text-black btn-sm"
href="{$_url}home&extend={$_bill['id']}&stoken={App::getToken()}"
onclick="return confirm('{Text::toHex($_c['extend_confirmation'])}')">{Lang::T('Extend')}</a>
{/if}
<a class="btn btn-primary pull-right btn-sm"
href="{$_url}home&recharge={$_bill['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Recharge')}?')">{Lang::T('Recharge')}</a>
<a class="btn btn-warning text-black pull-right btn-sm"
href="{$_url}home&sync={$_bill['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Sync account if you failed login to internet')}?')"
data-toggle="tooltip" data-placement="top"
title="{Lang::T('Sync account if you failed login to internet')}"><span
class="glyphicon glyphicon-refresh" aria-hidden="true"></span> {Lang::T('Sync')}</a>
</td>
</tr>
</table>
</div>
&nbsp;&nbsp;
{/foreach}
</div>
{/if} {/if}
{if $_c['disable_voucher'] == 'yes'} {if $_c['disable_voucher'] == 'yes'}
<div class="box-footer"> <div class="box-footer">
{if $_c['payment_gateway'] != 'none' or $_c['payment_gateway'] == '' } {if $_c['payment_gateway'] != 'none' or $_c['payment_gateway'] == '' }
<a href="{$_url}order/package" class="btn btn-primary btn-block"> <a href="{$_url}order/package" class="btn btn-primary btn-block">
<i class="ion ion-ios-cart"></i> <i class="ion ion-ios-cart"></i>
{Lang::T('Order Package')} {Lang::T('Order Package')}
</a> </a>
{/if} {/if}
</div> </div>
{/if} {/if}
{if $_bills} {if $_bills}
{foreach $_bills as $_bill} {foreach $_bills as $_bill}
{if $_bill['type'] == 'Hotspot' && $_bill['status'] == 'on' && $_c['hs_auth_method'] != 'hchap'} {if $_bill['type'] == 'Hotspot' && $_bill['status'] == 'on' && $_c['hs_auth_method'] != 'hchap'}
<script> <script>
setTimeout(() => { setTimeout(() => {
$.ajax({ $.ajax({
url: "index.php?_route=autoload_user/isLogin/{$_bill['id']}", url: "index.php?_route=autoload_user/isLogin/{$_bill['id']}",
cache: false, cache: false,
success: function(msg) { success: function (msg) {
$("#login_status_{$_bill['id']}").html(msg); $("#login_status_{$_bill['id']}").html(msg);
} }
}); });
}, 2000); }, 2000);
</script> </script>
{/if} {/if}
{/foreach} {/foreach}
{/if} {/if}
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes'} {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes'}
<div class="box box-primary box-solid mb30"> <div class="box box-primary box-solid mb30">
<div class="box-header"> <div class="box-header">
<h4 class="box-title">{Lang::T("Transfer Balance")}</h4> <h4 class="box-title">{Lang::T("Transfer Balance")}</h4>
</div> </div>
<div class="box-body p-0"> <div class="box-body p-0">
<form method="post" onsubmit="return askConfirm()" role="form" action="{$_url}home"> <form method="post" onsubmit="return askConfirm()" role="form" action="{$_url}home">
<div class="form-group"> <div class="form-group">
<div class="col-sm-5"> <div class="col-sm-5">
<input type="text" id="username" name="username" class="form-control" required <input type="text" id="username" name="username" class="form-control" required
placeholder="{Lang::T('Username')}"> placeholder="{Lang::T('Username')}">
</div>
<div class="col-sm-5">
<input type="number" id="balance" name="balance" autocomplete="off" class="form-control"
required placeholder="{Lang::T('Balance')}">
</div>
<div class="form-group col-sm-2" align="center">
<button class="btn btn-success btn-block" id="sendBtn" type="submit" name="send"
onclick="return confirm('{Lang::T("Are You Sure?")}')" value="balance"><i
class="glyphicon glyphicon-send"></i></button>
</div>
</div> </div>
</form> <div class="col-sm-5">
<script> <input type="number" id="balance" name="balance" autocomplete="off" class="form-control"
function askConfirm() { required placeholder="{Lang::T('Balance')}">
if(confirm('{Lang::T('Send your balance?')}')){ </div>
<div class="form-group col-sm-2" align="center">
<button class="btn btn-success btn-block" id="sendBtn" type="submit" name="send"
onclick="return confirm('{Lang::T(" Are You Sure?")}')" value="balance"><i
class="glyphicon glyphicon-send"></i></button>
</div>
</div>
</form>
<script>
function askConfirm() {
if (confirm('{Lang::T('Send your balance ? ')}')) {
setTimeout(() => { setTimeout(() => {
document.getElementById('sendBtn').setAttribute('disabled', ''); document.getElementById('sendBtn').setAttribute('disabled', '');
}, 1000); }, 1000);
return true; return true;
} }
return false; return false;
} }
</script> </script>
</div>
<div class="box-header">
<h4 class="box-title">{Lang::T("Recharge a friend")}</h4>
</div>
<div class="box-body p-0">
<form method="post" role="form" action="{$_url}home">
<div class="form-group">
<div class="col-sm-10">
<input type="text" id="username" name="username" class="form-control" required
placeholder="{Lang::T('Username')}">
</div>
<div class="form-group col-sm-2" align="center">
<button class="btn btn-success btn-block" id="sendBtn" type="submit" name="send"
onclick="return confirm('{Lang::T("Are You Sure?")}')" value="plan"><i
class="glyphicon glyphicon-send"></i></button>
</div>
</div>
</form>
</div>
</div> </div>
<div class="box-header">
<h4 class="box-title">{Lang::T("Recharge a friend")}</h4>
</div>
<div class="box-body p-0">
<form method="post" role="form" action="{$_url}home">
<div class="form-group">
<div class="col-sm-10">
<input type="text" id="username" name="username" class="form-control" required
placeholder="{Lang::T('Username')}">
</div>
<div class="form-group col-sm-2" align="center">
<button class="btn btn-success btn-block" id="sendBtn" type="submit" name="send"
onclick="return confirm('{Lang::T(" Are You Sure?")}')" value="plan"><i
class="glyphicon glyphicon-send"></i></button>
</div>
</div>
</form>
</div>
</div>
{/if} {/if}
<br> <br>
{if $_c['disable_voucher'] != 'yes'} {if $_c['disable_voucher'] != 'yes'}
<div class="box box-primary box-solid mb30"> <div class="box box-primary box-solid mb30">
<div class="box-header"> <div class="box-header">
<h3 class="box-title">{Lang::T('Voucher Activation')}</h3> <h3 class="box-title">{Lang::T('Voucher Activation')}</h3>
</div> </div>
<div class="box-body"> <div class="box-body">
<form method="post" role="form" class="form-horizontal" action="{$_url}voucher/activation-post"> <form method="post" role="form" class="form-horizontal" action="{$_url}voucher/activation-post">
<div class="input-group"> <div class="input-group">
<span class="input-group-btn"> <span class="input-group-btn">
<a class="btn btn-default" <a class="btn btn-default" href="{APP_URL}/scan/?back={urlencode($_url)}{urlencode("
href="{APP_URL}/scan/?back={urlencode($_url)}{urlencode("home&code=")}"><i home&code=")}"><i class="glyphicon glyphicon-qrcode"></i></a>
class="glyphicon glyphicon-qrcode"></i></a> </span>
</span> <input type="text" id="code" name="code" class="form-control"
<input type="text" id="code" name="code" class="form-control" placeholder="{Lang::T('Enter voucher code here')}" value="{$code}">
placeholder="{Lang::T('Enter voucher code here')}" value="{$code}"> <span class="input-group-btn">
<span class="input-group-btn"> <button class="btn btn-primary" type="submit">{Lang::T('Recharge')}</button>
<button class="btn btn-primary" type="submit">{Lang::T('Recharge')}</button> </span>
</span>
</div>
</form>
</div>
<div class="box-body">
<div class="btn-group btn-group-justified" role="group">
<a class="btn btn-default" href="{$_url}voucher/activation">
<i class="ion ion-ios-cart"></i>
{Lang::T('Order Voucher')}
</a>
{if $_c['payment_gateway'] != 'none' or $_c['payment_gateway'] == '' }
<a href="{$_url}order/package" class="btn btn-default">
<i class="ion ion-ios-cart"></i>
{Lang::T('Order Package')}
</a>
{/if}
</div> </div>
</form>
</div>
<div class="box-body">
<div class="btn-group btn-group-justified" role="group">
<a class="btn btn-default" href="{$_url}voucher/activation">
<i class="ion ion-ios-cart"></i>
{Lang::T('Order Voucher')}
</a>
{if $_c['payment_gateway'] != 'none' or $_c['payment_gateway'] == '' }
<a href="{$_url}order/package" class="btn btn-default">
<i class="ion ion-ios-cart"></i>
{Lang::T('Order Package')}
</a>
{/if}
</div> </div>
</div> </div>
</div>
{/if} {/if}
</div> </div>
</div> </div>
{if isset($hostname) && $hchap == 'true' && $_c['hs_auth_method'] == 'hchap'} {if isset($hostname) && $hchap == 'true' && $_c['hs_auth_method'] == 'hchap'}
<script type="text/javascript" src="/ui/ui/scripts/md5.js"></script> <script type="text/javascript" src="/ui/ui/scripts/md5.js"></script>
<script type="text/javascript"> <script type="text/javascript">
var hostname = "http://{$hostname}/login"; var hostname = "http://{$hostname}/login";
var user = "{$_user['username']}"; var user = "{$_user['username']}";
var pass = "{$_user['password']}"; var pass = "{$_user['password']}";
var dst = "{$apkurl}"; var dst = "{$apkurl}";
var authdly = "2"; var authdly = "2";
var key = hexMD5('{$key1}' + pass + '{$key2}'); var key = hexMD5('{$key1}' + pass + '{$key2}');
var auth = hostname + '?username=' + user + '&dst=' + dst + '&password=' + key; var auth = hostname + '?username=' + user + '&dst=' + dst + '&password=' + key;
document.write('<meta http-equiv="refresh" target="_blank" content="' + authdly + '; url=' + auth + '">'); document.write('<meta http-equiv="refresh" target="_blank" content="' + authdly + '; url=' + auth + '">');
</script> </script>
{/if} {/if}
{include file="user-ui/footer.tpl"} {include file="user-ui/footer.tpl"}

View File

@ -3,35 +3,36 @@
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
{if $_c['enable_balance'] == 'yes'} {if $_c['enable_balance'] == 'yes'}
<div class="box box-solid box-success bg-gray-light"> <div class="box box-solid box-success bg-gray-light">
<div class="box-header">{Lang::T('Buy Balance Plans')}</div> <div class="box-header">{Lang::T('Buy Balance Plans')}</div>
<div class="box-body row"> <div class="box-body row">
{foreach $plans_balance as $plan} {foreach $plans_balance as $plan}
<div class="col col-md-4"> <div class="col col-md-4">
<div class="box box-solid box-default"> <div class="box box-solid box-default">
<div class="box-header text-bold">{$plan['name_plan']}</div> <div class="box-header text-bold">{$plan['name_plan']}</div>
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-bordered table-striped"> <div style="margin-left: 5px; margin-right: 5px;">
<tbody> <table class="table table-bordered table-striped">
<tr> <tbody>
<td>{Lang::T('Price')}</td> <tr>
<td>{Lang::moneyFormat($plan['price'])}</td> <td>{Lang::T('Price')}</td>
</tr> <td>{Lang::moneyFormat($plan['price'])}</td>
</tbody> </tr>
</table> </tbody>
</div> </table>
<div class="box-body">
<a href="{$_url}order/gateway/0/{$plan['id']}"
onclick="return confirm('{Lang::T('Buy Balance')}?')"
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy')}</a>
</div>
</div> </div>
</div> </div>
{/foreach} <div class="box-body">
<a href="{$_url}order/gateway/0/{$plan['id']}"
onclick="return confirm('{Lang::T('Buy Balance')}?')"
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy')}</a>
</div>
</div>
</div> </div>
{/foreach}
</div> </div>
</div>
{/if} {/if}
</div> </div>
</div> </div>
</div>
{include file="user-ui/footer.tpl"} {include file="user-ui/footer.tpl"}

View File

@ -6,418 +6,446 @@
<div class="box-header">{Lang::T('Order Internet Package')}</div> <div class="box-header">{Lang::T('Order Internet Package')}</div>
</div> </div>
{if $_c['radius_enable']} {if $_c['radius_enable']}
{if $_user['service_type'] == 'PPPoE'} {if $_user['service_type'] == 'PPPoE'}
{if Lang::arrayCount($radius_pppoe)>0} {if Lang::arrayCount($radius_pppoe)>0}
<ol class="breadcrumb"> <ol class="breadcrumb">
<li>{if $_c['radius_plan']==''}Radius Plan{else}{$_c['radius_plan']}{/if}</li> <li>{if $_c['radius_plan']==''}Radius Plan{else}{$_c['radius_plan']}{/if}</li>
<li>{if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_plan']}{/if}</li> <li>{if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_plan']}{/if}</li>
</ol> </ol>
<div class="row"> <div class="row">
{foreach $radius_pppoe as $plan} {foreach $radius_pppoe as $plan}
<div class="col col-md-4"> <div class="col col-md-4">
<div class="box box-primary"> <div class="box box-primary">
<div class="box-header text-bold">{$plan['name_plan']}</div> <div class="box-header text-bold">{$plan['name_plan']}</div>
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-bordered table-striped"> <div style="margin-left: 5px; margin-right: 5px;">
<tbody> <table class="table table-bordered table-striped">
<tr> <tbody>
<td>{Lang::T('Type')}</td> <tr>
<td>{$plan['type']}</td> <td>{Lang::T('Type')}</td>
</tr> <td>{$plan['type']}</td>
<tr> </tr>
<td>{Lang::T('Price')}</td> <tr>
<td>{Lang::moneyFormat($plan['price'])}</td> <td>{Lang::T('Price')}</td>
</tr> <td>{Lang::moneyFormat($plan['price'])}</td>
<tr> </tr>
<td>{Lang::T('Validity')}</td> <tr>
<td>{$plan['validity']} {$plan['validity_unit']}</td> <td>{Lang::T('Validity')}</td>
</tr> <td>{$plan['validity']} {$plan['validity_unit']}</td>
</tbody> </tr>
</table> </tbody>
</div> </table>
<div class="box-body"> </div>
<div class="btn-group btn-group-justified" role="group" aria-label="...">
<a href="{$_url}order/gateway/radius/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-warning text-black">{Lang::T('Buy')}</a>
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/pay/radius/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
{/if}
</div>
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/send/radius/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this for friend account?')}')"
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
{/if}
</div>
</div>
</div>
{/foreach}
</div> </div>
{/if} <div class="box-body">
{elseif $_user['service_type'] == 'Hotspot'} <div class="btn-group btn-group-justified" role="group" aria-label="...">
{if Lang::arrayCount($radius_hotspot)>0} <a href="{$_url}order/gateway/radius/{$plan['id']}&stoken={App::getToken()}"
<ol class="breadcrumb"> onclick="return confirm('{Lang::T('Buy this? your active package will be overwrite')}')"
<li>{if $_c['radius_plan']==''}Radius Plan{else}{$_c['radius_plan']}{/if}</li> class="btn btn-sm btn-block btn-warning text-black">{Lang::T('Buy')}</a>
<li>{if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if}</li> {if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
</ol> <a href="{$_url}order/pay/radius/{$plan['id']}&stoken={App::getToken()}"
<div class="row"> onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwrite')}')"
{foreach $radius_hotspot as $plan} class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
<div class="col col-md-4"> {/if}
<div class="box box-primary"> </div>
<div class="box-header text-bold">{$plan['name_plan']}</div> {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' &&
<div class="table-responsive"> $_user['balance']>=$plan['price']}
<table class="table table-bordered table-striped"> <a href="{$_url}order/send/radius/{$plan['id']}&stoken={App::getToken()}"
<tbody> onclick="return confirm('{Lang::T('Buy this for friend account?')}')"
<tr> class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
<td>{Lang::T('Type')}</td> {/if}
<td>{$plan['type']}</td>
</tr>
<tr>
<td>{Lang::T('Price')}</td>
<td>{Lang::moneyFormat($plan['price'])}</td>
</tr>
<tr>
<td>{Lang::T('Validity')}</td>
<td>{$plan['validity']} {$plan['validity_unit']}</td>
</tr>
</tbody>
</table>
</div>
<div class="box-body">
<div class="btn-group btn-group-justified" role="group" aria-label="...">
<a href="{$_url}order/gateway/radius/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-warning text-black">{Lang::T('Buy')}</a>
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/pay/radius/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
{/if}
</div>
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/send/radius/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this for friend account?')}')"
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
{/if}
</div>
</div>
</div>
{/foreach}
</div> </div>
{/if} </div>
{elseif $_user['service_type'] == 'Others' || $_user['service_type'] == '' && (Lang::arrayCount($radius_pppoe)>0 || Lang::arrayCount($radius_hotspot)>0)} </div>
<ol class="breadcrumb"> {/foreach}
<li>{if $_c['radius_plan']==''}Radius Plan{else}{$_c['radius_plan']}{/if}</li> </div>
<li>{if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_plan']}{/if}</li> {/if}
</ol> {elseif $_user['service_type'] == 'Hotspot'}
{if Lang::arrayCount($radius_pppoe)>0} {if Lang::arrayCount($radius_hotspot)>0}
<div class="row"> <ol class="breadcrumb">
{foreach $radius_pppoe as $plan} <li>{if $_c['radius_plan']==''}Radius Plan{else}{$_c['radius_plan']}{/if}</li>
<div class="col col-md-4"> <li>{if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if}</li>
<div class="box box-primary"> </ol>
<div class="box-header text-bold">{$plan['name_plan']}</div> <div class="row">
<div class="table-responsive"> {foreach $radius_hotspot as $plan}
<table class="table table-bordered table-striped"> <div class="col col-md-4">
<tbody> <div class="box box-primary">
<tr> <div class="box-header text-bold">{$plan['name_plan']}</div>
<td>{Lang::T('Type')}</td> <div class="table-responsive">
<td>{$plan['type']}</td> <div style="margin-left: 5px; margin-right: 5px;">
</tr> <table class="table table-bordered table-striped">
<tr> <tbody>
<td>{Lang::T('Price')}</td> <tr>
<td>{Lang::moneyFormat($plan['price'])}</td> <td>{Lang::T('Type')}</td>
</tr> <td>{$plan['type']}</td>
<tr> </tr>
<td>{Lang::T('Validity')}</td> <tr>
<td>{$plan['validity']} {$plan['validity_unit']}</td> <td>{Lang::T('Price')}</td>
</tr> <td>{Lang::moneyFormat($plan['price'])}</td>
</tbody> </tr>
</table> <tr>
</div> <td>{Lang::T('Validity')}</td>
<div class="box-body"> <td>{$plan['validity']} {$plan['validity_unit']}</td>
<div class="btn-group btn-group-justified" role="group" aria-label="..."> </tr>
<a href="{$_url}order/gateway/pppoe/{$plan['id']}&stoken={App::getToken()}" </tbody>
onclick="return confirm('{Lang::T('Buy this? your active package will be overwritten')}')" </table>
class="btn btn-sm btn-block btn-warning text-black">{Lang::T('Buy')}</a> </div>
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/pay/pppoe/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwritten')}')"
class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
{/if}
</div>
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/send/pppoe/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this for friend account?')}')"
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
{/if}
</div>
</div>
</div>
{/foreach}
</div> </div>
{/if} <div class="box-body">
{if Lang::arrayCount($radius_hotspot)>0} <div class="btn-group btn-group-justified" role="group" aria-label="...">
<ol class="breadcrumb"> <a href="{$_url}order/gateway/radius/{$plan['id']}&stoken={App::getToken()}"
<li>{if $_c['radius_plan']==''}Radius Plan{else}{$_c['radius_plan']}{/if}</li> onclick="return confirm('{Lang::T('Buy this? your active package will be overwrite')}')"
<li>{if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if}</li> class="btn btn-sm btn-block btn-warning text-black">{Lang::T('Buy')}</a>
</ol> {if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
<div class="row"> <a href="{$_url}order/pay/radius/{$plan['id']}&stoken={App::getToken()}"
{foreach $radius_hotspot as $plan} onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwrite')}')"
<div class="col col-md-4"> class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
<div class="box box-primary"> {/if}
<div class="box-header text-bold">{$plan['name_plan']}</div> </div>
<div class="table-responsive"> {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' &&
<table class="table table-bordered table-striped"> $_user['balance']>=$plan['price']}
<tbody> <a href="{$_url}order/send/radius/{$plan['id']}&stoken={App::getToken()}"
<tr> onclick="return confirm('{Lang::T('Buy this for friend account?')}')"
<td>{Lang::T('Type')}</td> class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
<td>{$plan['type']}</td> {/if}
</tr>
<tr>
<td>{Lang::T('Price')}</td>
<td>{Lang::moneyFormat($plan['price'])}</td>
</tr>
<tr>
<td>{Lang::T('Validity')}</td>
<td>{$plan['validity']} {$plan['validity_unit']}</td>
</tr>
</tbody>
</table>
</div>
<div class="box-body">
<div class="btn-group btn-group-justified" role="group" aria-label="...">
<a href="{$_url}order/gateway/hotspot/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this? your active package will be overwritten')}')"
class="btn btn-sm btn-block btn-warning text-black">{Lang::T('Buy')}</a>
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/pay/hotspot/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwritten')}')"
class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
{/if}
</div>
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/send/hotspot/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this for friend account?')}')"
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
{/if}
</div>
</div>
</div>
{/foreach}
</div> </div>
{/if} </div>
{/if} </div>
{/foreach}
</div>
{/if}
{elseif $_user['service_type'] == 'Others' || $_user['service_type'] == '' && (Lang::arrayCount($radius_pppoe)>0
|| Lang::arrayCount($radius_hotspot)>0)}
<ol class="breadcrumb">
<li>{if $_c['radius_plan']==''}Radius Plan{else}{$_c['radius_plan']}{/if}</li>
<li>{if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_plan']}{/if}</li>
</ol>
{if Lang::arrayCount($radius_pppoe)>0}
<div class="row">
{foreach $radius_pppoe as $plan}
<div class="col col-md-4">
<div class="box box-primary">
<div class="box-header text-bold">{$plan['name_plan']}</div>
<div class="table-responsive">
<div style="margin-left: 5px; margin-right: 5px;">
<table class="table table-bordered table-striped">
<tbody>
<tr>
<td>{Lang::T('Type')}</td>
<td>{$plan['type']}</td>
</tr>
<tr>
<td>{Lang::T('Price')}</td>
<td>{Lang::moneyFormat($plan['price'])}</td>
</tr>
<tr>
<td>{Lang::T('Validity')}</td>
<td>{$plan['validity']} {$plan['validity_unit']}</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="box-body">
<div class="btn-group btn-group-justified" role="group" aria-label="...">
<a href="{$_url}order/gateway/pppoe/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this? your active package will be overwritten')}')"
class="btn btn-sm btn-block btn-warning text-black">{Lang::T('Buy')}</a>
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/pay/pppoe/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwritten')}')"
class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
{/if}
</div>
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' &&
$_user['balance']>=$plan['price']}
<a href="{$_url}order/send/pppoe/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this for friend account?')}')"
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
{/if}
</div>
</div>
</div>
{/foreach}
</div>
{/if}
{if Lang::arrayCount($radius_hotspot)>0}
<ol class="breadcrumb">
<li>{if $_c['radius_plan']==''}Radius Plan{else}{$_c['radius_plan']}{/if}</li>
<li>{if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if}</li>
</ol>
<div class="row">
{foreach $radius_hotspot as $plan}
<div class="col col-md-4">
<div class="box box-primary">
<div class="box-header text-bold">{$plan['name_plan']}</div>
<div class="table-responsive">
<div style="margin-left: 5px; margin-right: 5px;">
<table class="table table-bordered table-striped">
<tbody>
<tr>
<td>{Lang::T('Type')}</td>
<td>{$plan['type']}</td>
</tr>
<tr>
<td>{Lang::T('Price')}</td>
<td>{Lang::moneyFormat($plan['price'])}</td>
</tr>
<tr>
<td>{Lang::T('Validity')}</td>
<td>{$plan['validity']} {$plan['validity_unit']}</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="box-body">
<div class="btn-group btn-group-justified" role="group" aria-label="...">
<a href="{$_url}order/gateway/hotspot/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this? your active package will be overwritten')}')"
class="btn btn-sm btn-block btn-warning text-black">{Lang::T('Buy')}</a>
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/pay/hotspot/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwritten')}')"
class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
{/if}
</div>
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' &&
$_user['balance']>=$plan['price']}
<a href="{$_url}order/send/hotspot/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this for friend account?')}')"
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
{/if}
</div>
</div>
</div>
{/foreach}
</div>
{/if}
{/if}
{/if} {/if}
{foreach $routers as $router} {foreach $routers as $router}
{if Validator::isRouterHasPlan($plans_hotspot, $router['name']) || Validator::isRouterHasPlan($plans_pppoe, $router['name'])} {if Validator::isRouterHasPlan($plans_hotspot, $router['name']) || Validator::isRouterHasPlan($plans_pppoe,
<div class="box box-solid box-primary bg-gray"> $router['name'])}
<div class="box-header text-white text-bold">{$router['name']}</div> <div class="box box-solid box-primary bg-gray">
{if $router['description'] != ''} <div class="box-header text-white text-bold">{$router['name']}</div>
<div class="box-body"> {if $router['description'] != ''}
{$router['description']} <div class="box-body">
</div> {$router['description']}
{/if} </div>
{if $_user['service_type'] == 'Hotspot' && Validator::countRouterPlan($plans_hotspot, $router['name'])>0}
<div class="box-header text-white">{if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if}
</div>
<div class="box-body row">
{foreach $plans_hotspot as $plan}
{if $router['name'] eq $plan['routers']}
<div class="col col-md-4">
<div class="box box-primary">
<div class="box-header text-center text-bold">{$plan['name_plan']}</div>
<div class="table-responsive">
<table class="table table-bordered table-striped">
<tbody>
<tr>
<td>{Lang::T('Type')}</td>
<td>{$plan['type']}</td>
</tr>
<tr>
<td>{Lang::T('Price')}</td>
<td>{Lang::moneyFormat($plan['price'])}</td>
</tr>
<tr>
<td>{Lang::T('Validity')}</td>
<td>{$plan['validity']} {$plan['validity_unit']}</td>
</tr>
</tbody>
</table>
</div>
<div class="box-body">
<div class="btn-group btn-group-justified" role="group" aria-label="...">
<a href="{$_url}order/gateway/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-warning text-black">{Lang::T('Buy')}</a>
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/pay/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
{/if}
</div>
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/send/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this for friend account?')}')"
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
{/if}
</div>
</div>
</div>
{/if}
{/foreach}
</div>
{/if}
{if $_user['service_type'] == 'PPPoE' && Validator::countRouterPlan($plans_pppoe,$router['name'])>0}
<div class="box-header text-white">{if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_plan']}{/if}</div>
<div class="box-body row">
{foreach $plans_pppoe as $plan}
{if $router['name'] eq $plan['routers']}
<div class="col col-md-4">
<div class="box box- box-primary">
<div class="box-header text-bold text-center">{$plan['name_plan']}</div>
<div class="table-responsive">
<table class="table table-bordered table-striped">
<tbody>
<tr>
<td>{Lang::T('Type')}</td>
<td>{$plan['type']}</td>
</tr>
<tr>
<td>{Lang::T('Price')}</td>
<td>{Lang::moneyFormat($plan['price'])}</td>
</tr>
<tr>
<td>{Lang::T('Validity')}</td>
<td>{$plan['validity']} {$plan['validity_unit']}</td>
</tr>
</tbody>
</table>
</div>
<div class="box-body">
<div class="btn-group btn-group-justified" role="group" aria-label="...">
<a href="{$_url}order/gateway/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-warning text-black">{Lang::T('Buy')}</a>
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/pay/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
{/if}
</div>
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/send/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this for friend account?')}')"
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
{/if}
</div>
</div>
</div>
{/if}
{/foreach}
</div>
{/if}
{if $_user['service_type'] == 'Others' || $_user['service_type'] == '' && (Validator::countRouterPlan($plans_hotspot, $router['name'])>0 || Validator::countRouterPlan($plans_pppoe, $router['name'])>0)}
<div class="box-header text-white">{if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if}
</div>
<div class="box-body row">
{foreach $plans_hotspot as $plan}
{if $router['name'] eq $plan['routers']}
<div class="col col-md-4">
<div class="box box-primary">
<div class="box-header text-center text-bold">{$plan['name_plan']}</div>
<div class="table-responsive">
<table class="table table-bordered table-striped">
<tbody>
<tr>
<td>{Lang::T('Type')}</td>
<td>{$plan['type']}</td>
</tr>
<tr>
<td>{Lang::T('Price')}</td>
<td>{Lang::moneyFormat($plan['price'])}</td>
</tr>
<tr>
<td>{Lang::T('Validity')}</td>
<td>{$plan['validity']} {$plan['validity_unit']}</td>
</tr>
</tbody>
</table>
</div>
<div class="box-body">
<div class="btn-group btn-group-justified" role="group" aria-label="...">
<a href="{$_url}order/gateway/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-warning text-black">{Lang::T('Buy')}</a>
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/pay/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
{/if}
</div>
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/send/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this for friend account?')}')"
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
{/if}
</div>
</div>
</div>
{/if}
{/foreach}
</div>
<div class="box-header text-white">{if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_plan']}{/if}</div>
<div class="box-body row">
{foreach $plans_pppoe as $plan}
{if $router['name'] eq $plan['routers']}
<div class="col col-md-4">
<div class="box box- box-primary">
<div class="box-header text-bold text-center">{$plan['name_plan']}</div>
<div class="table-responsive">
<table class="table table-bordered table-striped">
<tbody>
<tr>
<td>{Lang::T('Type')}</td>
<td>{$plan['type']}</td>
</tr>
<tr>
<td>{Lang::T('Price')}</td>
<td>{Lang::moneyFormat($plan['price'])}</td>
</tr>
<tr>
<td>{Lang::T('Validity')}</td>
<td>{$plan['validity']} {$plan['validity_unit']}</td>
</tr>
</tbody>
</table>
</div>
<div class="box-body">
<div class="btn-group btn-group-justified" role="group" aria-label="...">
<a href="{$_url}order/gateway/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-warning text-black">{Lang::T('Buy')}</a>
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/pay/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
{/if}
</div>
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/send/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this for friend account?')}')"
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
{/if}
</div>
</div>
</div>
{/if}
{/foreach}
</div>
{/if}
</div>
{/if} {/if}
{if $_user['service_type'] == 'Hotspot' && Validator::countRouterPlan($plans_hotspot, $router['name'])>0}
<div class="box-header text-white">{if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if}
</div>
<div class="box-body row">
{foreach $plans_hotspot as $plan}
{if $router['name'] eq $plan['routers']}
<div class="col col-md-4">
<div class="box box-primary">
<div class="box-header text-center text-bold">{$plan['name_plan']}</div>
<div class="table-responsive">
<div style="margin-left: 5px; margin-right: 5px;">
<table class="table table-bordered table-striped">
<tbody>
<tr>
<td>{Lang::T('Type')}</td>
<td>{$plan['type']}</td>
</tr>
<tr>
<td>{Lang::T('Price')}</td>
<td>{Lang::moneyFormat($plan['price'])}</td>
</tr>
<tr>
<td>{Lang::T('Validity')}</td>
<td>{$plan['validity']} {$plan['validity_unit']}</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="box-body">
<div class="btn-group btn-group-justified" role="group" aria-label="...">
<a href="{$_url}order/gateway/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-warning text-black">{Lang::T('Buy')}</a>
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/pay/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
{/if}
</div>
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' &&
$_user['balance']>=$plan['price']}
<a href="{$_url}order/send/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this for friend account?')}')"
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
{/if}
</div>
</div>
</div>
{/if}
{/foreach}
</div>
{/if}
{if $_user['service_type'] == 'PPPoE' && Validator::countRouterPlan($plans_pppoe,$router['name'])>0}
<div class="box-header text-white">{if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_plan']}{/if}</div>
<div class="box-body row">
{foreach $plans_pppoe as $plan}
{if $router['name'] eq $plan['routers']}
<div class="col col-md-4">
<div class="box box- box-primary">
<div class="box-header text-bold text-center">{$plan['name_plan']}</div>
<div class="table-responsive">
<div style="margin-left: 5px; margin-right: 5px;">
<table class="table table-bordered table-striped">
<tbody>
<tr>
<td>{Lang::T('Type')}</td>
<td>{$plan['type']}</td>
</tr>
<tr>
<td>{Lang::T('Price')}</td>
<td>{Lang::moneyFormat($plan['price'])}</td>
</tr>
<tr>
<td>{Lang::T('Validity')}</td>
<td>{$plan['validity']} {$plan['validity_unit']}</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="box-body">
<div class="btn-group btn-group-justified" role="group" aria-label="...">
<a href="{$_url}order/gateway/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-warning text-black">{Lang::T('Buy')}</a>
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/pay/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
{/if}
</div>
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' &&
$_user['balance']>=$plan['price']}
<a href="{$_url}order/send/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this for friend account?')}')"
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
{/if}
</div>
</div>
</div>
{/if}
{/foreach}
</div>
{/if}
{if $_user['service_type'] == 'Others' || $_user['service_type'] == '' &&
(Validator::countRouterPlan($plans_hotspot, $router['name'])>0 || Validator::countRouterPlan($plans_pppoe,
$router['name'])>0)}
<div class="box-header text-white">{if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if}
</div>
<div class="box-body row">
{foreach $plans_hotspot as $plan}
{if $router['name'] eq $plan['routers']}
<div class="col col-md-4">
<div class="box box-primary">
<div class="box-header text-center text-bold">{$plan['name_plan']}</div>
<div class="table-responsive">
<div style="margin-left: 5px; margin-right: 5px;">
<table class="table table-bordered table-striped">
<tbody>
<tr>
<td>{Lang::T('Type')}</td>
<td>{$plan['type']}</td>
</tr>
<tr>
<td>{Lang::T('Price')}</td>
<td>{Lang::moneyFormat($plan['price'])}</td>
</tr>
<tr>
<td>{Lang::T('Validity')}</td>
<td>{$plan['validity']} {$plan['validity_unit']}</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="box-body">
<div class="btn-group btn-group-justified" role="group" aria-label="...">
<a href="{$_url}order/gateway/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-warning text-black">{Lang::T('Buy')}</a>
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/pay/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
{/if}
</div>
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' &&
$_user['balance']>=$plan['price']}
<a href="{$_url}order/send/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this for friend account?')}')"
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
{/if}
</div>
</div>
</div>
{/if}
{/foreach}
</div>
<div class="box-header text-white">{if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_plan']}{/if}</div>
<div class="box-body row">
{foreach $plans_pppoe as $plan}
{if $router['name'] eq $plan['routers']}
<div class="col col-md-4">
<div class="box box- box-primary">
<div class="box-header text-bold text-center">{$plan['name_plan']}</div>
<div class="table-responsive">
<div style="margin-left: 5px; margin-right: 5px;">
<table class="table table-bordered table-striped">
<tbody>
<tr>
<td>{Lang::T('Type')}</td>
<td>{$plan['type']}</td>
</tr>
<tr>
<td>{Lang::T('Price')}</td>
<td>{Lang::moneyFormat($plan['price'])}</td>
</tr>
<tr>
<td>{Lang::T('Validity')}</td>
<td>{$plan['validity']} {$plan['validity_unit']}</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="box-body">
<div class="btn-group btn-group-justified" role="group" aria-label="...">
<a href="{$_url}order/gateway/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-warning text-black">{Lang::T('Buy')}</a>
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/pay/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
{/if}
</div>
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' &&
$_user['balance']>=$plan['price']}
<a href="{$_url}order/send/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this for friend account?')}')"
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
{/if}
</div>
</div>
</div>
{/if}
{/foreach}
</div>
{/if}
</div>
{/if}
{/foreach} {/foreach}
</div> </div>
</div> </div>