fix radius pool select

This commit is contained in:
Ibnu Maksum 2024-01-16 09:39:20 +07:00
parent 470c219e61
commit b504723e7c
No known key found for this signature in database
GPG key ID: 7FC82848810579E5
6 changed files with 17 additions and 13 deletions

View file

@ -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

View file

@ -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(

View file

@ -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']) {

View file

@ -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);
</script>
{/literal}
{/if}

View file

@ -179,7 +179,7 @@
</div>
</div>
{if $_c['radius_enable']}
{if $_c['radius_enable'] && $d['is_radius']}
{literal}
<script>
function isRadius(cek) {

View file

@ -121,7 +121,7 @@
</div>
</div>
{if $_c['radius_enable'] and $d['is_radius']}
{if $_c['radius_enable'] && $d['is_radius']}
{literal}
<script>
document.getElementById("routers").required = false;