Отказ от алиаса 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
@@ -32,7 +32,7 @@ if ($user['battle'] > 0) {
echo "Персонаж под защитой от нападений ...";
} elseif ($owntravma['id'] && !$us['battle']) {
echo "Персонаж тяжело травмирован...";
} elseif ($user['room'] != $us['room']) {
} elseif ($user->room != $us['room']) {
echo "Персонаж в другой комнате!";
} elseif ($us['level'] < 1) {
echo "Новички находятся под защитой Мироздателя!";
@@ -81,7 +81,7 @@ if ($user['battle'] > 0) {
} else {
$ttt = 1;
}
addch("<b>" . Nick::id($user['id'])->short() . "</b> вмешался в <a href=logs.php?log=" . $id . " target=_blank>поединок »»</a>. ", $user['room']);
addch("<b>" . Nick::id($user['id'])->short() . "</b> вмешался в <a href=logs.php?log=" . $id . " target=_blank>поединок »»</a>. ", $user->room);
//mysql_query('UPDATE `logs` SET `log` = CONCAT(`log`,\'<span class=date>'.date("H:i").'</span> '.nick::id($user['id'])->short().' вмешался в поединок!<BR>\') WHERE `id` = '.$jert['battle'].'');
@@ -91,7 +91,7 @@ if ($user['battle'] > 0) {
mysql_query("UPDATE users SET `battle` =" . $jert['battle'] . ",`zayavka`=0 WHERE `id`= " . $user['id']);
header("Location:fbattle.php");
//die("<script>location.href='fbattle.php';</script>");
//exit("<script>location.href='fbattle.php';</script>");
} else {
// начинаем бой
//$bet=1;
@@ -146,7 +146,7 @@ if ($user['battle'] > 0) {
$rr = "<b>" . Nick::id($user['id'])->full(1) . "</b> и <b>" . Nick::id($jert['id'])->full(1) . "</b>";
addch("<a href=logs.php?log=" . $id . " target=_blank>Бой</a> между <B><b>" . Nick::id($user['id'])->short() . "</b> и <b>" . Nick::id($jert['id'])->short() . "</b> начался. ", $user['room']);
addch("<a href=logs.php?log=" . $id . " target=_blank>Бой</a> между <B><b>" . Nick::id($user['id'])->short() . "</b> и <b>" . Nick::id($jert['id'])->short() . "</b> начался. ", $user->room);
//mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}',"Часы показывали <span class=date>".date("Y.m.d H.i")."</span>, когда ".$rr." бросили вызов друг другу. <BR>");
@@ -154,7 +154,7 @@ if ($user['battle'] > 0) {
mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}");
header("Location:fbattle.php");
//die("<script>location.href='fbattle.php';</script>");
//exit("<script>location.href='fbattle.php';</script>");
}
} else {
echo '<font color=red>Мазохист?...</font>';