From af20137f99dcc66fa4d1c34bce78400d5cf3d0bc Mon Sep 17 00:00:00 2001 From: "Igor Barkov (iwork)" Date: Thu, 27 Aug 2020 15:45:53 +0300 Subject: [PATCH] =?UTF-8?q?=D0=92=D1=8B=D0=B1=D1=80=D0=BE=D1=81=20=D0=BE?= =?UTF-8?q?=D1=88=D0=B8=D0=B1=D0=BE=D0=BA.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- enter.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) 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('Вы не ввели логин или пароль!'); } ?>