Fix bugs burst

Fix Burst on php7
Fix edit hotspot plan
Fix burs reset if klick sync button on plan page
This commit is contained in:
gerandonk 2024-05-08 13:39:15 +07:00
parent 060718dfda
commit ee63abb618
3 changed files with 4 additions and 4 deletions

View File

@ -92,7 +92,7 @@ class Radius
{ {
$rates = explode('/', $rate); $rates = explode('/', $rate);
##burst fixed ##burst fixed
if (str_contains($rate, ' ')) { if (strpos($rate, ' ')) {
$ratos = $rates[0].'/'.$rates[1].' '.$rates[2].'/'.$rates[3].'/'.$rates[4].'/'.$rates[5].'/'.$rates[6]; $ratos = $rates[0].'/'.$rates[1].' '.$rates[2].'/'.$rates[3].'/'.$rates[4].'/'.$rates[5].'/'.$rates[6];
} else { } else {
$ratos = $rates[0].'/'.$rates[1]; $ratos = $rates[0].'/'.$rates[1];

View File

@ -38,7 +38,7 @@ switch ($action) {
} else { } else {
$radup = '000000'; $radup = '000000';
} }
$radiusRate = $plan['rate_up'] . $radup . '/' . $plan['rate_down'] . $raddown . '/' . $b['burst']; $radiusRate = $plan['rate_up'] . $radup . '/' . $plan['rate_down'] . $raddown . '/' . $plan['burst'];
Radius::planUpSert($plan['id'], $radiusRate); Radius::planUpSert($plan['id'], $radiusRate);
$log .= "DONE : Radius $plan[name_plan], $plan[shared_users], $radiusRate<br>"; $log .= "DONE : Radius $plan[name_plan], $plan[shared_users], $radiusRate<br>";
} else { } else {
@ -83,7 +83,7 @@ switch ($action) {
} else { } else {
$radup = '000000'; $radup = '000000';
} }
$radiusRate = $plan['rate_up'] . $radup . '/' . $plan['rate_down'] . $raddown . '/' . $b['burst']; $radiusRate = $plan['rate_up'] . $radup . '/' . $plan['rate_down'] . $raddown . '/' . $plan['burst'];
Radius::planUpSert($plan['id'], $radiusRate, $plan['pool']); Radius::planUpSert($plan['id'], $radiusRate, $plan['pool']);
$log .= "DONE : RADIUS $plan[name_plan], $plan[pool], $rate<br>"; $log .= "DONE : RADIUS $plan[name_plan], $plan[pool], $rate<br>";
} else { } else {

View File

@ -59,7 +59,7 @@
<div class="col-md-10"> <div class="col-md-10">
<input type="radio" id="Unlimited" name="typebp" value="Unlimited" <input type="radio" id="Unlimited" name="typebp" value="Unlimited"
{if $d['typebp'] eq 'Unlimited'} checked {/if}> {Lang::T('Unlimited')} {if $d['typebp'] eq 'Unlimited'} checked {/if}> {Lang::T('Unlimited')}
<input type="radio" id="Limited" {if $_c['radius_enable'] and $d['is_radius']}disabled{/if} <input type="radio" id="Limited"
name="typebp" value="Limited" {if $d['typebp'] eq 'Limited'} checked {/if}> name="typebp" value="Limited" {if $d['typebp'] eq 'Limited'} checked {/if}>
{Lang::T('Limited')} {Lang::T('Limited')}
</div> </div>