Отказ от алиаса 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
+4 -4
View File
@@ -9,7 +9,7 @@ $user = new User($_SESSION['uid']);
if ($user->room == 403) {
include "startpodzemel.php";
if ($user->battle != 0) { header('location: fbattle.php'); die(); }
if ($user->battle != 0) { header('location: fbattle.php'); exit; }
if($_GET['act']=="cexit")
{
@@ -486,12 +486,12 @@ if($mesto == '9'){$mesto = '09';}
if(isset($_GET['left'])){
mysql_query("UPDATE `labirint` SET `vector` = '".mysql_escape_string($_GET['left'])."' WHERE `user_id` = '{$_SESSION['uid']}' ;");
//header('Location:canalizaciya.php');
die("<script>location.href='canalizaciya.php';</script>");
exit("<script>location.href='canalizaciya.php';</script>");
}
if(isset($_GET['right'])){
mysql_query("UPDATE `labirint` SET `vector` = '".mysql_escape_string($_GET['right'])."' WHERE `user_id` = '{$_SESSION['uid']}' ;");
//header('Location:canalizaciya.php');
die("<script>location.href='canalizaciya.php';</script>");
exit("<script>location.href='canalizaciya.php';</script>");
}
$fer = mysql_query("SELECT n".mysql_escape_string($rhar[$mesto][$_GET['path']])." FROM podzem3 WHERE glava='".$mir['glava']."' and name='".$mir['name']."'");
@@ -518,7 +518,7 @@ if($_GET['path']==3) {$nav='l=l-12';}
mysql_query("UPDATE `labirint` SET `location` = '".mysql_escape_string($rhar[$mesto][$_GET['path']])."',`visit_time`='$vrem',$nav WHERE `user_id` = '{$_SESSION['uid']}' ;");
$_SESSION['time'] = time()+1;
//header('Location:canalizaciya.php');
die("<script>location.href='canalizaciya.php';</script>");
exit("<script>location.href='canalizaciya.php';</script>");
}
}