diff --git a/install/phpnuxbill.sql b/install/phpnuxbill.sql index e3283ec5..6b0a07c3 100644 --- a/install/phpnuxbill.sql +++ b/install/phpnuxbill.sql @@ -329,4 +329,5 @@ ALTER TABLE `tbl_payment_gateway` ADD `trx_invoice` VARCHAR(25) NOT NULL DEFAULT ALTER TABLE `tbl_customers` ADD `status` ENUM('Active','Banned','Disabled') NOT NULL DEFAULT 'Active' AFTER `auto_renewal`; ALTER TABLE `tbl_customers` CHANGE `status` `status` ENUM('Active','Banned','Disabled','Inactive','Limited','Suspended') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'Active'; ALTER TABLE `tbl_plans` ADD `price_old` VARCHAR(40) NOT NULL DEFAULT '' AFTER `price`; -ALTER TABLE `tbl_plans` ADD `device` VARCHAR(32) NOT NULL DEFAULT '' AFTER `plan_type`; \ No newline at end of file +ALTER TABLE `tbl_plans` ADD `device` VARCHAR(32) NOT NULL DEFAULT '' AFTER `plan_type`; +ALTER TABLE `tbl_pool` ADD `local_ip` VARCHAR(40) NOT NULL DEFAULT '' AFTER `pool_name`; \ No newline at end of file diff --git a/system/controllers/pool.php b/system/controllers/pool.php index d0184653..62233452 100644 --- a/system/controllers/pool.php +++ b/system/controllers/pool.php @@ -83,6 +83,7 @@ switch ($action) { case 'add-post': $name = _post('name'); $ip_address = _post('ip_address'); + $local_ip = _post('local_ip'); $routers = _post('routers'); run_hook('add_pool'); #HOOK $msg = ''; @@ -103,6 +104,7 @@ switch ($action) { } $b = ORM::for_table('tbl_pool')->create(); + $d->local_ip = $local_ip; $b->pool_name = $name; $b->range_ip = $ip_address; $b->routers = $routers; @@ -116,6 +118,7 @@ switch ($action) { case 'edit-post': + $local_ip = _post('local_ip'); $ip_address = _post('ip_address'); $routers = _post('routers'); run_hook('edit_pool'); #HOOK @@ -133,6 +136,7 @@ switch ($action) { } if ($msg == '') { + $d->local_ip = $local_ip; $d->range_ip = $ip_address; $d->routers = $routers; $d->save(); diff --git a/system/lan/english.json b/system/lan/english.json index d327f961..71a2ce52 100644 --- a/system/lan/english.json +++ b/system/lan/english.json @@ -631,5 +631,6 @@ "State_of_Resident": "State of Resident", "Zip": "Zip", "Zip_Code": "Zip Code", + "Local_IP": "Local IP", "": "" } \ No newline at end of file diff --git a/system/updates.json b/system/updates.json index 328fc080..9bceb553 100644 --- a/system/updates.json +++ b/system/updates.json @@ -106,5 +106,8 @@ "2024.6.5" : [ "ALTER TABLE `tbl_plans` ADD `price_old` VARCHAR(40) NOT NULL DEFAULT '' AFTER `price`;", "ALTER TABLE `tbl_plans` ADD `device` VARCHAR(32) NOT NULL DEFAULT '' AFTER `plan_type`;" + ], + "2024.6.10" : [ + "ALTER TABLE `tbl_pool` ADD `local_ip` VARCHAR(40) NOT NULL DEFAULT '' AFTER `pool_name`;" ] } \ No newline at end of file diff --git a/ui/ui/pool-add.tpl b/ui/ui/pool-add.tpl index cb7d8be3..8e850a1a 100644 --- a/ui/ui/pool-add.tpl +++ b/ui/ui/pool-add.tpl @@ -13,10 +13,16 @@ +
+ +
+ +
+
- +
@@ -31,9 +37,6 @@ {/foreach}
- {if $_c['radius_enable']} -

For Radius, you need to add Pool Name in Mikrotik manually

- {/if}
diff --git a/ui/ui/pool-edit.tpl b/ui/ui/pool-edit.tpl index 7f8cdb05..c3c95e7f 100644 --- a/ui/ui/pool-edit.tpl +++ b/ui/ui/pool-edit.tpl @@ -14,6 +14,12 @@
+
+ +
+ +
+
diff --git a/ui/ui/pool.tpl b/ui/ui/pool.tpl index 4c8dc915..211e068d 100644 --- a/ui/ui/pool.tpl +++ b/ui/ui/pool.tpl @@ -9,7 +9,7 @@ onclick="return confirm('This will sync/send IP Pool to Mikrotik?')"> sync
- {Lang::T('IP Pool')} + {Lang::T('IP Pool')} - PPPOE
@@ -37,6 +37,7 @@ {Lang::T('Name Pool')} + {Lang::T('Local IP')} {Lang::T('Range IP')} {Lang::T('Routers')} {Lang::T('Manage')} @@ -47,6 +48,7 @@ {foreach $d as $ds} {$ds['pool_name']} + {$ds['local_ip']} {$ds['range_ip']} {$ds['routers']}