change whereIdIn to where_in

This commit is contained in:
Ibnu Maksum 2024-06-21 19:55:51 +07:00
parent 04983e8a3a
commit 98d8b4fe4e
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5
5 changed files with 27 additions and 9 deletions

View File

@ -386,7 +386,7 @@ switch ($action) {
$ui->assign('customers', ORM::for_table('tbl_voucher')->distinct()->select("user")->whereNotEqual("user", '0')->findArray());
// option plans
$plns = ORM::for_table('tbl_voucher')->distinct()->select("id_plan")->findArray();
$ui->assign('plans', ORM::for_table('tbl_plans')->selects(["id", 'name_plan'])->whereIdIn(array_column($plns, 'id_plan'))->findArray());
$ui->assign('plans', ORM::for_table('tbl_plans')->selects(["id", 'name_plan'])->where_in('id', array_column($plns, 'id_plan'))->findArray());
$ui->assign('routers', array_column(ORM::for_table('tbl_voucher')->distinct()->select("routers")->findArray(), 'routers'));

View File

@ -82,7 +82,7 @@ switch ($action) {
. "&router=" . urlencode($router);
$bws = ORM::for_table('tbl_plans')->distinct()->select("id_bw")->where('tbl_plans.type', 'Hotspot')->findArray();
$ui->assign('bws', ORM::for_table('tbl_bandwidth')->selects(["id", 'name_bw'])->whereIdIn(array_column($bws, 'id_bw'))->findArray());
$ui->assign('bws', ORM::for_table('tbl_bandwidth')->selects(["id", 'name_bw'])->where_in('id', array_column($bws, 'id_bw'))->findArray());
$ui->assign('type2s', ORM::for_table('tbl_plans')->getEnum("plan_type"));
$ui->assign('type3s', ORM::for_table('tbl_plans')->getEnum("typebp"));
$ui->assign('valids', ORM::for_table('tbl_plans')->getEnum("validity_unit"));
@ -447,7 +447,7 @@ switch ($action) {
. "&router=" . urlencode($router);
$bws = ORM::for_table('tbl_plans')->distinct()->select("id_bw")->findArray();
$ui->assign('bws', ORM::for_table('tbl_bandwidth')->selects(["id", 'name_bw'])->whereIdIn(array_column($bws, 'id_bw'))->findArray());
$ui->assign('bws', ORM::for_table('tbl_bandwidth')->selects(["id", 'name_bw'])->where_in('id', array_column($bws, 'id_bw'))->findArray());
$ui->assign('type2s', ORM::for_table('tbl_plans')->getEnum("plan_type"));
$ui->assign('type3s', ORM::for_table('tbl_plans')->getEnum("typebp"));
$ui->assign('valids', ORM::for_table('tbl_plans')->getEnum("validity_unit"));

View File

@ -220,7 +220,7 @@ class Radius {
if ($p) {
// if exists
$this->delAtribute($this->getTableCustomer(), 'Max-All-Session', 'username', $customer['username']);
//$this->delAtribute($this->getTableCustomer(), 'Max-Volume', 'username', $customer['username']);
$this->delAtribute($this->getTableCustomer(), 'Max-Volume', 'username', $customer['username']);
$this->delAtribute($this->getTableCustomer(), 'Max-Data', 'username', $customer['username']);
$p->groupname = "plan_" . $plan['id'];
$p->save();
@ -238,7 +238,7 @@ class Radius {
else
$timelimit = $plan['time_limit'] * 60;
$this->upsertCustomer($customer['username'], 'Max-All-Session', $timelimit);
//$this->upsertCustomer($customer['username'], 'Expire-After', $timelimit);
$this->upsertCustomer($customer['username'], 'Expire-After', $timelimit);
} else if ($plan['limit_type'] == "Data_Limit") {
if ($plan['data_unit'] == 'GB')
$datalimit = $plan['data_limit'] . "000000000";
@ -281,7 +281,7 @@ class Radius {
if ($expired != null) {
//$this->upsertCustomer($customer['username'], 'access-period', strtotime($expired) - time());
$this->upsertCustomer($customer['username'], 'Max-All-Session', strtotime($expired) - time());
//$this->upsertCustomer($customer['username'], 'expiration', date('d M Y H:i:s', strtotime($expired)));
$this->upsertCustomer($customer['username'], 'expiration', date('d M Y H:i:s', strtotime($expired)));
// Mikrotik Spesific
$this->upsertCustomer(
$customer['username'],
@ -291,7 +291,7 @@ class Radius {
} else {
$this->delAtribute($this->getTableCustomer(), 'Max-All-Session', 'username', $customer['username']);
//$this->delAtribute($this->getTableCustomer(), 'access-period', 'username', $customer['username']);
//$this->delAtribute($this->getTableCustomer(), 'expiration', 'username', $customer['username']);
$this->delAtribute($this->getTableCustomer(), 'expiration', 'username', $customer['username']);
}
if ($plan['type'] == 'PPPOE') {

View File

@ -494,5 +494,21 @@
"Tax_Rates_in_percentage": "Tarif Pajak dalam persentase",
"Custom_Tax_Rate": "Tarif Pajak Khusus",
"Enter_Custom_Tax_Rate": "Masukkan Tarif Pajak Khusus",
"Enter_the_custom_tax_rate__e_g___3_75_for_3_75__": "Masukkan tarif pajak khusus (misalnya 3,75 untuk 3,75%)"
"Enter_the_custom_tax_rate__e_g___3_75_for_3_75__": "Masukkan tarif pajak khusus (misalnya 3,75 untuk 3,75%)",
"Local_IP": "IP lokal",
"Business": "Bisnis",
"Category": "Kategori",
"Device": "Perangkat",
"Expired": "Kedaluwarsa",
"Time": "Waktu",
"Data": "Data",
"1_Period___1_Month__Expires_the_20th_of_each_month": "1 Periode = 1 Bulan, Berakhir pada tanggal 20 setiap bulannya",
"Expired_Date": "Tanggal kadaluarsa",
"Expired_Action": "Tindakan Kedaluwarsa",
"Optional": "Opsional",
"Expired_Internet_Plan": "Paket Internet Kedaluwarsa",
"When_Expired__customer_will_be_move_to_selected_internet_plan": "Ketika Expired, pelanggan akan dipindahkan ke paket internet yang dipilih",
"Period": "Periode",
"Rate": "Kecepatan",
"Burst": "Meletus"
}

View File

@ -389,5 +389,7 @@
"Maintenance_Mode": "Bak\u0131m Modu",
"Logs": "K\u00fct\u00fckler",
"Language_Editor": "Dil Edit\u00f6r\u00fc",
"Change_title_in_user_Plan_order": "Kullan\u0131c\u0131 Plan\u0131 s\u0131ras\u0131ndaki ba\u015fl\u0131\u011f\u0131 de\u011fi\u015ftir"
"Change_title_in_user_Plan_order": "Kullan\u0131c\u0131 Plan\u0131 s\u0131ras\u0131ndaki ba\u015fl\u0131\u011f\u0131 de\u011fi\u015ftir",
"Local_IP": "Yerel IP",
"Prev": "\u00d6nceki"
}