mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-04 10:15:03 +02:00
Radius add plan user
This commit is contained in:
parent
78cbb105aa
commit
7a524a50e3
2 changed files with 137 additions and 14 deletions
|
@ -98,7 +98,9 @@ class Package
|
|||
|
||||
if ($p['type'] == 'Hotspot') {
|
||||
if ($b) {
|
||||
if (!$_c['radius_enable']) {
|
||||
if ($p['is_radius']) {
|
||||
Radius::customerAddPlan($c, $p);
|
||||
}else{
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
Mikrotik::removeHotspotUser($client, $c['username']);
|
||||
Mikrotik::removePpoeUser($client, $c['username']);
|
||||
|
@ -155,7 +157,9 @@ class Package
|
|||
$t->type = "Hotspot";
|
||||
$t->save();
|
||||
} else {
|
||||
if (!$_c['radius_enable']) {
|
||||
if ($p['is_radius']) {
|
||||
Radius::customerAddPlan($c, $p);
|
||||
}else{
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
Mikrotik::removeHotspotUser($client, $c['username']);
|
||||
Mikrotik::removePpoeUser($client, $c['username']);
|
||||
|
@ -202,7 +206,9 @@ class Package
|
|||
} else {
|
||||
|
||||
if ($b) {
|
||||
if (!$_c['radius_enable']) {
|
||||
if ($p['is_radius']) {
|
||||
Radius::customerAddPlan($c, $p);
|
||||
}else{
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
Mikrotik::removeHotspotUser($client, $c['username']);
|
||||
Mikrotik::removePpoeUser($client, $c['username']);
|
||||
|
@ -260,7 +266,9 @@ class Package
|
|||
$t->type = "PPPOE";
|
||||
$t->save();
|
||||
} else {
|
||||
if (!$_c['radius_enable']) {
|
||||
if ($p['is_radius']) {
|
||||
Radius::customerAddPlan($c, $p);
|
||||
}else{
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
Mikrotik::removeHotspotUser($client, $c['username']);
|
||||
Mikrotik::removePpoeUser($client, $c['username']);
|
||||
|
@ -342,7 +350,9 @@ class Package
|
|||
$mikrotik = Mikrotik::info($p['routers']);
|
||||
if ($p['type'] == 'Hotspot') {
|
||||
if ($b) {
|
||||
if (!$_c['radius_enable']) {
|
||||
if ($p['is_radius']) {
|
||||
Radius::customerAddPlan($c, $p);
|
||||
}else{
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
Mikrotik::removeHotspotUser($client, $c['username']);
|
||||
Mikrotik::removePpoeUser($client, $c['username']);
|
||||
|
@ -351,7 +361,9 @@ class Package
|
|||
Mikrotik::addHotspotUser($client, $p, $c);
|
||||
}
|
||||
} else {
|
||||
if (!$_c['radius_enable']) {
|
||||
if ($p['is_radius']) {
|
||||
Radius::customerAddPlan($c, $p);
|
||||
}else{
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
Mikrotik::removeHotspotUser($client, $c['username']);
|
||||
Mikrotik::removePpoeUser($client, $c['username']);
|
||||
|
@ -362,7 +374,9 @@ class Package
|
|||
}
|
||||
} else {
|
||||
if ($b) {
|
||||
if (!$_c['radius_enable']) {
|
||||
if ($p['is_radius']) {
|
||||
Radius::customerAddPlan($c, $p);
|
||||
}else{
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
Mikrotik::removeHotspotUser($client, $c['username']);
|
||||
Mikrotik::removePpoeUser($client, $c['username']);
|
||||
|
@ -371,7 +385,9 @@ class Package
|
|||
Mikrotik::addPpoeUser($client, $p, $c);
|
||||
}
|
||||
} else {
|
||||
if (!$_c['radius_enable']) {
|
||||
if ($p['is_radius']) {
|
||||
Radius::customerAddPlan($c, $p);
|
||||
}else{
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
Mikrotik::removeHotspotUser($client, $c['username']);
|
||||
Mikrotik::removePpoeUser($client, $c['username']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue