forked from kevinowino869/mitrobill
code
to code
This commit is contained in:
@ -111,7 +111,7 @@ switch ($do) {
|
||||
_alert(Lang::T('Internet Plan Expired'), 'danger', "login");
|
||||
}
|
||||
} else {
|
||||
$v = ORM::for_table('tbl_voucher')->whereRaw("BINARY `code` = '$voucher'")->find_one();
|
||||
$v = ORM::for_table('tbl_voucher')->whereRaw("BINARY code = '$voucher'")->find_one();
|
||||
if (!$v) {
|
||||
_alert(Lang::T('Voucher invalid'), 'danger', "login");
|
||||
}
|
||||
@ -168,7 +168,7 @@ switch ($do) {
|
||||
} else {
|
||||
$voucher = Text::alphanumeric(_post('voucher'), "-_.,");
|
||||
$username = _post('username');
|
||||
$v1 = ORM::for_table('tbl_voucher')->whereRaw("BINARY `code` = '$voucher'")->find_one();
|
||||
$v1 = ORM::for_table('tbl_voucher')->whereRaw("BINARY code = '$voucher'")->find_one();
|
||||
if ($v1) {
|
||||
// voucher exists, check customer exists or not
|
||||
$user = ORM::for_table('tbl_customers')->where('username', $username)->find_one();
|
||||
|
@ -760,7 +760,7 @@ switch ($action) {
|
||||
}
|
||||
$code = Text::alphanumeric(_post('code'), "-_.,");
|
||||
$user = ORM::for_table('tbl_customers')->where('id', _post('id_customer'))->find_one();
|
||||
$v1 = ORM::for_table('tbl_voucher')->whereRaw("BINARY `code` = '$code'")->where('status', 0)->find_one();
|
||||
$v1 = ORM::for_table('tbl_voucher')->whereRaw("BINARY code = '$code'")->where('status', 0)->find_one();
|
||||
|
||||
run_hook('refill_customer'); #HOOK
|
||||
if ($v1) {
|
||||
|
@ -22,7 +22,7 @@ switch ($action) {
|
||||
|
||||
case 'activation-post':
|
||||
$code = alphanumeric(_post('code'), "-_.,");
|
||||
$v1 = ORM::for_table('tbl_voucher')->whereRaw("BINARY `code` = '$code'")->where('status', 0)->find_one();
|
||||
$v1 = ORM::for_table('tbl_voucher')->whereRaw("BINARY code = '$code'")->where('status', 0)->find_one();
|
||||
run_hook('customer_activate_voucher'); #HOOK
|
||||
if ($v1) {
|
||||
if (Package::rechargeUser($user['id'], $v1['routers'], $v1['id_plan'], "Voucher", $code)) {
|
||||
|
Reference in New Issue
Block a user