From bec4cc01a05ea0aef8ce7ee9ceeb5fc77ea6be7e Mon Sep 17 00:00:00 2001 From: xiaomlove <353856593@qq.com> Date: Mon, 7 Jun 2021 17:16:43 +0800 Subject: [PATCH] tooltip show user ip --- include/functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/functions.php b/include/functions.php index 50e6fa96..b8605fce 100644 --- a/include/functions.php +++ b/include/functions.php @@ -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' => '',