diff --git a/enter.php b/enter.php index 7e214c4..ab175f7 100644 --- a/enter.php +++ b/enter.php @@ -32,7 +32,7 @@ if ($username && $password) { setcookie("hashcode", md5($data['id'] . $data["pass"] . $data["login"]), time() + 43200, "/", GAMEDOMAIN); $_SESSION['sid'] = session_id(); - $onl = db::c()->query('SELECT `id` FROM `online` WHERE `id` = "?s" LIMIT 1', $data['id'])->fetch_assoc(); + $onl = db::c()->query('SELECT `id` FROM `online` WHERE `id` = "?s"', $data['id'])->fetch_assoc(); if (isset($onl['id'])) { db::c()->query('UPDATE `online` SET `date` = ?i WHERE `id` = "?s"', time(), $data['id']); } else { @@ -42,10 +42,6 @@ if ($username && $password) { db::c()->query('UPDATE `users` SET `sid` = "?s", `enter_game` = ?i WHERE `id` = ?i LIMIT 1', session_id(), 1, $data['id']); $_SESSION['sid'] = session_id(); - //TODO Лог IP адресов планировался удаляться из проекта. - $ip = $_SERVER['REMOTE_ADDR']; - db::c()->query('INSERT INTO `iplog` (`owner`, `ip`, `date`) VALUES (?i, "?s", ?i)', $data['id'], $ip, time()); - $sms = db::c()->query('SELECT * FROM `telegraph` WHERE `receiver` = ?i', $data['id']); while ($res = $sms->fetch_assoc()) { db::c()->query('INSERT INTO `chat` (`touid`, `msg`, `type`) VALUES (?i, "?s", "?s")', $res['receiver'], $res['text'], 'sms'); @@ -68,6 +64,6 @@ if ($username && $password) { ← на главную
- endif; ?> +