Отказ от алиаса die в пользу exit, более явная проверка на наличие сессии. Некоторые проверки входа теперь проверяют объекты, а не массив.

This commit is contained in:
Igor Barkov (iwork)
2020-09-30 15:01:33 +03:00
parent 02dc4582dc
commit a08ce17a40
179 changed files with 883 additions and 582 deletions
+6 -6
View File
@@ -115,8 +115,8 @@
"1"=>"Босс глубин"
);*/
if ($user['room'] != 601) { header("Location: main.php"); die(); }
if ($user['battle'] != 0) { header('location: fbattle.php'); die(); }
if ($user->room != 601) { header("Location: main.php"); exit; }
if ($user->battle) { header('location: fbattle.php'); exit; }
if ($in_haos['status'] == 4)
{
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '600',`online`.`room` = '600' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
@@ -228,9 +228,9 @@ if($_POST['go_attack'])
$bot_count=1;
break;
};
$b_pers=mysql_fetch_array(mysql_query("SELECT * FROM users WHERE id='{$bot_id}' LIMIT 1;"));;
$bot_hp=$b_pers['maxhp'];
}
$b_pers=mysql_fetch_array(mysql_query("SELECT * FROM users WHERE id='{$bot_id}' LIMIT 1;"));
$bot_hp=$b_pers['maxhp'];
$bots=array();
$group_raw=mysql_query("SELECT * FROM `cit_haos_status` WHERE `group` = '{$in_haos['group']}' AND status='2';");
while ($gr = mysql_fetch_array($group_raw))
@@ -282,7 +282,7 @@ if($_POST['go_attack'])
foreach($group_fight as $gf) mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$gf};");
//}
die("<script>location.href='fbattle.php';</script>");
exit("<script>location.href='fbattle.php';</script>");
}
}
$group_num=mysql_num_rows(mysql_query("SELECT * FROM `cit_haos_status` WHERE `group` = '{$in_haos['group']}';"));