forked from kevinowino869/mitrobill
User extend plan
This commit is contained in:
parent
97a5c54e24
commit
c51f04747d
@ -90,7 +90,19 @@ if (_post('send') == 'balance') {
|
||||
$bill = User::_billing();
|
||||
$ui->assign('_bill', $bill);
|
||||
|
||||
if(isset($_GET['deactivate']) && $_GET['deactivate'] == 1){
|
||||
if(isset($_GET['recharge']) && $_GET['recharge'] == 1){
|
||||
$router = ORM::for_table('tbl_routers')->where('name', $bill['routers'])->find_one();
|
||||
if ($config['enable_balance'] == 'yes') {
|
||||
$plan = ORM::for_table('tbl_plans')->find_one($bill['plan_id']);
|
||||
if($user['balance']>$plan['price']){
|
||||
r2(U . "order/pay/$router[id]/$bill[plan_id]", 'e', 'Order Plan');
|
||||
}else{
|
||||
r2(U . "order/buy/$router[id]/$bill[plan_id]", 'e', 'Order Plan');
|
||||
}
|
||||
}else{
|
||||
r2(U . "order/buy/$router[id]/$bill[plan_id]", 'e', 'Order Plan');
|
||||
}
|
||||
}else if(isset($_GET['deactivate']) && $_GET['deactivate'] == 1){
|
||||
if ($bill) {
|
||||
$mikrotik = Mikrotik::info($bill['routers']);
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
|
@ -1,7 +1,7 @@
|
||||
</section>
|
||||
</div>
|
||||
<footer class="main-footer">
|
||||
<div class="pull-right hidden-xs" id="version" onclick="location.href = '{$_url}community#latestVersion';"></div>
|
||||
<div class="pull-right" id="version" onclick="location.href = '{$_url}community#latestVersion';"></div>
|
||||
PHPNuxBill by <a href="https://github.com/hotspotbilling/phpnuxbill" rel="nofollow noreferrer noopener"
|
||||
target="_blank">iBNuX</a>, Theme by <a href="https://adminlte.io/" rel="nofollow noreferrer noopener"
|
||||
target="_blank">AdminLTE</a>
|
||||
|
@ -116,6 +116,8 @@
|
||||
<td class="small text-danger text-uppercase text-normal">{$_L['Expires_On']}</td>
|
||||
<td class="small mb15 text-danger">
|
||||
{if $_bill['time'] ne ''}{Lang::dateAndTimeFormat($_bill['expiration'],$_bill['time'])}{/if}
|
||||
<a class="label label-primary pull-right" href="{$_url}home&recharge=1"
|
||||
onclick="return confirm('{Lang::T('Recharge')}?')">{Lang::T('Recharge')}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{if $nux_ip}
|
||||
|
Loading…
x
Reference in New Issue
Block a user