HTTP_X_REAL_IP => REMOTE_ADDR

This commit is contained in:
lopar 2021-03-10 23:26:53 +02:00
parent 8b42d96163
commit eacde76543
2 changed files with 2 additions and 2 deletions

View File

@ -76,7 +76,7 @@ class Quests
if (db::c()->getAffectedRows()) {
$tms = (time() + 60 * 60 * $pl['time']);
db::c()->query('INSERT INTO `actions` (`uid`, `time`, `city`, `room`, `vars`, `ip`, `vals`, `val`) VALUES (?i,?i,"?s",?i,"?s","?s","?s","?s")',
$uid, time(), 'capitalcity', 0, 'start_quest' . $id, $_SERVER['HTTP_X_REAL_IP'], 'go', $tms);
$uid, time(), 'capitalcity', 0, 'start_quest' . $id, $_SERVER['REMOTE_ADDR'], 'go', $tms);
return 'Вы успешно получили задание "' . $pl['name'] . '"';
} else {
return 'Не удалось получить данное задание ...';

View File

@ -444,7 +444,7 @@ HTML;
function addActions($time, $vars, $vls, $uid)
{
db::c()->query('LOCK TABLES `actions` WRITE');
$ins = db::c()->query('INSERT INTO `actions` (`uid`,`time`,`city`,`room`,`vars`,`ip`,`vals`) VALUES (?i, ?i, "?s", ?i, "?s", "?s", "?s")', $uid, $time, "capitalcity", 0, $vars, $_SERVER['HTTP_X_REAL_IP'], $vls);
$ins = db::c()->query('INSERT INTO `actions` (`uid`,`time`,`city`,`room`,`vars`,`ip`,`vals`) VALUES (?i, ?i, "?s", ?i, "?s", "?s", "?s")', $uid, $time, "capitalcity", 0, $vars, $_SERVER['REMOTE_ADDR'], $vls);
db::c()->query('UNLOCK TABLES');
return $ins;
}