diff --git a/system/controllers/pool.php b/system/controllers/pool.php index 69b06371..925f2ef5 100644 --- a/system/controllers/pool.php +++ b/system/controllers/pool.php @@ -15,9 +15,6 @@ if ($admin['user_type'] != 'Admin') { r2(U . "dashboard", 'e', $_L['Do_Not_Access']); } -use PEAR2\Net\RouterOS; - -require_once 'system/autoload/PEAR2/Autoload.php'; switch ($action) { case 'list': diff --git a/system/controllers/services.php b/system/controllers/services.php index ed44feb3..6dc69fdf 100644 --- a/system/controllers/services.php +++ b/system/controllers/services.php @@ -53,10 +53,10 @@ switch ($action) { $d = ORM::for_table('tbl_plans')->find_one($id); if ($d) { $ui->assign('d', $d); + $p = ORM::for_table('tbl_pool')->where('routers', $d['routers'])->find_many(); + $ui->assign('p', $p); $b = ORM::for_table('tbl_bandwidth')->find_many(); $ui->assign('b', $b); - $r = ORM::for_table('tbl_routers')->find_many(); - $ui->assign('r', $r); run_hook('view_edit_plan'); #HOOK $ui->display('hotspot-edit.tpl'); } else { @@ -96,6 +96,7 @@ switch ($action) { $validity = _post('validity'); $validity_unit = _post('validity_unit'); $routers = _post('routers'); + $pool_expired = _post('pool_expired'); $enabled = _post('enabled'); $msg = ''; @@ -151,6 +152,7 @@ switch ($action) { $d->validity_unit = $validity_unit; $d->shared_users = $sharedusers; $d->routers = $routers; + $d->pool_expired = $pool_expired; $d->enabled = $enabled; $d->save(); @@ -176,6 +178,7 @@ switch ($action) { $validity = _post('validity'); $validity_unit = _post('validity_unit'); $routers = _post('routers'); + $pool_expired = _post('pool_expired'); $enabled = _post('enabled'); $msg = ''; @@ -228,6 +231,7 @@ switch ($action) { $d->validity_unit = $validity_unit; $d->shared_users = $sharedusers; $d->routers = $routers; + $d->pool_expired = $pool_expired; $d->enabled = $enabled; $d->save(); @@ -260,8 +264,6 @@ switch ($action) { $ui->assign('_title', $_L['PPPOE_Plans']); $d = ORM::for_table('tbl_bandwidth')->find_many(); $ui->assign('d', $d); - $p = ORM::for_table('tbl_pool')->find_many(); - $ui->assign('p', $p); $r = ORM::for_table('tbl_routers')->find_many(); $ui->assign('r', $r); run_hook('view_add_ppoe'); #HOOK @@ -274,10 +276,10 @@ switch ($action) { $d = ORM::for_table('tbl_plans')->find_one($id); if ($d) { $ui->assign('d', $d); + $p = ORM::for_table('tbl_pool')->where('routers', $d['routers'])->find_many(); + $ui->assign('p', $p); $b = ORM::for_table('tbl_bandwidth')->find_many(); $ui->assign('b', $b); - $p = ORM::for_table('tbl_pool')->find_many(); - $ui->assign('p', $p); $r = ORM::for_table('tbl_routers')->find_many(); $ui->assign('r', $r); run_hook('view_edit_ppoe'); #HOOK @@ -312,6 +314,7 @@ switch ($action) { $validity_unit = _post('validity_unit'); $routers = _post('routers'); $pool = _post('pool_name'); + $pool_expired = _post('pool_expired'); $enabled = _post('enabled'); $msg = ''; @@ -359,6 +362,7 @@ switch ($action) { $d->validity_unit = $validity_unit; $d->routers = $routers; $d->pool = $pool; + $d->pool_expired = $pool_expired; $d->enabled = $enabled; $d->save(); @@ -377,6 +381,7 @@ switch ($action) { $validity_unit = _post('validity_unit'); $routers = _post('routers'); $pool = _post('pool_name'); + $pool_expired = _post('pool_expired'); $enabled = _post('enabled'); $msg = ''; @@ -423,6 +428,7 @@ switch ($action) { $d->validity_unit = $validity_unit; $d->routers = $routers; $d->pool = $pool; + $d->pool_expired = $pool_expired; $d->enabled = $enabled; $d->save(); diff --git a/system/lan/indonesia/common.lan.php b/system/lan/indonesia/common.lan.php index f24fbd1c..05f63cc9 100644 --- a/system/lan/indonesia/common.lan.php +++ b/system/lan/indonesia/common.lan.php @@ -340,3 +340,4 @@ $_L['Customer_can_deposit_money_to_buy_voucher'] = 'Pelanggan dapat topup saldo $_L['Allow_balance_transfer_between_customers'] = 'Bolehkan transfer saldo antar pelanggan'; $_L['Refill_Balance'] = 'Refill Balance'; $_L['Balance_Plans'] = 'Balance Plans'; +$_L['Expired_IP_Pool'] = 'Expired IP Pool'; diff --git a/system/updates.json b/system/updates.json index b400aaad..77023a3d 100644 --- a/system/updates.json +++ b/system/updates.json @@ -19,6 +19,7 @@ "ALTER TABLE `tbl_transactions` ADD `recharged_time` time NOT NULL DEFAULT '00:00:00' AFTER `recharged_on`;" ], "2023.9.5" : [ - "DROP TABLE `tbl_language`;" + "DROP TABLE `tbl_language`;", + "ALTER TABLE `tbl_plans` ADD `pool_expired` varchar(40) NOT NULL DEFAULT '' AFTER `pool`;" ] } \ No newline at end of file diff --git a/ui/ui/autoload-pool.tpl b/ui/ui/autoload-pool.tpl index bb1b6d75..c4f825de 100644 --- a/ui/ui/autoload-pool.tpl +++ b/ui/ui/autoload-pool.tpl @@ -1,4 +1,4 @@ - + {foreach $d as $ds} {/foreach} \ No newline at end of file diff --git a/ui/ui/autoload-server.tpl b/ui/ui/autoload-server.tpl index 9260b1b9..51e6616b 100644 --- a/ui/ui/autoload-server.tpl +++ b/ui/ui/autoload-server.tpl @@ -1,4 +1,4 @@ - + {foreach $d as $ds} {/foreach} \ No newline at end of file diff --git a/ui/ui/hotspot-add.tpl b/ui/ui/hotspot-add.tpl index 448dc26b..de325104 100644 --- a/ui/ui/hotspot-add.tpl +++ b/ui/ui/hotspot-add.tpl @@ -112,7 +112,8 @@