diff --git a/radius.php b/radius.php index 7c9c113e..399f814b 100644 --- a/radius.php +++ b/radius.php @@ -67,8 +67,7 @@ try { $v = ORM::for_table('tbl_voucher')->where('code', $username)->where('routers', 'radius')->find_one(); if ($v) { if ($v['status'] == 0) { - // voucher activation - if (Package::rechargeUser(0, $v['routers'], $v1['id_plan'], "Voucher", $username)) { + if (Package::rechargeUser(0, $v['routers'], $v['id_plan'], "Voucher", $username)) { $v->status = "1"; $v->save(); $tur = ORM::for_table('tbl_user_recharges')->where('username', $username)->find_one(); @@ -90,6 +89,7 @@ try { show_radius_result(['Reply-Message' => 'Internet Plan Expired..'], 401); } } + die("hehe"); break; case 'accounting': $username = _req('username'); @@ -126,6 +126,7 @@ try { $e->getTraceAsString(), $config['telegram_topik_error'] ); + show_radius_result(['Reply-Message' => 'Command Failed : '.$action], 401); } catch (Exception $e) { Message::sendTelegram( "Sistem Error.\n" . @@ -133,8 +134,9 @@ try { $e->getTraceAsString(), $config['telegram_topik_error'] ); + show_radius_result(['Reply-Message' => 'Command Failed : '.$action], 401); } -show_radius_result(['Reply-Message' => 'Invalid Command'], 401); +show_radius_result(['Reply-Message' => 'Invalid Command : '.$action], 401); function process_radiust_rest($tur, $code) { diff --git a/system/autoload/Package.php b/system/autoload/Package.php index 6f561e59..a04d5e6d 100644 --- a/system/autoload/Package.php +++ b/system/autoload/Package.php @@ -27,11 +27,12 @@ class Package $time = date("H:i:s"); $inv = ""; $isVoucher = false; + $c = []; if ($id_customer == '' or $router_name == '' or $plan_id == '') { return false; } - if($channel == 'Voucher' && $id_customer = 0){ + if(trim($gateway) == 'Voucher' && $id_customer == 0){ $isVoucher = true; } diff --git a/system/devices/Dummy.php b/system/devices/Dummy.php index e2c76b88..e4db1519 100644 --- a/system/devices/Dummy.php +++ b/system/devices/Dummy.php @@ -11,7 +11,7 @@ class Dummy { 'author' => 'ibnu maksum', 'url' => [ 'Github' => 'https://github.com/hotspotbilling/phpnuxbill/', - 'Telegram' => 'https://t.me/ibnux', + 'Telegram' => 'https://t.me/phpnuxbill', 'Donate' => 'https://paypal.me/ibnux' ] ]; diff --git a/system/devices/MikrotikHotspot.php b/system/devices/MikrotikHotspot.php index 8ebb79b4..b4b44b35 100644 --- a/system/devices/MikrotikHotspot.php +++ b/system/devices/MikrotikHotspot.php @@ -22,7 +22,7 @@ class MikrotikHotspot 'author' => 'ibnux', 'url' => [ 'Github' => 'https://github.com/hotspotbilling/phpnuxbill/', - 'Telegram' => 'https://t.me/ibnux', + 'Telegram' => 'https://t.me/phpnuxbill', 'Donate' => 'https://paypal.me/ibnux' ] ]; diff --git a/system/devices/MikrotikPppoe.php b/system/devices/MikrotikPppoe.php index 01010dfc..9424a5c2 100644 --- a/system/devices/MikrotikPppoe.php +++ b/system/devices/MikrotikPppoe.php @@ -21,7 +21,7 @@ class MikrotikPppoe 'author' => 'ibnux', 'url' => [ 'Github' => 'https://github.com/hotspotbilling/phpnuxbill/', - 'Telegram' => 'https://t.me/ibnux', + 'Telegram' => 'https://t.me/phpnuxbill', 'Donate' => 'https://paypal.me/ibnux' ] ]; diff --git a/system/devices/Radius.php b/system/devices/Radius.php index af09b6fa..60e4d080 100644 --- a/system/devices/Radius.php +++ b/system/devices/Radius.php @@ -20,7 +20,7 @@ class Radius 'author' => 'ibnux', 'url' => [ 'Github' => 'https://github.com/hotspotbilling/phpnuxbill/', - 'Telegram' => 'https://t.me/ibnux', + 'Telegram' => 'https://t.me/phpnuxbill', 'Donate' => 'https://paypal.me/ibnux' ] ]; diff --git a/system/devices/RadiusRest.php b/system/devices/RadiusRest.php index a8ecb7d6..0dc34eae 100644 --- a/system/devices/RadiusRest.php +++ b/system/devices/RadiusRest.php @@ -11,7 +11,7 @@ class RadiusRest { 'author' => 'ibnu maksum', 'url' => [ 'Wiki Tutorial' => 'https://github.com/hotspotbilling/phpnuxbill/wiki/FreeRadius-Rest', - 'Telegram' => 'https://t.me/ibnux', + 'Telegram' => 'https://t.me/phpnuxbill', 'Donate' => 'https://paypal.me/ibnux' ] ]; diff --git a/system/lan/indonesia.json b/system/lan/indonesia.json index ea4689a7..5e1b34f1 100644 --- a/system/lan/indonesia.json +++ b/system/lan/indonesia.json @@ -562,5 +562,6 @@ "Phone_number_updated_successfully": "Nomor telepon berhasil diperbarui", "You_cannot_use_your_current_phone_number": "Anda tidak dapat menggunakan nomor telepon Anda saat ini", "Devices": "Perangkat", - "Voucher_Prefix": "Awalan Voucher" + "Voucher_Prefix": "Awalan Voucher", + "This_account_status": "Status akun ini" } \ No newline at end of file diff --git a/ui/ui/hotspot-edit.tpl b/ui/ui/hotspot-edit.tpl index d5332f1d..75de4635 100644 --- a/ui/ui/hotspot-edit.tpl +++ b/ui/ui/hotspot-edit.tpl @@ -248,20 +248,24 @@ -
-
-
on-login / on-up
-
- + {if !$d['is_radius']} +
+
+
on-login / on-up
+
+ +
+
+
+
on-logout / on-down
+
+ +
-
-
on-logout / on-down
-
- -
-
-
+ {/if}
@@ -306,11 +310,17 @@ {/literal} {/if} - - + + - - + + + +