First attempt (#331)

This commit is contained in:
Slawomir Boczek
2025-09-28 19:00:51 +02:00
committed by GitHub
parent c898fe25ef
commit f54b1bdd2a

View File

@@ -669,12 +669,18 @@ else if (isset($_REQUEST['search'])) {
<div class="col-12 col-sm-12 col-lg-6"> <div class="col-12 col-sm-12 col-lg-6">
<label for="lastip" class="control-label">Last IP:</label> <label for="lastip" class="control-label">Last IP:</label>
<input type="text" class="form-control" id="lastip" name="lastip" autocomplete="off" maxlength="10" value="<?php <input type="text" class="form-control" id="lastip" name="lastip" autocomplete="off" maxlength="10" value="<?php
if (strlen($player->getLastIP()) > 11) { $lastIPColumnInfo = $db->getColumnInfo('players', 'lastip');
if ($lastIPColumnInfo && is_array($lastIPColumnInfo)) {
if (str_contains($lastIPColumnInfo['type'], 'varbinary')) {
echo inet_ntop($player->getLastIP()); echo inet_ntop($player->getLastIP());
} }
else { else {
echo longToIp($player->getLastIP()); echo longToIp($player->getLastIP());
} }
}
else {
echo 'Error';
}
?>" readonly/> ?>" readonly/>
</div> </div>
</div> </div>