hotspot plan radius

This commit is contained in:
Ibnu Maksum
2023-10-03 15:46:55 +07:00
parent 9e33a5740b
commit ce01771800
15 changed files with 393 additions and 242 deletions

View File

@ -60,7 +60,7 @@ switch ($action) {
$d = ORM::for_table('tbl_pool')->find_one($id);
$mikrotik = Mikrotik::info($d['routers']);
if ($d) {
if (!$config['radius_mode']) {
if (!$config['radius_enable']) {
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
Mikrotik::removePool($client, $d['pool_name']);
}
@ -100,7 +100,7 @@ switch ($action) {
}
$mikrotik = Mikrotik::info($routers);
if ($msg == '') {
if (!$config['radius_mode']) {
if (!$config['radius_enable']) {
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
Mikrotik::addPool($client, $name, $ip_address);
}
@ -137,7 +137,7 @@ switch ($action) {
$mikrotik = Mikrotik::info($routers);
if ($msg == '') {
if (!$config['radius_mode']) {
if (!$config['radius_enable']) {
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
Mikrotik::setPool($client, $d['pool_name'], $ip_address);
}