Отказ от алиаса die в пользу exit, более явная проверка на наличие сессии. Некоторые проверки входа теперь проверяют объекты, а не массив.
This commit is contained in:
@@ -11,7 +11,10 @@
|
||||
$log_text="<strong><font color=#df0d0d>Пожирающее Пламя [3]</font></strong>";
|
||||
$book=909;$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
|
||||
|
||||
Reference in New Issue
Block a user