recharge radius

This commit is contained in:
Ibnu Maksum 2023-10-04 15:51:51 +07:00
parent 0ee60eff3d
commit 087c5ab515
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5
2 changed files with 8 additions and 1 deletions

View File

@ -36,7 +36,11 @@ switch ($action) {
case 'plan': case 'plan':
$server = _post('server'); $server = _post('server');
$jenis = _post('jenis'); $jenis = _post('jenis');
if($server=='radius'){
$d = ORM::for_table('tbl_plans')->where('is_radius', 1)->where('type', $jenis)->where('enabled', '1')->find_many();
}else{
$d = ORM::for_table('tbl_plans')->where('routers', $server)->where('type', $jenis)->where('enabled', '1')->find_many(); $d = ORM::for_table('tbl_plans')->where('routers', $server)->where('type', $jenis)->where('enabled', '1')->find_many();
}
$ui->assign('d', $d); $ui->assign('d', $d);
$ui->display('autoload.tpl'); $ui->display('autoload.tpl');

View File

@ -1,4 +1,7 @@
<option value=''>{$_L['Select_Routers']}</option> <option value=''>{$_L['Select_Routers']}</option>
{foreach $d as $ds} {foreach $d as $ds}
{if $_c['radius_enable']}
<option value="radius">Radius</option>
{/if}
<option value="{$ds['name']}">{$ds['name']}</option> <option value="{$ds['name']}">{$ds['name']}</option>
{/foreach} {/foreach}