Отказ от алиаса 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
+5 -5
View File
@@ -11,7 +11,7 @@ if(isset($q2['id'])) {
$q1 = mysql_fetch_array(mysql_query('SELECT * FROM `qst` WHERE `id` = "'.$q2['qid'].'" LIMIT 1'));
}
if($user['battle'] > '0'){
die("<script>location.href='fbattle.php';</script>");
exit("<script>location.href='fbattle.php';</script>");
}
$vipUsers = array(
@@ -44,7 +44,7 @@ function money_add($sum) {
mysql_query('UPDATE `users` SET `money` = "'.$user['money'].'" WHERE `id` = "'.$user['id'].'" LIMIT 1');
}
if($user['room'] == 1052) {
if($user->room == 1052) {
if($user['id'] == 10022) {
$lab = mysql_fetch_array(mysql_query('SELECT * FROM `laba_now` WHERE `id` = "'.$user['laba'].'" LIMIT 1'));
$map = mysql_fetch_array(mysql_query('SELECT `id`,`data`,`update` FROM `laba_map` WHERE `id` = "'.$user['laba'].'" LIMIT 1'));
@@ -211,7 +211,7 @@ if($user['room'] == 1052) {
$bot_ids = rtrim($bot_ids, ';');
$where = rtrim($where, ' OR');
if(!mysql_query("INSERT INTO `battle` (`teams`, `timeout`, `type`, `status`, `t1`, `t2`, `to1`, `to2`, `x`, `y`) VALUES ('".serialize($teams)."', '3', '1', '0', '".$user['id']."', '".$bot_ids."', '".time()."', '".time()."', '".$user['x']."', '".$user['y']."')")) { die('Error #2'); }
if(!mysql_query("INSERT INTO `battle` (`teams`, `timeout`, `type`, `status`, `t1`, `t2`, `to1`, `to2`, `x`, `y`) VALUES ('".serialize($teams)."', '3', '1', '0', '".$user['id']."', '".$bot_ids."', '".time()."', '".time()."', '".$user['x']."', '".$user['y']."')")) { exit('Error #2'); }
$id = mysql_insert_id();
$bts = explode(';', $bot_ids);
@@ -230,7 +230,7 @@ if($user['room'] == 1052) {
$rr = "<b>".Nick::id($user['id'])->full(1)."</b> и <b>".$nicks."</b>";
}
if(!mysql_query("UPDATE `bots` SET `battle` = {$id} WHERE ".$who."")) { die('Error #1'.$who); }
if(!mysql_query("UPDATE `bots` SET `battle` = {$id} WHERE ".$who."")) { exit('Error #1'.$who); }
mysql_query("UPDATE `users` SET `battle` = {$id}, `zayavka` = 0 WHERE `id`= {$user['id']} LIMIT 1");
addlog($id, "Часы показывали <span class=date>".date("Y.m.d H.i")."</span>, когда ".$rr." бросили вызов друг другу.<BR>");
} else {
@@ -250,7 +250,7 @@ if($user['room'] == 1052) {
mysql_query("UPDATE `users` SET `battle` = '".$bd['id']."', `zayavka` = 0 WHERE `id` = '".$user['id']."' LIMIT 1");
header("Location: fbattle.php");
}
die("<script>location.href='fbattle.php';</script>");
exit("<script>location.href='fbattle.php';</script>");
}
} elseif($mitm['type'] == 1) {
if($mitm['use'] == 0) {