code to code

This commit is contained in:
iBNu Maksum
2024-10-15 16:10:08 +07:00
parent 70bcff7679
commit 064e4c80ed
5 changed files with 55 additions and 7 deletions

View File

@ -109,7 +109,7 @@ try {
}
if ($username == $password) {
$username = Text::alphanumeric($username, "-_.,");
$d = ORM::for_table('tbl_voucher')->whereRaw("BINARY `code` = '$username'")->find_one();
$d = ORM::for_table('tbl_voucher')->whereRaw("BINARY code = '$username'")->find_one();
} else {
$d = ORM::for_table('tbl_customers')->whereRaw("BINARY username = '$username'")->find_one();
if ($d['password'] != $password) {
@ -226,7 +226,7 @@ try {
} else {
if ($isVoucher) {
$username = Text::alphanumeric($username, "-_.,");
$v = ORM::for_table('tbl_voucher')->whereRaw("BINARY `code` = '$username'")->where('routers', 'radius')->find_one();
$v = ORM::for_table('tbl_voucher')->whereRaw("BINARY code = '$username'")->where('routers', 'radius')->find_one();
if ($v) {
if ($v['status'] == 0) {
if (Package::rechargeUser(0, $v['routers'], $v['id_plan'], "Voucher", $username)) {