fix Tawk.to
This commit is contained in:
parent
b28b40280f
commit
7f35e7fb68
@ -26,6 +26,15 @@ class User
|
|||||||
return 0;
|
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)
|
public static function getBills($id = 0)
|
||||||
{
|
{
|
||||||
if (!$id) {
|
if (!$id) {
|
||||||
|
@ -845,5 +845,6 @@
|
|||||||
"Enable_CSRF_Validation": "Aktifkan Validasi CSRF",
|
"Enable_CSRF_Validation": "Aktifkan Validasi CSRF",
|
||||||
"Cross_site_request_forgery": "Pemalsuan permintaan lintas situs",
|
"Cross_site_request_forgery": "Pemalsuan permintaan lintas situs",
|
||||||
"Forgot_Password": "Lupa Kata Sandi",
|
"Forgot_Password": "Lupa Kata Sandi",
|
||||||
"Validity_Periode": "Periode Validitas"
|
"Validity_Periode": "Periode Validitas",
|
||||||
|
"Transaction_History_List": "Daftar Riwayat Transaksi"
|
||||||
}
|
}
|
@ -105,9 +105,7 @@
|
|||||||
placeholder="{Lang::T('Cash')}, {Lang::T('Bank Transfer')}">
|
placeholder="{Lang::T('Cash')}, {Lang::T('Bank Transfer')}">
|
||||||
</div>
|
</div>
|
||||||
<p class="help-block col-md-4">
|
<p class="help-block col-md-4">
|
||||||
{Lang::T('This used for admin to select payment in recharge, using comma for
|
{Lang::T('This used for admin to select payment in recharge, using comma for every new options')}
|
||||||
every new
|
|
||||||
options')}
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -844,6 +842,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<p class="help-block col-md-4">{Lang::T('From Direct Chat Link.')}</p>
|
<p class="help-block col-md-4">{Lang::T('From Direct Chat Link.')}</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-md-2 control-label">Tawk.to Javascript API key</label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<input type="text" class="form-control" id="tawkto_api_key" name="tawkto_api_key" value="{$_c['tawkto_api_key']}"
|
||||||
|
placeholder="39e52264cxxxxxxxxxxxxxdd078af5342e8">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<label class="col-md-2"></label>
|
<label class="col-md-2"></label>
|
||||||
<p class="col-md-6 help-block">/ip hotspot walled-garden<br>
|
<p class="col-md-6 help-block">/ip hotspot walled-garden<br>
|
||||||
add dst-host=tawk.to<br>
|
add dst-host=tawk.to<br>
|
||||||
|
@ -59,31 +59,23 @@
|
|||||||
var isLoggedIn = false;
|
var isLoggedIn = false;
|
||||||
var Tawk_API = {
|
var Tawk_API = {
|
||||||
onLoad: function() {
|
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({
|
Tawk_API.setAttributes({
|
||||||
'id' : '{$_user['id']}',
|
|
||||||
'username' : '{$_user['username']}',
|
'username' : '{$_user['username']}',
|
||||||
'service_type' : '{$_user['service_type']}',
|
'service' : '{$_user['service_type']}',
|
||||||
'balance' : '{$_user['balance']}',
|
'balance' : '{$_user['balance']}',
|
||||||
'account_type' : '{$_user['account_type']}',
|
'account' : '{$_user['account_type']}',
|
||||||
'phone' : '{$_user['phonenumber']}'
|
'phone' : '{$_user['phonenumber']}'
|
||||||
}, function(error) {});
|
}, function(error) {
|
||||||
|
console.log(error)
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var Tawk_LoadStart = new Date();
|
var Tawk_LoadStart = new Date();
|
||||||
Tawk_API.visitor = {
|
Tawk_API.visitor = {
|
||||||
name : '{$_user['fullname']}',
|
name: '{$_user['fullname']}',
|
||||||
email : '{$_user['email']}',
|
email: '{$_user['email']}',
|
||||||
userId: '{$_user['id']}'
|
phone: '{$_user['phonenumber']}'
|
||||||
};
|
};
|
||||||
(function() {
|
(function() {
|
||||||
var s1 = document.createElement("script"),
|
var s1 = document.createElement("script"),
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"version": "2024.11.4"
|
"version": "2024.11.5"
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user