diff --git a/enter.php b/enter.php index 327d786..be2622a 100644 --- a/enter.php +++ b/enter.php @@ -39,7 +39,7 @@ if ($username && $password) { if (isset($onl['user_id'])) { db::c()->query('UPDATE online SET date = ?i WHERE user_id = "?s"', time(), $user_query['id']); } else { - db::c()->query('INSERT INTO online (user_id, date, room) VALUES (?i, ?i, ?i)', $user_query['id'], time(), $user_query['room']); + db::c()->query('INSERT INTO online (user_id, date, room, real_time) VALUES (?i, ?i, ?i, ?i)', $user_query['id'], time(), $user_query['room'], time()); } db::c()->query('UPDATE `users` SET `session_id` = "?s", `enter_game` = ?i WHERE `id` = ?i', session_id(), 1, $user_query['id']); diff --git a/register.php b/register.php index e0907f7..b427880 100644 --- a/register.php +++ b/register.php @@ -1,12 +1,13 @@ 0) { $error = "В системе уже есть такие данные!"; } else { - db::c()->query('INSERT INTO `users` (`login`,`pass`,`email`,`borndate`,`ip`,`sid`) + db::c()->query('INSERT INTO users (login,pass,email,borndate,ip,session_id) VALUES ("?s", "?s", "?s", "?s", "?s", "?s")', $login, $password, $email, $birthday, $ip, session_id()); $nid = db::c()->getLastInsertId(); - db::c()->query('INSERT INTO `online` (`user_id`, `date`, `room`) VALUES (?i, ?i, ?i)', $nid, time(), 1); + db::c()->query('INSERT INTO `online` (user_id, date, room, real_time) VALUES (?i, ?i, ?i, ?i)', $nid, time(), 1, time()); db::c()->query('INSERT INTO `bank` (`user_id`) VALUES (?i)', $nid, 5); setcookie(GAMEDOMAIN, $nid, time() + 3600); setcookie("battle", time()); @@ -34,19 +35,20 @@ if ($hreject) { } Template::header('Регистрация персонажа'); ?> - ← на главную - -
+ ← на главную + +