allow radius pool
This commit is contained in:
parent
ce01771800
commit
efc0ba93b6
@ -16,7 +16,12 @@ $ui->assign('_admin', $admin);
|
||||
switch ($action) {
|
||||
case 'pool':
|
||||
$routers = _get('routers');
|
||||
if(empty($routers)){
|
||||
$d = ORM::for_table('tbl_pool')->find_many();
|
||||
}else{
|
||||
$d = ORM::for_table('tbl_pool')->where('routers', $routers)->find_many();
|
||||
}
|
||||
$ui->assign('routers', $routers);
|
||||
$ui->assign('d', $d);
|
||||
$ui->display('autoload-pool.tpl');
|
||||
break;
|
||||
|
@ -100,7 +100,7 @@ switch ($action) {
|
||||
}
|
||||
$mikrotik = Mikrotik::info($routers);
|
||||
if ($msg == '') {
|
||||
if (!$config['radius_enable']) {
|
||||
if (!$config['radius_enable'] && $routers != 'radius') {
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
Mikrotik::addPool($client, $name, $ip_address);
|
||||
}
|
||||
|
@ -23,6 +23,9 @@
|
||||
<label class="col-md-2 control-label"><a href="{$_url}routers/add">{$_L['Routers']}</a></label>
|
||||
<div class="col-md-6">
|
||||
<select id="routers" name="routers" class="form-control select2">
|
||||
{if $_c['radius_enable']}
|
||||
<option value="radius">Radius</option>
|
||||
{/if}
|
||||
{foreach $r as $rs}
|
||||
<option value="{$rs['name']}">{$rs['name']}</option>
|
||||
{/foreach}
|
||||
|
Loading…
x
Reference in New Issue
Block a user