forked from kevinowino869/mitrobill
radius move to expired pool
This commit is contained in:
@ -103,8 +103,13 @@ foreach ($d as $ds) {
|
||||
$p = ORM::for_table('tbl_plans')->where('id', $u['plan_id'])->find_one();
|
||||
|
||||
if ($p['is_radius']) {
|
||||
echo Radius::customerDeactivate($c['username']);
|
||||
}else{
|
||||
if (!empty($p['pool_expired'])) {
|
||||
print_r(Radius::customerDeactivate($c['username']));
|
||||
} else {
|
||||
Radius::upsertCustomerAttr($c['username'], 'Framed-Pool', $plan['pool_expired'], ':=');
|
||||
print_r(Radius::disconnectCustomer($c['username']));
|
||||
}
|
||||
} else {
|
||||
$client = Mikrotik::getClient($m['ip_address'], $m['username'], $m['password']);
|
||||
if (!empty($p['pool_expired'])) {
|
||||
Mikrotik::setHotspotUserPackage($client, $c['username'], 'EXPIRED NUXBILL ' . $p['pool_expired']);
|
||||
@ -152,8 +157,13 @@ foreach ($d as $ds) {
|
||||
$p = ORM::for_table('tbl_plans')->where('id', $u['plan_id'])->find_one();
|
||||
|
||||
if ($p['is_radius']) {
|
||||
echo Radius::customerDeactivate($c['username']);
|
||||
}else{
|
||||
if (!empty($p['pool_expired'])) {
|
||||
print_r(Radius::customerDeactivate($c['username']));
|
||||
} else {
|
||||
Radius::upsertCustomerAttr($c['username'], 'Framed-Pool', $plan['pool_expired'], ':=');
|
||||
print_r(Radius::disconnectCustomer($c['username']));
|
||||
}
|
||||
} else {
|
||||
$client = Mikrotik::getClient($m['ip_address'], $m['username'], $m['password']);
|
||||
if (!empty($p['pool_expired'])) {
|
||||
Mikrotik::setPpoeUserPlan($client, $c['username'], 'EXPIRED NUXBILL ' . $p['pool_expired']);
|
||||
|
Reference in New Issue
Block a user