select Device when add/edit plan
This commit is contained in:
parent
78a6708a6d
commit
55b32ce0da
@ -33,10 +33,6 @@ switch ($action) {
|
|||||||
(new $p['device'])->add_plan($plan);
|
(new $p['device'])->add_plan($plan);
|
||||||
if (!empty($plan['pool_expired'])) {
|
if (!empty($plan['pool_expired'])) {
|
||||||
$plan->name_plan = 'EXPIRED NUXBILL ' . $pool_expired;
|
$plan->name_plan = 'EXPIRED NUXBILL ' . $pool_expired;
|
||||||
$plan->rate_down_unit = "Kbps";
|
|
||||||
$plan->rate_up_unit == 'Kbps';
|
|
||||||
$plan->rate_up = '512';
|
|
||||||
$plan->rate_down = '512';
|
|
||||||
(new $p['device'])->add_plan($plan);
|
(new $p['device'])->add_plan($plan);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -55,10 +51,6 @@ switch ($action) {
|
|||||||
(new $p['device'])->add_plan($plan);
|
(new $p['device'])->add_plan($plan);
|
||||||
if (!empty($plan['pool_expired'])) {
|
if (!empty($plan['pool_expired'])) {
|
||||||
$plan->name_plan = 'EXPIRED NUXBILL ' . $pool_expired;
|
$plan->name_plan = 'EXPIRED NUXBILL ' . $pool_expired;
|
||||||
$plan->rate_down_unit = "Kbps";
|
|
||||||
$plan->rate_up_unit == 'Kbps';
|
|
||||||
$plan->rate_up = '512';
|
|
||||||
$plan->rate_down = '512';
|
|
||||||
(new $p['device'])->add_plan($plan);
|
(new $p['device'])->add_plan($plan);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -90,6 +82,15 @@ switch ($action) {
|
|||||||
$ui->assign('d', $d);
|
$ui->assign('d', $d);
|
||||||
$r = ORM::for_table('tbl_routers')->find_many();
|
$r = ORM::for_table('tbl_routers')->find_many();
|
||||||
$ui->assign('r', $r);
|
$ui->assign('r', $r);
|
||||||
|
$devices = [];
|
||||||
|
$files = scandir($DEVICE_PATH);
|
||||||
|
foreach($files as $file){
|
||||||
|
$ext = pathinfo($file, PATHINFO_EXTENSION);
|
||||||
|
if($ext == 'php'){
|
||||||
|
$devices[] = pathinfo($file, PATHINFO_FILENAME);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$ui->assign('devices', $devices);
|
||||||
run_hook('view_add_plan'); #HOOK
|
run_hook('view_add_plan'); #HOOK
|
||||||
$ui->display('hotspot-add.tpl');
|
$ui->display('hotspot-add.tpl');
|
||||||
break;
|
break;
|
||||||
@ -98,11 +99,28 @@ switch ($action) {
|
|||||||
$id = $routes['2'];
|
$id = $routes['2'];
|
||||||
$d = ORM::for_table('tbl_plans')->find_one($id);
|
$d = ORM::for_table('tbl_plans')->find_one($id);
|
||||||
if ($d) {
|
if ($d) {
|
||||||
|
if(empty($d['device'])){
|
||||||
|
if($d['is_radius']){
|
||||||
|
$d->device = 'Radius';
|
||||||
|
}else{
|
||||||
|
$d->device = 'MikrotikHotspot';
|
||||||
|
}
|
||||||
|
$d->save();
|
||||||
|
}
|
||||||
$ui->assign('d', $d);
|
$ui->assign('d', $d);
|
||||||
$p = ORM::for_table('tbl_pool')->where('routers', $d['routers'])->find_many();
|
$p = ORM::for_table('tbl_pool')->where('routers', $d['routers'])->find_many();
|
||||||
$ui->assign('p', $p);
|
$ui->assign('p', $p);
|
||||||
$b = ORM::for_table('tbl_bandwidth')->find_many();
|
$b = ORM::for_table('tbl_bandwidth')->find_many();
|
||||||
$ui->assign('b', $b);
|
$ui->assign('b', $b);
|
||||||
|
$devices = [];
|
||||||
|
$files = scandir($DEVICE_PATH);
|
||||||
|
foreach($files as $file){
|
||||||
|
$ext = pathinfo($file, PATHINFO_EXTENSION);
|
||||||
|
if($ext == 'php'){
|
||||||
|
$devices[] = pathinfo($file, PATHINFO_FILENAME);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$ui->assign('devices', $devices);
|
||||||
run_hook('view_edit_plan'); #HOOK
|
run_hook('view_edit_plan'); #HOOK
|
||||||
$ui->display('hotspot-edit.tpl');
|
$ui->display('hotspot-edit.tpl');
|
||||||
} else {
|
} else {
|
||||||
@ -145,6 +163,7 @@ switch ($action) {
|
|||||||
$validity = _post('validity');
|
$validity = _post('validity');
|
||||||
$validity_unit = _post('validity_unit');
|
$validity_unit = _post('validity_unit');
|
||||||
$routers = _post('routers');
|
$routers = _post('routers');
|
||||||
|
$device = _post('device');
|
||||||
$pool_expired = _post('pool_expired');
|
$pool_expired = _post('pool_expired');
|
||||||
$list_expired = _post('list_expired');
|
$list_expired = _post('list_expired');
|
||||||
$enabled = _post('enabled');
|
$enabled = _post('enabled');
|
||||||
@ -173,24 +192,6 @@ switch ($action) {
|
|||||||
run_hook('add_plan'); #HOOK
|
run_hook('add_plan'); #HOOK
|
||||||
|
|
||||||
if ($msg == '') {
|
if ($msg == '') {
|
||||||
$b = ORM::for_table('tbl_bandwidth')->where('id', $id_bw)->find_one();
|
|
||||||
if ($b['rate_down_unit'] == 'Kbps') {
|
|
||||||
$unitdown = 'K';
|
|
||||||
$raddown = '000';
|
|
||||||
} else {
|
|
||||||
$unitdown = 'M';
|
|
||||||
$raddown = '000000';
|
|
||||||
}
|
|
||||||
if ($b['rate_up_unit'] == 'Kbps') {
|
|
||||||
$unitup = 'K';
|
|
||||||
$radup = '000';
|
|
||||||
} else {
|
|
||||||
$unitup = 'M';
|
|
||||||
$radup = '000000';
|
|
||||||
}
|
|
||||||
$rate = $b['rate_up'] . $unitup . "/" . $b['rate_down'] . $unitdown;
|
|
||||||
$radiusRate = $b['rate_up'] . $radup . '/' . $b['rate_down'] . $raddown . '/' . $b['burst'];
|
|
||||||
$rate = trim($rate . " " . $b['burst']);
|
|
||||||
// Create new plan
|
// Create new plan
|
||||||
$d = ORM::for_table('tbl_plans')->create();
|
$d = ORM::for_table('tbl_plans')->create();
|
||||||
$d->name_plan = $name;
|
$d->name_plan = $name;
|
||||||
@ -218,6 +219,7 @@ switch ($action) {
|
|||||||
$d->list_expired = $list_expired;
|
$d->list_expired = $list_expired;
|
||||||
$d->enabled = $enabled;
|
$d->enabled = $enabled;
|
||||||
$d->prepaid = $prepaid;
|
$d->prepaid = $prepaid;
|
||||||
|
$d->device = $device;
|
||||||
$d->save();
|
$d->save();
|
||||||
|
|
||||||
$dvc = Package::getDevice($d);
|
$dvc = Package::getDevice($d);
|
||||||
@ -260,6 +262,7 @@ switch ($action) {
|
|||||||
$validity_unit = _post('validity_unit');
|
$validity_unit = _post('validity_unit');
|
||||||
$pool_expired = _post('pool_expired');
|
$pool_expired = _post('pool_expired');
|
||||||
$list_expired = _post('list_expired');
|
$list_expired = _post('list_expired');
|
||||||
|
$device = _post('device');
|
||||||
$enabled = _post('enabled');
|
$enabled = _post('enabled');
|
||||||
$prepaid = _post('prepaid');
|
$prepaid = _post('prepaid');
|
||||||
$routers = _post('routers');
|
$routers = _post('routers');
|
||||||
@ -318,6 +321,7 @@ switch ($action) {
|
|||||||
$d->list_expired = $list_expired;
|
$d->list_expired = $list_expired;
|
||||||
$d->enabled = $enabled;
|
$d->enabled = $enabled;
|
||||||
$d->prepaid = $prepaid;
|
$d->prepaid = $prepaid;
|
||||||
|
$d->device = $device;
|
||||||
$d->save();
|
$d->save();
|
||||||
|
|
||||||
$dvc = Package::getDevice($d);
|
$dvc = Package::getDevice($d);
|
||||||
@ -367,6 +371,15 @@ switch ($action) {
|
|||||||
$ui->assign('d', $d);
|
$ui->assign('d', $d);
|
||||||
$r = ORM::for_table('tbl_routers')->find_many();
|
$r = ORM::for_table('tbl_routers')->find_many();
|
||||||
$ui->assign('r', $r);
|
$ui->assign('r', $r);
|
||||||
|
$devices = [];
|
||||||
|
$files = scandir($DEVICE_PATH);
|
||||||
|
foreach($files as $file){
|
||||||
|
$ext = pathinfo($file, PATHINFO_EXTENSION);
|
||||||
|
if($ext == 'php'){
|
||||||
|
$devices[] = pathinfo($file, PATHINFO_FILENAME);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$ui->assign('devices', $devices);
|
||||||
run_hook('view_add_ppoe'); #HOOK
|
run_hook('view_add_ppoe'); #HOOK
|
||||||
$ui->display('pppoe-add.tpl');
|
$ui->display('pppoe-add.tpl');
|
||||||
break;
|
break;
|
||||||
@ -376,6 +389,14 @@ switch ($action) {
|
|||||||
$id = $routes['2'];
|
$id = $routes['2'];
|
||||||
$d = ORM::for_table('tbl_plans')->find_one($id);
|
$d = ORM::for_table('tbl_plans')->find_one($id);
|
||||||
if ($d) {
|
if ($d) {
|
||||||
|
if(empty($d['device'])){
|
||||||
|
if($d['is_radius']){
|
||||||
|
$d->device = 'Radius';
|
||||||
|
}else{
|
||||||
|
$d->device = 'MikrotikPppoe';
|
||||||
|
}
|
||||||
|
$d->save();
|
||||||
|
}
|
||||||
$ui->assign('d', $d);
|
$ui->assign('d', $d);
|
||||||
$p = ORM::for_table('tbl_pool')->where('routers', ($d['is_radius']) ? 'radius' : $d['routers'])->find_many();
|
$p = ORM::for_table('tbl_pool')->where('routers', ($d['is_radius']) ? 'radius' : $d['routers'])->find_many();
|
||||||
$ui->assign('p', $p);
|
$ui->assign('p', $p);
|
||||||
@ -386,6 +407,15 @@ switch ($action) {
|
|||||||
$r = ORM::for_table('tbl_routers')->find_many();
|
$r = ORM::for_table('tbl_routers')->find_many();
|
||||||
}
|
}
|
||||||
$ui->assign('r', $r);
|
$ui->assign('r', $r);
|
||||||
|
$devices = [];
|
||||||
|
$files = scandir($DEVICE_PATH);
|
||||||
|
foreach($files as $file){
|
||||||
|
$ext = pathinfo($file, PATHINFO_EXTENSION);
|
||||||
|
if($ext == 'php'){
|
||||||
|
$devices[] = pathinfo($file, PATHINFO_FILENAME);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$ui->assign('devices', $devices);
|
||||||
run_hook('view_edit_ppoe'); #HOOK
|
run_hook('view_edit_ppoe'); #HOOK
|
||||||
$ui->display('pppoe-edit.tpl');
|
$ui->display('pppoe-edit.tpl');
|
||||||
} else {
|
} else {
|
||||||
@ -422,6 +452,7 @@ switch ($action) {
|
|||||||
$validity = _post('validity');
|
$validity = _post('validity');
|
||||||
$validity_unit = _post('validity_unit');
|
$validity_unit = _post('validity_unit');
|
||||||
$routers = _post('routers');
|
$routers = _post('routers');
|
||||||
|
$device = _post('device');
|
||||||
$pool = _post('pool_name');
|
$pool = _post('pool_name');
|
||||||
$pool_expired = _post('pool_expired');
|
$pool_expired = _post('pool_expired');
|
||||||
$list_expired = _post('list_expired');
|
$list_expired = _post('list_expired');
|
||||||
@ -489,6 +520,7 @@ switch ($action) {
|
|||||||
$d->list_expired = $list_expired;
|
$d->list_expired = $list_expired;
|
||||||
$d->enabled = $enabled;
|
$d->enabled = $enabled;
|
||||||
$d->prepaid = $prepaid;
|
$d->prepaid = $prepaid;
|
||||||
|
$d->device = $device;
|
||||||
$d->save();
|
$d->save();
|
||||||
|
|
||||||
$dvc = Package::getDevice($d);
|
$dvc = Package::getDevice($d);
|
||||||
@ -497,10 +529,6 @@ switch ($action) {
|
|||||||
(new $p['device'])->add_plan($d);
|
(new $p['device'])->add_plan($d);
|
||||||
if (!empty($pool_expired)) {
|
if (!empty($pool_expired)) {
|
||||||
$d->name_plan = 'EXPIRED NUXBILL ' . $pool_expired;
|
$d->name_plan = 'EXPIRED NUXBILL ' . $pool_expired;
|
||||||
$d->rate_down_unit = "Kbps";
|
|
||||||
$d->rate_up_unit == 'Kbps';
|
|
||||||
$d->rate_up = '512';
|
|
||||||
$d->rate_down = '512';
|
|
||||||
(new $p['device'])->add_plan($d);
|
(new $p['device'])->add_plan($d);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -522,6 +550,7 @@ switch ($action) {
|
|||||||
$validity = _post('validity');
|
$validity = _post('validity');
|
||||||
$validity_unit = _post('validity_unit');
|
$validity_unit = _post('validity_unit');
|
||||||
$routers = _post('routers');
|
$routers = _post('routers');
|
||||||
|
$device = _post('device');
|
||||||
$pool = _post('pool_name');
|
$pool = _post('pool_name');
|
||||||
$pool_expired = _post('pool_expired');
|
$pool_expired = _post('pool_expired');
|
||||||
$list_expired = _post('list_expired');
|
$list_expired = _post('list_expired');
|
||||||
@ -578,6 +607,7 @@ switch ($action) {
|
|||||||
$d->list_expired = $list_expired;
|
$d->list_expired = $list_expired;
|
||||||
$d->enabled = $enabled;
|
$d->enabled = $enabled;
|
||||||
$d->prepaid = $prepaid;
|
$d->prepaid = $prepaid;
|
||||||
|
$d->device = $device;
|
||||||
$d->save();
|
$d->save();
|
||||||
|
|
||||||
$dvc = Package::getDevice($d);
|
$dvc = Package::getDevice($d);
|
||||||
|
@ -632,5 +632,6 @@
|
|||||||
"Zip": "Zip",
|
"Zip": "Zip",
|
||||||
"Zip_Code": "Zip Code",
|
"Zip_Code": "Zip Code",
|
||||||
"Local_IP": "Local IP",
|
"Local_IP": "Local IP",
|
||||||
"": ""
|
"": "",
|
||||||
|
"Device": "Device"
|
||||||
}
|
}
|
@ -24,8 +24,8 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-2 control-label">{Lang::T('Plan Type')}</label>
|
<label class="col-md-2 control-label">{Lang::T('Plan Type')}</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<input type="radio" name="plan_type" value="Personal" checked> Personal
|
<input type="radio" name="plan_type" value="Personal" checked> Personal
|
||||||
<input type="radio" name="plan_type" value="Business"> Business
|
<input type="radio" name="plan_type" value="Business"> Business
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{if $_c['radius_enable']}
|
{if $_c['radius_enable']}
|
||||||
@ -39,6 +39,16 @@
|
|||||||
<p class="help-block col-md-4">{Lang::T('Cannot be change after saved')}</p>
|
<p class="help-block col-md-4">{Lang::T('Cannot be change after saved')}</p>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-md-2 control-label">{Lang::T('Device')}</label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<select class="form-control" id="device" name="device">
|
||||||
|
{foreach $devices as $dev}
|
||||||
|
<option value="{$dev}">{$dev}</option>
|
||||||
|
{/foreach}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-2 control-label">{Lang::T('Plan Name')}</label>
|
<label class="col-md-2 control-label">{Lang::T('Plan Name')}</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
@ -115,13 +125,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{if $_c['enable_tax'] == 'yes'}
|
{if $_c['enable_tax'] == 'yes'}
|
||||||
{if $_c['tax_rate'] == 'custom'}
|
{if $_c['tax_rate'] == 'custom'}
|
||||||
<p class="help-block col-md-4">{number_format($_c['custom_tax_rate'], 2)} % {Lang::T('Tax Rates
|
<p class="help-block col-md-4">{number_format($_c['custom_tax_rate'], 2)} % {Lang::T('Tax Rates
|
||||||
will be added')}</p>
|
will be added')}</p>
|
||||||
{else}
|
{else}
|
||||||
<p class="help-block col-md-4">{number_format($_c['tax_rate'] * 100, 2)} % {Lang::T('Tax Rates
|
<p class="help-block col-md-4">{number_format($_c['tax_rate'] * 100, 2)} % {Lang::T('Tax Rates
|
||||||
will be added')}</p>
|
will be added')}</p>
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -141,7 +151,8 @@
|
|||||||
<select class="form-control" id="validity_unit" name="validity_unit">
|
<select class="form-control" id="validity_unit" name="validity_unit">
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<p class="help-block col-md-4">{Lang::T('1 Period = 1 Month, Expires the 20th of each month')}</p>
|
<p class="help-block col-md-4">{Lang::T('1 Period = 1 Month, Expires the 20th of each month')}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<span id="routerChoose" class="">
|
<span id="routerChoose" class="">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -187,9 +198,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var preOpt = `<option value="Mins">{Lang::T('Mins')}</option>
|
var preOpt = `<option value="Mins">{Lang::T('Mins')}</option>
|
||||||
<option value="Hrs">{Lang::T('Hrs')}</option>
|
<option value="Hrs">{Lang::T('Hrs')}</option>
|
||||||
<option value="Days">{Lang::T('Days')}</option>
|
<option value="Days">{Lang::T('Days')}</option>
|
||||||
<option value="Months">{Lang::T('Months')}</option>`;
|
<option value="Months">{Lang::T('Months')}</option>`;
|
||||||
var postOpt = `<option value="Period">{Lang::T('Period')}</option>`;
|
var postOpt = `<option value="Period">{Lang::T('Period')}</option>`;
|
||||||
function prePaid() {
|
function prePaid() {
|
||||||
$("#validity_unit").html(preOpt);
|
$("#validity_unit").html(preOpt);
|
||||||
|
@ -14,8 +14,6 @@
|
|||||||
<input type="radio" name="enabled" value="0" {if $d['enabled'] == 0}checked{/if}> Disable
|
<input type="radio" name="enabled" value="0" {if $d['enabled'] == 0}checked{/if}> Disable
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-2 control-label">{Lang::T('Type')}</label>
|
<label class="col-md-2 control-label">{Lang::T('Type')}</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
@ -26,19 +24,16 @@
|
|||||||
{if $d['prepaid'] == no}checked{/if}> Postpaid
|
{if $d['prepaid'] == no}checked{/if}> Postpaid
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-md-2 control-label">{Lang::T('Plan Type')}</label>
|
<label class="col-md-2 control-label">{Lang::T('Plan Type')}</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<input type="radio" name="plan_type" value="Personal"
|
<input type="radio" name="plan_type" value="Personal"
|
||||||
{if $d['plan_type'] == 'Personal'}checked{/if}>
|
{if $d['plan_type'] == 'Personal'}checked{/if}>
|
||||||
Personal
|
Personal
|
||||||
<input type="radio" name="plan_type" value="Business"
|
<input type="radio" name="plan_type" value="Business"
|
||||||
{if $d['plan_type'] == 'Business'}checked{/if}> Business
|
{if $d['plan_type'] == 'Business'}checked{/if}> Business
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{if $_c['radius_enable'] and $d['is_radius']}
|
{if $_c['radius_enable'] and $d['is_radius']}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-2 control-label">Radius</label>
|
<label class="col-md-2 control-label">Radius</label>
|
||||||
@ -47,6 +42,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-md-2 control-label">{Lang::T('Device')}</label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<select class="form-control" id="device" name="device">
|
||||||
|
{foreach $devices as $dev}
|
||||||
|
<option value="{$dev}" {if $dev == $d['device']}selected{/if}>{$dev}</option>
|
||||||
|
{/foreach}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-2 control-label">{Lang::T('Plan Name')}</label>
|
<label class="col-md-2 control-label">{Lang::T('Plan Name')}</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
@ -59,8 +64,8 @@
|
|||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<input type="radio" id="Unlimited" name="typebp" value="Unlimited"
|
<input type="radio" id="Unlimited" name="typebp" value="Unlimited"
|
||||||
{if $d['typebp'] eq 'Unlimited'} checked {/if}> {Lang::T('Unlimited')}
|
{if $d['typebp'] eq 'Unlimited'} checked {/if}> {Lang::T('Unlimited')}
|
||||||
<input type="radio" id="Limited"
|
<input type="radio" id="Limited" name="typebp" value="Limited"
|
||||||
name="typebp" value="Limited" {if $d['typebp'] eq 'Limited'} checked {/if}>
|
{if $d['typebp'] eq 'Limited'} checked {/if}>
|
||||||
{Lang::T('Limited')}
|
{Lang::T('Limited')}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -134,13 +139,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{if $_c['enable_tax'] == 'yes'}
|
{if $_c['enable_tax'] == 'yes'}
|
||||||
{if $_c['tax_rate'] == 'custom'}
|
{if $_c['tax_rate'] == 'custom'}
|
||||||
<p class="help-block col-md-4">{number_format($_c['custom_tax_rate'], 2)} % {Lang::T('Tax Rates
|
<p class="help-block col-md-4">{number_format($_c['custom_tax_rate'], 2)} % {Lang::T('Tax Rates
|
||||||
will be added')}</p>
|
will be added')}</p>
|
||||||
{else}
|
{else}
|
||||||
<p class="help-block col-md-4">{number_format($_c['tax_rate'] * 100, 2)} % {Lang::T('Tax Rates
|
<p class="help-block col-md-4">{number_format($_c['tax_rate'] * 100, 2)} % {Lang::T('Tax Rates
|
||||||
will be added')}</p>
|
will be added')}</p>
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
<th>{Lang::T('Data Limit')}</th>
|
<th>{Lang::T('Data Limit')}</th>
|
||||||
<th>{Lang::T('Plan Validity')}</th>
|
<th>{Lang::T('Plan Validity')}</th>
|
||||||
<th>{Lang::T('Routers')}</th>
|
<th>{Lang::T('Routers')}</th>
|
||||||
|
<th>{Lang::T('Device')}</th>
|
||||||
<th>{Lang::T('Expired IP Pool')}</th>
|
<th>{Lang::T('Expired IP Pool')}</th>
|
||||||
<th>{Lang::T('ID')}</th>
|
<th>{Lang::T('ID')}</th>
|
||||||
<th>{Lang::T('Manage')}</th>
|
<th>{Lang::T('Manage')}</th>
|
||||||
@ -70,6 +71,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
</td>
|
</td>
|
||||||
|
<td>{$ds['device']}</td>
|
||||||
<td>{$ds['pool_expired']}{if $ds['list_expired']}{if $ds['pool_expired']} |
|
<td>{$ds['pool_expired']}{if $ds['list_expired']}{if $ds['pool_expired']} |
|
||||||
{/if}{$ds['list_expired']}{/if}</td>
|
{/if}{$ds['list_expired']}{/if}</td>
|
||||||
<td>{$ds['id']}</td>
|
<td>{$ds['id']}</td>
|
||||||
|
@ -24,8 +24,8 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-2 control-label">{Lang::T('Plan Type')}</label>
|
<label class="col-md-2 control-label">{Lang::T('Plan Type')}</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<input type="radio" name="plan_type" value="Personal" checked> Personal
|
<input type="radio" name="plan_type" value="Personal" checked> Personal
|
||||||
<input type="radio" name="plan_type" value="Business"> Business
|
<input type="radio" name="plan_type" value="Business"> Business
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -38,6 +38,16 @@
|
|||||||
<p class="help-block col-md-4">{Lang::T('Cannot be change after saved')}</p>
|
<p class="help-block col-md-4">{Lang::T('Cannot be change after saved')}</p>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-md-2 control-label">{Lang::T('Device')}</label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<select class="form-control" id="device" name="device">
|
||||||
|
{foreach $devices as $dev}
|
||||||
|
<option value="{$dev}">{$dev}</option>
|
||||||
|
{/foreach}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-2 control-label">{Lang::T('Plan Name')}</label>
|
<label class="col-md-2 control-label">{Lang::T('Plan Name')}</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
@ -65,13 +75,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{if $_c['enable_tax'] == 'yes'}
|
{if $_c['enable_tax'] == 'yes'}
|
||||||
{if $_c['tax_rate'] == 'custom'}
|
{if $_c['tax_rate'] == 'custom'}
|
||||||
<p class="help-block col-md-4">{number_format($_c['custom_tax_rate'], 2)} % {Lang::T('Tax Rates
|
<p class="help-block col-md-4">{number_format($_c['custom_tax_rate'], 2)} % {Lang::T('Tax Rates
|
||||||
will be added')}</p>
|
will be added')}</p>
|
||||||
{else}
|
{else}
|
||||||
<p class="help-block col-md-4">{number_format($_c['tax_rate'] * 100, 2)} % {Lang::T('Tax Rates
|
<p class="help-block col-md-4">{number_format($_c['tax_rate'] * 100, 2)} % {Lang::T('Tax Rates
|
||||||
will be added')}</p>
|
will be added')}</p>
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -83,7 +93,8 @@
|
|||||||
<select class="form-control" id="validity_unit" name="validity_unit">
|
<select class="form-control" id="validity_unit" name="validity_unit">
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<p class="help-block col-md-4">{Lang::T('1 Period = 1 Month, Expires the 20th of each month')}</p>
|
<p class="help-block col-md-4">{Lang::T('1 Period = 1 Month, Expires the 20th of each month')}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-2 control-label"><a
|
<label class="col-md-2 control-label"><a
|
||||||
@ -124,8 +135,7 @@
|
|||||||
</div> *}
|
</div> *}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-md-offset-2 col-md-10">
|
<div class="col-md-offset-2 col-md-10">
|
||||||
<button class="btn btn-primary"
|
<button class="btn btn-primary" type="submit">{Lang::T('Save Changes')}</button>
|
||||||
type="submit">{Lang::T('Save Changes')}</button>
|
|
||||||
Or <a href="{$_url}services/pppoe">{Lang::T('Cancel')}</a>
|
Or <a href="{$_url}services/pppoe">{Lang::T('Cancel')}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -136,9 +146,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var preOpt = `<option value="Mins">{Lang::T('Mins')}</option>
|
var preOpt = `<option value="Mins">{Lang::T('Mins')}</option>
|
||||||
<option value="Hrs">{Lang::T('Hrs')}</option>
|
<option value="Hrs">{Lang::T('Hrs')}</option>
|
||||||
<option value="Days">{Lang::T('Days')}</option>
|
<option value="Days">{Lang::T('Days')}</option>
|
||||||
<option value="Months">{Lang::T('Months')}</option>`;
|
<option value="Months">{Lang::T('Months')}</option>`;
|
||||||
var postOpt = `<option value="Period">{Lang::T('Period')}</option>`;
|
var postOpt = `<option value="Period">{Lang::T('Period')}</option>`;
|
||||||
function prePaid() {
|
function prePaid() {
|
||||||
$("#validity_unit").html(preOpt);
|
$("#validity_unit").html(preOpt);
|
||||||
|
@ -17,22 +17,23 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-2 control-label">{Lang::T('Type')}</label>
|
<label class="col-md-2 control-label">{Lang::T('Type')}</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<input type="radio" name="prepaid" onclick="prePaid()" value="yes" {if $d['prepaid'] == yes}checked{/if}>
|
<input type="radio" name="prepaid" onclick="prePaid()" value="yes"
|
||||||
|
{if $d['prepaid'] == yes}checked{/if}>
|
||||||
Prepaid
|
Prepaid
|
||||||
<input type="radio" name="prepaid" onclick="postPaid()" value="no" {if $d['prepaid'] == no}checked{/if}> Postpaid
|
<input type="radio" name="prepaid" onclick="postPaid()" value="no"
|
||||||
|
{if $d['prepaid'] == no}checked{/if}> Postpaid
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-2 control-label">{Lang::T('Plan Type')}</label>
|
<label class="col-md-2 control-label">{Lang::T('Plan Type')}</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<input type="radio" name="plan_type" value="Personal"
|
<input type="radio" name="plan_type" value="Personal"
|
||||||
{if $d['plan_type'] == 'Personal'}checked{/if}>
|
{if $d['plan_type'] == 'Personal'}checked{/if}>
|
||||||
Personal
|
Personal
|
||||||
<input type="radio" name="plan_type" value="Business"
|
<input type="radio" name="plan_type" value="Business"
|
||||||
{if $d['plan_type'] == 'Business'}checked{/if}> Business
|
{if $d['plan_type'] == 'Business'}checked{/if}> Business
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{if $_c['radius_enable'] and $d['is_radius']}
|
{if $_c['radius_enable'] and $d['is_radius']}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-2 control-label">Radius</label>
|
<label class="col-md-2 control-label">Radius</label>
|
||||||
@ -41,6 +42,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-md-2 control-label">{Lang::T('Device')}</label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<select class="form-control" id="device" name="device">
|
||||||
|
{foreach $devices as $dev}
|
||||||
|
<option value="{$dev}" {if $dev == $d['device']}selected{/if}>{$dev}</option>
|
||||||
|
{/foreach}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-2 control-label">{Lang::T('Plan Name')}</label>
|
<label class="col-md-2 control-label">{Lang::T('Plan Name')}</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
@ -69,13 +80,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{if $_c['enable_tax'] == 'yes'}
|
{if $_c['enable_tax'] == 'yes'}
|
||||||
{if $_c['tax_rate'] == 'custom'}
|
{if $_c['tax_rate'] == 'custom'}
|
||||||
<p class="help-block col-md-4">{number_format($_c['custom_tax_rate'], 2)} % {Lang::T('Tax Rates
|
<p class="help-block col-md-4">{number_format($_c['custom_tax_rate'], 2)} % {Lang::T('Tax Rates
|
||||||
will be added')}</p>
|
will be added')}</p>
|
||||||
{else}
|
{else}
|
||||||
<p class="help-block col-md-4">{number_format($_c['tax_rate'] * 100, 2)} % {Lang::T('Tax Rates
|
<p class="help-block col-md-4">{number_format($_c['tax_rate'] * 100, 2)} % {Lang::T('Tax Rates
|
||||||
will be added')}</p>
|
will be added')}</p>
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
<th>{Lang::T('IP Pool')}</th>
|
<th>{Lang::T('IP Pool')}</th>
|
||||||
<th>{Lang::T('Expired IP Pool')}</th>
|
<th>{Lang::T('Expired IP Pool')}</th>
|
||||||
<th>{Lang::T('Routers')}</th>
|
<th>{Lang::T('Routers')}</th>
|
||||||
|
<th>{Lang::T('Device')}</th>
|
||||||
<th>{Lang::T('Manage')}</th>
|
<th>{Lang::T('Manage')}</th>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
</tr>
|
</tr>
|
||||||
@ -69,6 +70,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
</td>
|
</td>
|
||||||
|
<td>{$ds['device']}</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{$_url}services/pppoe-edit/{$ds['id']}"
|
<a href="{$_url}services/pppoe-edit/{$ds['id']}"
|
||||||
class="btn btn-info btn-xs">{Lang::T('Edit')}</a>
|
class="btn btn-info btn-xs">{Lang::T('Edit')}</a>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user