mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2024-11-10 09:12:51 +08:00
Update radius.php
This commit is contained in:
parent
625254852d
commit
fa5a42fc0c
1 changed files with 2 additions and 2 deletions
|
@ -233,7 +233,7 @@ try {
|
|||
$v->status = "1";
|
||||
$v->used_date = date('Y-m-d H:i:s');
|
||||
$v->save();
|
||||
$tur = ORM::for_table('tbl_user_recharges')->whereRaw("BINARY `code` = '$username'")->find_one();
|
||||
$tur = ORM::for_table('tbl_user_recharges')->whereRaw("BINARY `username` = '$username'")->find_one();
|
||||
if ($tur) {
|
||||
process_radiust_rest($tur, $code);
|
||||
} else {
|
||||
|
@ -324,7 +324,7 @@ try {
|
|||
$d->dateAdded = date('Y-m-d H:i:s');
|
||||
$d->save();
|
||||
if ($d->acctstatustype == 'Start') {
|
||||
$tur = ORM::for_table('tbl_user_recharges')->whereRaw("BINARY `code` = '$username'")->where('status', 'on')->where('routers', 'radius')->find_one();
|
||||
$tur = ORM::for_table('tbl_user_recharges')->whereRaw("BINARY `username` = '$username'")->where('status', 'on')->where('routers', 'radius')->find_one();
|
||||
$plan = ORM::for_table('tbl_plans')->where('id', $tur['plan_id'])->find_one();
|
||||
if ($plan['limit_type'] == "Data_Limit" || $plan['limit_type'] == "Both_Limit") {
|
||||
$totalUsage = $d['acctOutputOctets'] + $d['acctInputOctets'];
|
||||
|
|
Loading…
Reference in a new issue