diff --git a/enter.php b/enter.php index 6eee927..7f3b9d2 100644 --- a/enter.php +++ b/enter.php @@ -40,16 +40,13 @@ if ($username && $password) { } db::c()->query('UPDATE `users` SET `session_id` = "?s", `enter_game` = ?i WHERE `id` = ?i', session_id(), 1, $user_query['id']); -// DEPRECATED. NO TABLE IN DB! -// $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'); -// } -// db::c()->query('DELETE FROM `telegraph` WHERE `receiver` = ?i', $data['id']); - header("Location: fight.php"); } + } else { + throw new Exception('Неверный пароль!'); } +} else { + throw new Exception('Вы не ввели логин или пароль!'); } ?>