mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-18 15:50:50 +08:00
tooltip show user ip
This commit is contained in:
@@ -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' => '',
|
||||
|
||||
Reference in New Issue
Block a user