Отказ от алиаса 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
+7 -4
View File
@@ -11,7 +11,10 @@
$log_text="<strong><font color=#df0d0d>Пожирающее Пламя [2]</font></strong>";
$book=908;$have_book=mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `prototype`='{$book}' AND `owner`='{$user['id']}' LIMIT 1;"));
if ($_SESSION['uid'] == null) header("Location: index.php");
if ($_SESSION['uid'] == null) {
header("Location: index.php");
exit;
}
$magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;"));
$bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';"));
//mana needed
@@ -45,15 +48,15 @@ if ($user['battle'] == 0) {
case 'a':$uel='mair';break;
case 'w':$uel='mwater';break;
case 'e':$uel='mearth';break;
};
}
switch($elem)
{
case 'f':$sel='mfire';break;
case 'a':$sel='mair';break;
case 'w':$sel='mwater';break;
case 'e':$sel='mearth';break;
};
$sex_action="применил";if($user['sex']==0) $sex_action.="а";
}
$sex_action="применил";if($user['sex']==0) $sex_action.="а";
addlog($user['battle'],'<span class=date>'.date("H:i").'</span> '.Nick::id($user['id'])->short().' '.$sex_action.$targeted.' заклинание '.$log_text.'<BR>');
//mass magic