Fix Edit Plan
This commit is contained in:
parent
bba09ca647
commit
4ab32bc68d
@ -174,6 +174,7 @@ switch ($action) {
|
|||||||
$p = ORM::for_table('tbl_plans')->where('enabled', '1')->where_not_equal('type', 'Balance')->find_many();
|
$p = ORM::for_table('tbl_plans')->where('enabled', '1')->where_not_equal('type', 'Balance')->find_many();
|
||||||
$ui->assign('p', $p);
|
$ui->assign('p', $p);
|
||||||
run_hook('view_edit_customer_plan'); #HOOK
|
run_hook('view_edit_customer_plan'); #HOOK
|
||||||
|
$ui->assign('_title', 'Edit Plan');
|
||||||
$ui->display('prepaid-edit.tpl');
|
$ui->display('prepaid-edit.tpl');
|
||||||
} else {
|
} else {
|
||||||
r2(U . 'services/list', 'e', $_L['Account_Not_Found']);
|
r2(U . 'services/list', 'e', $_L['Account_Not_Found']);
|
||||||
@ -228,11 +229,14 @@ switch ($action) {
|
|||||||
run_hook('edit_customer_plan'); #HOOK
|
run_hook('edit_customer_plan'); #HOOK
|
||||||
$d->username = $username;
|
$d->username = $username;
|
||||||
$d->plan_id = $id_plan;
|
$d->plan_id = $id_plan;
|
||||||
|
$d->namebp = $p['name_plan'];
|
||||||
//$d->recharged_on = $recharged_on;
|
//$d->recharged_on = $recharged_on;
|
||||||
$d->expiration = $expiration;
|
$d->expiration = $expiration;
|
||||||
$d->time = $time;
|
$d->time = $time;
|
||||||
if(strtotime($expiration.' '.$time) > time()){
|
if($d['status'] == 'off'){
|
||||||
$d->status = 'on';
|
if(strtotime($expiration.' '.$time) > time()){
|
||||||
|
$d->status = 'on';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if($p['is_radius']){
|
if($p['is_radius']){
|
||||||
$d->routers = 'radius';
|
$d->routers = 'radius';
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<div class="panel panel-primary">
|
<div class="panel panel-primary">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<h3 class="panel-title">{$_L['Recharge_Account']}</h3>
|
<h3 class="panel-title">Edit Plan</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<form class="form-horizontal" method="post" role="form" action="{$_url}prepaid/edit-post">
|
<form class="form-horizontal" method="post" role="form" action="{$_url}prepaid/edit-post">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user