diff --git a/CHANGELOG.md b/CHANGELOG.md index a874d124..73265ec0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ # CHANGELOG +## 2024.5.17 + +- Status Customer: Active/Banned/Disabled +- Add search with order in Customer list + ## 2024.5.16 - Confirm can change Using diff --git a/system/autoload/User.php b/system/autoload/User.php index 93125f15..b0cc9800 100644 --- a/system/autoload/User.php +++ b/system/autoload/User.php @@ -163,7 +163,7 @@ class User $id = User::getID(); } $d = ORM::for_table('tbl_customers')->find_one($id); - if ($d['status'] != 'Banned') { + if ($d['status'] == 'Banned') { _alert(Lang::T('This account status') . ' : ' . Lang::T($d['status']), 'danger', "logout"); } if (empty($d['username'])) { diff --git a/system/controllers/customers.php b/system/controllers/customers.php index 7436b23d..dfff613c 100644 --- a/system/controllers/customers.php +++ b/system/controllers/customers.php @@ -613,7 +613,8 @@ switch ($action) { $order_pos = [ 'username' => 0, 'created_at' => 8, - 'balance' => 3 + 'balance' => 3, + 'status' => 7 ]; if ($search != '') { diff --git a/system/controllers/home.php b/system/controllers/home.php index 7640d057..7bba5d1d 100644 --- a/system/controllers/home.php +++ b/system/controllers/home.php @@ -18,7 +18,7 @@ if (isset($_GET['renewal'])) { if (_post('send') == 'balance') { if ($config['enable_balance'] == 'yes' && $config['allow_balance_transfer'] == 'yes') { - if ($user['status'] != 'Active') { + if ($user['status'] == 'Disabled') { _alert(Lang::T('This account status') . ' : ' . Lang::T($user['status']), 'danger', ""); } $target = ORM::for_table('tbl_customers')->where('username', _post('username'))->find_one(); @@ -80,7 +80,7 @@ if (_post('send') == 'balance') { r2(U . 'home', 'd', Lang::T('Failed, balance is not available')); } } else if (_post('send') == 'plan') { - if ($user['status'] != 'Active') { + if ($user['status'] == 'Disabled') { _alert(Lang::T('This account status') . ' : ' . Lang::T($user['status']), 'danger', ""); } $actives = ORM::for_table('tbl_user_recharges') @@ -98,7 +98,7 @@ if (_post('send') == 'balance') { $ui->assign('_bills', User::_billing()); if (isset($_GET['recharge']) && !empty($_GET['recharge'])) { - if ($user['status'] != 'Active') { + if ($user['status'] == 'Disabled') { _alert(Lang::T('This account status') . ' : ' . Lang::T($user['status']), 'danger', ""); } if (!empty(App::getTokenValue(_get('stoken')))) { @@ -128,7 +128,7 @@ if (isset($_GET['recharge']) && !empty($_GET['recharge'])) { } } } else if (!empty(_get('extend'))) { - if ($user['status'] != 'Active') { + if ($user['status'] == 'Disabled') { _alert(Lang::T('This account status') . ' : ' . Lang::T($user['status']), 'danger', ""); } if (!$config['extend_expired']) { diff --git a/system/controllers/login.php b/system/controllers/login.php index 4845c6f4..cb246dec 100644 --- a/system/controllers/login.php +++ b/system/controllers/login.php @@ -24,7 +24,7 @@ switch ($do) { $d = ORM::for_table('tbl_customers')->where('username', $username)->find_one(); if ($d) { $d_pass = $d['password']; - if ($d['status'] != 'Banned') { + if ($d['status'] == 'Banned') { _alert(Lang::T('This account status') . ' : ' . Lang::T($d['status']), 'danger', ""); } if (Password::_uverify($password, $d_pass) == true) { diff --git a/system/lan/indonesia.json b/system/lan/indonesia.json index beb8df18..609fb862 100644 --- a/system/lan/indonesia.json +++ b/system/lan/indonesia.json @@ -472,5 +472,7 @@ "SMS": "SMS", "WhatsApp": "WhatsApp", "SMS_and_WhatsApp": "SMS dan WhatsApp", - "The_method_which_OTP_will_be_sent_to_user": "Metode OTP yang akan dikirimkan ke pengguna" + "The_method_which_OTP_will_be_sent_to_user": "Metode OTP yang akan dikirimkan ke pengguna", + "Disabled": "Dinonaktifkan", + "Banned": "Banned" } diff --git a/ui/ui/customers.tpl b/ui/ui/customers.tpl index 081f86b9..cd0f75c1 100644 --- a/ui/ui/customers.tpl +++ b/ui/ui/customers.tpl @@ -36,6 +36,7 @@ +
diff --git a/version.json b/version.json index be905b48..1d614587 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "2024.5.16" + "version": "2024.5.17.1" } \ No newline at end of file