diff --git a/CHANGELOG.md b/CHANGELOG.md index 2453b43a..cb80646b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ # CHANGELOG +## 2024.1.16 + +- Add yellow color to table for plan not allowed to purchase + ## 2024.1.15 - Fix cron job for Plan only for admin by @Focuslinkstech diff --git a/system/autoload/Mikrotik.php b/system/autoload/Mikrotik.php index b622a3d9..da5d1615 100644 --- a/system/autoload/Mikrotik.php +++ b/system/autoload/Mikrotik.php @@ -130,6 +130,7 @@ class Mikrotik ->setArgument('address-pool', $pool) ->setArgument('rate-limit', '512K/512K') ); + die("| $profileID | $name | $pool |"); } else { $setRequest = new RouterOS\Request('/ip/hotspot/user/profile/set'); $client->sendSync( diff --git a/system/cron.php b/system/cron.php index eda037d0..86aa764e 100644 --- a/system/cron.php +++ b/system/cron.php @@ -117,7 +117,7 @@ foreach ($d as $ds) { echo " : EXPIRED \r\n"; $u = ORM::for_table('tbl_user_recharges')->where('id', $ds['id'])->find_one(); $c = ORM::for_table('tbl_customers')->where('id', $ds['customer_id'])->find_one(); - $m = ORM::for_table('tbl_routers')->where('name', $ds['routers'])->find_one(); + $m = Mikrotik::info($ds['routers']); $p = ORM::for_table('tbl_plans')->where('id', $u['plan_id'])->find_one(); if ($p['is_radius']) { diff --git a/ui/ui/hotspot-add.tpl b/ui/ui/hotspot-add.tpl index 4472be80..fd16f816 100644 --- a/ui/ui/hotspot-add.tpl +++ b/ui/ui/hotspot-add.tpl @@ -175,21 +175,20 @@ if (cek.checked) { $("#routerChoose").addClass('hidden'); document.getElementById("routers").required = false; + $("#pool_expired").html(''); + $.ajax({ + url: "index.php?_route=autoload/pool", + data: "routers=radius", + cache: false, + success: function(msg) { + $("#pool_expired").html(msg); + } + }); } else { document.getElementById("routers").required = true; $("#routerChoose").removeClass('hidden'); } } - setTimeout(() => { - $.ajax({ - url: "index.php?_route=autoload/pool", - data: "routers=radius", - cache: false, - success: function(msg) { - $("#pool_expired").html(msg); - } - }); - }, 2000); {/literal} {/if} diff --git a/ui/ui/hotspot-edit.tpl b/ui/ui/hotspot-edit.tpl index ffe6af7a..b5fa76a6 100644 --- a/ui/ui/hotspot-edit.tpl +++ b/ui/ui/hotspot-edit.tpl @@ -179,7 +179,7 @@ -{if $_c['radius_enable']} +{if $_c['radius_enable'] && $d['is_radius']} {literal}