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 # CHANGELOG
## 2024.1.16
- Add yellow color to table for plan not allowed to purchase
## 2024.1.15 ## 2024.1.15
- Fix cron job for Plan only for admin by @Focuslinkstech - Fix cron job for Plan only for admin by @Focuslinkstech

View File

@ -130,6 +130,7 @@ class Mikrotik
->setArgument('address-pool', $pool) ->setArgument('address-pool', $pool)
->setArgument('rate-limit', '512K/512K') ->setArgument('rate-limit', '512K/512K')
); );
die("| $profileID | $name | $pool |");
} else { } else {
$setRequest = new RouterOS\Request('/ip/hotspot/user/profile/set'); $setRequest = new RouterOS\Request('/ip/hotspot/user/profile/set');
$client->sendSync( $client->sendSync(

View File

@ -117,7 +117,7 @@ foreach ($d as $ds) {
echo " : EXPIRED \r\n"; echo " : EXPIRED \r\n";
$u = ORM::for_table('tbl_user_recharges')->where('id', $ds['id'])->find_one(); $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(); $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(); $p = ORM::for_table('tbl_plans')->where('id', $u['plan_id'])->find_one();
if ($p['is_radius']) { if ($p['is_radius']) {

View File

@ -175,12 +175,7 @@
if (cek.checked) { if (cek.checked) {
$("#routerChoose").addClass('hidden'); $("#routerChoose").addClass('hidden');
document.getElementById("routers").required = false; document.getElementById("routers").required = false;
} else { $("#pool_expired").html('');
document.getElementById("routers").required = true;
$("#routerChoose").removeClass('hidden');
}
}
setTimeout(() => {
$.ajax({ $.ajax({
url: "index.php?_route=autoload/pool", url: "index.php?_route=autoload/pool",
data: "routers=radius", data: "routers=radius",
@ -189,7 +184,11 @@
$("#pool_expired").html(msg); $("#pool_expired").html(msg);
} }
}); });
}, 2000); } else {
document.getElementById("routers").required = true;
$("#routerChoose").removeClass('hidden');
}
}
</script> </script>
{/literal} {/literal}
{/if} {/if}

View File

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

View File

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