tooltip show user ip

This commit is contained in:
xiaomlove
2021-06-07 17:16:43 +08:00
parent 01263d6a76
commit bec4cc01a0

View File

@@ -1646,7 +1646,7 @@ function get_ip_location($ip)
foreach($ret AS $arr)
{
$location = array($arr["name"], "");
$location = array($arr["name"], $lang_functions['text_user_ip'] . ": " . $ip);
break;
// if(in_ip_range(false, $ip, $arr["start_ip"], $arr["end_ip"]))
// {
@@ -5035,6 +5035,7 @@ function get_ip_location_from_geoip($ip)
$locale = $langMap[$lang] ?? $lang;
$countryName = $record->country->names[$locale] ?? $record->country->names['en'];
$cityName = $record->city->names[$locale] ?? $record->city->names['en'];
do_log("ip: $ip, locale: $locale, city: $cityName, country: $countryName");
return [
'name' => sprintf('%s·%s', $cityName, $countryName),
'location_main' => '',