Code cleaning.

This commit is contained in:
Igor Barkov (iwork)
2020-06-23 11:49:49 +03:00
parent b4ba7e5af2
commit ad895265e0
4 changed files with 221 additions and 128 deletions

View File

@@ -7,8 +7,8 @@ foreach ($_POST as $key => $val) { //Проверка всех значений
}
$username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_SPECIAL_CHARS);
$password = filter_input(INPUT_POST, 'password');
$battle = filter_input(INPUT_COOKIE, 'battle');
$password = $_POST['password'] ?? '';
$battle = $_COOKIE['battle'] ?? '';
$error = "";
if ($username && $password) {
@@ -40,7 +40,6 @@ if ($username && $password) {
}
db::c()->query('UPDATE `users` SET `sid` = "?s", `enter_game` = ?i WHERE `id` = ?i', session_id(), 1, $data['id']);
$_SESSION['sid'] = session_id();
$sms = db::c()->query('SELECT * FROM `telegraph` WHERE `receiver` = ?i', $data['id']);
while ($res = $sms->fetch_assoc()) {