diff --git a/system/controllers/services.php b/system/controllers/services.php index 38d2a29a..a46b1754 100644 --- a/system/controllers/services.php +++ b/system/controllers/services.php @@ -470,6 +470,7 @@ switch ($action) { $routers = _post('routers'); $pool = _post('pool_name'); $pool_expired = _post('pool_expired'); + $list_expired = _post('list_expired'); $enabled = _post('enabled'); $allow_purchase = _post('allow_purchase'); @@ -529,8 +530,9 @@ switch ($action) { } else { $d->is_radius = 0; $d->routers = $routers; - $d->pool_expired = $pool_expired; } + $d->pool_expired = $pool_expired; + $d->list_expired = $list_expired; $d->enabled = $enabled; $d->allow_purchase = $allow_purchase; $d->save(); @@ -563,6 +565,7 @@ switch ($action) { $routers = _post('routers'); $pool = _post('pool_name'); $pool_expired = _post('pool_expired'); + $list_expired = _post('list_expired'); $enabled = _post('enabled'); $allow_purchase = _post('allow_purchase'); @@ -622,6 +625,7 @@ switch ($action) { $d->routers = $routers; $d->pool = $pool; $d->pool_expired = $pool_expired; + $d->list_expired = $list_expired; $d->enabled = $enabled; $d->allow_purchase = $allow_purchase; $d->save(); diff --git a/system/cron.php b/system/cron.php index 13526655..e3cdd5b2 100644 --- a/system/cron.php +++ b/system/cron.php @@ -46,6 +46,8 @@ foreach ($d as $ds) { $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']); + }if (!empty($p['list_expired'])) { + Mikrotik::addIpToAddressList($client, $ip, $p['list_expired'], $c['username']); } else { Mikrotik::removeHotspotUser($client, $c['username']); } diff --git a/system/lan/english.json b/system/lan/english.json index bdf1f135..0f7f8bd3 100644 --- a/system/lan/english.json +++ b/system/lan/english.json @@ -417,5 +417,6 @@ "Login": "Login", "Expired_Action": "Expired Action", "Expired_Address_List_Name": "Expired Address List Name", - "Address_List": "Address List" + "Address_List": "Address List", + "Optional": "Optional" } \ No newline at end of file diff --git a/ui/ui/hotspot-add.tpl b/ui/ui/hotspot-add.tpl index 37784ee2..5d4c43be 100644 --- a/ui/ui/hotspot-add.tpl +++ b/ui/ui/hotspot-add.tpl @@ -147,19 +147,7 @@ -