diff --git a/system/autoload/User.php b/system/autoload/User.php index d1e0b7ff..54aa8fe8 100644 --- a/system/autoload/User.php +++ b/system/autoload/User.php @@ -26,6 +26,15 @@ class User return 0; } + public static function getTawkToHash($email) + { + global $config; + if (!empty($config['tawkto_api_key']) && !Empty($email)) { + return hash_hmac('sha256', $email, $config['tawkto_api_key']); + } + return ''; + } + public static function getBills($id = 0) { if (!$id) { diff --git a/system/lan/indonesia.json b/system/lan/indonesia.json index b8249a3a..05c249f2 100644 --- a/system/lan/indonesia.json +++ b/system/lan/indonesia.json @@ -845,5 +845,6 @@ "Enable_CSRF_Validation": "Aktifkan Validasi CSRF", "Cross_site_request_forgery": "Pemalsuan permintaan lintas situs", "Forgot_Password": "Lupa Kata Sandi", - "Validity_Periode": "Periode Validitas" + "Validity_Periode": "Periode Validitas", + "Transaction_History_List": "Daftar Riwayat Transaksi" } \ No newline at end of file diff --git a/ui/ui/app-settings.tpl b/ui/ui/app-settings.tpl index 7029efd2..ca4c213f 100644 --- a/ui/ui/app-settings.tpl +++ b/ui/ui/app-settings.tpl @@ -105,9 +105,7 @@ placeholder="{Lang::T('Cash')}, {Lang::T('Bank Transfer')}">

- {Lang::T('This used for admin to select payment in recharge, using comma for - every new - options')} + {Lang::T('This used for admin to select payment in recharge, using comma for every new options')}

@@ -844,6 +842,13 @@

{Lang::T('From Direct Chat Link.')}

+
+ +
+ +
+

/ip hotspot walled-garden
add dst-host=tawk.to
diff --git a/ui/ui/customer/footer.tpl b/ui/ui/customer/footer.tpl index 73f62e33..8f4b48ca 100644 --- a/ui/ui/customer/footer.tpl +++ b/ui/ui/customer/footer.tpl @@ -59,31 +59,23 @@ var isLoggedIn = false; var Tawk_API = { onLoad: function() { - if (!isLoggedIn) { - isLoggedIn = true; - window.Tawk_API.login({ - name: '{$_user['fullname']}', - email: '{$_user['email']}', - userId: '{$_user['id']}' - }, function(error) { - //do something if there's an error - }); - } - Tawk_API.setAttributes({ - 'id' : '{$_user['id']}', - 'username' : '{$_user['username']}', - 'service_type' : '{$_user['service_type']}', - 'balance' : '{$_user['balance']}', - 'account_type' : '{$_user['account_type']}', - 'phone' : '{$_user['phonenumber']}' - }, function(error) {}); + Tawk_API.setAttributes({ + 'username' : '{$_user['username']}', + 'service' : '{$_user['service_type']}', + 'balance' : '{$_user['balance']}', + 'account' : '{$_user['account_type']}', + 'phone' : '{$_user['phonenumber']}' + }, function(error) { + console.log(error) + }); + } }; var Tawk_LoadStart = new Date(); Tawk_API.visitor = { - name : '{$_user['fullname']}', - email : '{$_user['email']}', - userId: '{$_user['id']}' + name: '{$_user['fullname']}', + email: '{$_user['email']}', + phone: '{$_user['phonenumber']}' }; (function() { var s1 = document.createElement("script"), diff --git a/version.json b/version.json index 39464224..2e87ce2e 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "2024.11.4" + "version": "2024.11.5" } \ No newline at end of file