From 381ecbb1fbb1fe7818436d7d55e7e6da85c874cd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 6 Mar 2023 10:49:38 +0100 Subject: [PATCH] NEW Can test a geoip conversion from the geoip setup page --- htdocs/admin/geoipmaxmind.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/htdocs/admin/geoipmaxmind.php b/htdocs/admin/geoipmaxmind.php index 8f76f9a7b2b..78fde3d095e 100644 --- a/htdocs/admin/geoipmaxmind.php +++ b/htdocs/admin/geoipmaxmind.php @@ -163,6 +163,9 @@ $textoshow = str_replace('{s1}', ''; + print ''; + print '

'; print '
'.$langs->trans("TestGeoIPResult", $ip).':'; @@ -214,6 +217,20 @@ if ($geoip) { } } + $ip = GETPOST("iptotest"); + print '
'; + print ''; + if ($ip) { + $result = dol_print_ip($ip, 1); + if ($result) { + print $result; + } else { + print $langs->trans("Error"); + } + } + + print ''; + $geoip->close(); }