NEW Can test a geoip conversion from the geoip setup page
This commit is contained in:
parent
3c96c42f32
commit
381ecbb1fb
@ -163,6 +163,9 @@ $textoshow = str_replace('{s1}', '<a href="'.$url2.'" target="_blank" rel="noope
|
||||
print $textoshow;
|
||||
|
||||
if ($geoip) {
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
|
||||
print '<br><br>';
|
||||
print '<br><span class="opacitymedium">'.$langs->trans("TestGeoIPResult", $ip).':</span>';
|
||||
|
||||
@ -214,6 +217,20 @@ if ($geoip) {
|
||||
}
|
||||
}
|
||||
|
||||
$ip = GETPOST("iptotest");
|
||||
print '<br><input type="text class="width100" name="iptotest" id="iptotest" placeholder="'.dol_escape_htmltag($langs->trans("EnterAnIP")).'" value="'.$ip.'">';
|
||||
print '<input type="submit" class="width40 button small smallpaddingimp" value=" -> ">';
|
||||
if ($ip) {
|
||||
$result = dol_print_ip($ip, 1);
|
||||
if ($result) {
|
||||
print $result;
|
||||
} else {
|
||||
print $langs->trans("Error");
|
||||
}
|
||||
}
|
||||
|
||||
print '</form>';
|
||||
|
||||
$geoip->close();
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user