Delete extend_expiry settings

This commit is contained in:
iBNu Maksum 2024-10-31 13:15:36 +07:00
parent 80e0dc6485
commit c740820731
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5
4 changed files with 31 additions and 44 deletions

View File

@ -172,7 +172,6 @@ class Package
if ($b) {
$lastExpired = Lang::dateAndTimeFormat($b['expiration'], $b['time']);
$isChangePlan = false;
if ($config['extend_expiry'] != 'no') {
if ($b['namebp'] == $p['name_plan'] && $b['status'] == 'on') {
// if it same internet plan, expired will extend
if ($p['validity_unit'] == 'Months') {
@ -196,7 +195,6 @@ class Package
} else {
$isChangePlan = true;
}
}
//if ($b['status'] == 'on') {
$dvc = Package::getDevice($p);

View File

@ -341,12 +341,11 @@ class Radius
// expired user
if ($expired != '') {
//extend session time only if the plan are the same
if ($plan['plan_id'] == $p['plan_id'] && $config['extend_expiry'] != 'no') {
// session timeout [it reset everyday, am still making my research] we can use it for something like 1H/Day - since it reset daily, and Max-All-Session clear everything
//$this->upsertCustomer($customer['username'], 'Session-Timeout', 3600); // 3600 = 1 hour
$this->upsertCustomer($customer['username'], 'Max-All-Session', strtotime($expired) - time());
$this->upsertCustomer($customer['username'], 'Expiration', date('d M Y H:i:s', strtotime($expired)));
}
// Mikrotik Spesific
$this->upsertCustomer(
$customer['username'],

View File

@ -762,5 +762,8 @@
"just_now": "baru saja",
"Face_Detection": "Deteksi Wajah",
"Password_should_be_minimum_6_characters": "Kata sandi minimal harus 6 karakter",
"Username_should_be_between_3_to_45_characters": "Nama pengguna harus terdiri dari 3 hingga 45 karakter"
"Username_should_be_between_3_to_45_characters": "Nama pengguna harus terdiri dari 3 hingga 45 karakter",
"Single_session_Admin": "Sesi Tunggal Admin",
"Admin_can_only_have_single_session_login__it_will_logout_another_session": "Admin hanya dapat memiliki login satu sesi, maka akan keluar dari sesi berikutnya",
"For_Registration_and_Update_Phone_Number": "Untuk Registrasi dan Update Nomor Telepon"
}

View File

@ -130,19 +130,6 @@
{Lang::T('OTP is required when user want to change Email Address')}
</p>
</div>
<div class="form-group">
<label class="col-md-2 control-label">{Lang::T('Extend Package Expiry')}</label>
<div class="col-md-6">
<select name="extend_expiry" id="extend_expiry" class="form-control">
<option value="yes" {if $_c['extend_expiry']!='no' }selected="selected" {/if}>
{Lang::T('Yes')}</option>
<option value="no" {if $_c['extend_expiry']=='no' }selected="selected" {/if}>
{Lang::T('No')}</option>
</select>
</div>
<p class="help-block col-md-4">
{Lang::T('If user buy same internet plan, expiry date will extend')}</p>
</div>
<div class="form-group">
<label class="col-md-2 control-label">{Lang::T('Show Bandwidth Plan')}</label>
<div class="col-md-6">