Отказ от алиаса die в пользу exit, более явная проверка на наличие сессии. Некоторые проверки входа теперь проверяют объекты, а не массив.
This commit is contained in:
+5
-5
@@ -6,12 +6,12 @@ $stat_nmto = ["1" => "в силу", "2" => "в ловкость", "3" => "в и
|
||||
$trv = "";
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
require_once "functions.php";
|
||||
if ($user->battle) {
|
||||
header('location: fbattle.php');
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<HTML>
|
||||
@@ -40,10 +40,10 @@ if ($d[0] > get_meshok()) {
|
||||
$owntravma = mysql_fetch_array(mysql_query("SELECT `type` FROM `effects` WHERE `owner` = " . (int)$_SESSION['uid'] . " AND (type=12 OR type=13 OR type=11 OR type=14 OR type=188 OR type=21 OR type=201 OR type=202);"));
|
||||
if ($owntravma['type'] == 11 or $owntravma['type'] == 12 or $owntravma['type'] == 13 or $owntravma['type'] == 14) {
|
||||
echo "<br><font color=red><b>Вы не можете воспользоваться услугами Знахаря имея травму!</b></font>";
|
||||
die();
|
||||
exit;
|
||||
} elseif ($owntravma['type'] == 188 or $owntravma['type'] == 21 or $owntravma['type'] == 201 or $owntravma['type'] == 202) {
|
||||
echo "<br><font color=red><b>Вы не можете воспользоваться услугами Знахаря находясь под действием эликсиров и эффектов!</b></font>";
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ if ($_POST['undr'] == '1') undressall((int)$_SESSION['uid']);
|
||||
$s = mysql_fetch_row(mysql_query("SELECT count(id) FROM inventory WHERE dressed!=0 AND owner=" . (int)$_SESSION['uid']));
|
||||
if ((int)$s[0] > 0) {
|
||||
echo "<form method=post>Перед входом в комнату Знахарь требует полного очищения! <input type=hidden value=1 name='undr'><input type=submit value='Раздеться'></form>";
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
|
||||
if (@(int)$_POST['move_ab'] > 0 && $user['money'] >= 32) {
|
||||
|
||||
Reference in New Issue
Block a user