Выброс ошибок.

This commit is contained in:
Igor Barkov (iwork) 2020-08-27 15:45:53 +03:00
parent 618e51b179
commit af20137f99
1 changed files with 4 additions and 7 deletions

View File

@ -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('Вы не ввели логин или пароль!');
}
?>