inventory massive undefined indexes

This commit is contained in:
Igor Barkov [iwork] 2018-12-11 16:39:40 +02:00
parent 71a62ad960
commit 930b8c987d

View File

@ -1666,7 +1666,7 @@ function showitem($row, $type, $returned = false, $infOnly = false)
if ((empty($row['count']) || $type == 10) && $infOnly == false) {
$up = ($row['upgrade'] > 0 ? " <b>[" . $row['upgrade'] . "]</b>" : "");
$returnHTML .= '<TD align="center" width="100">';
if ($incmagic['max']) {
if (!empty($incmagic['max'])) {
$returnHTML .= "<img class=\"tooltip\" src='mg2.php?p=" . ($incmagic['cur'] / $incmagic['max'] * 100) . "&i={$row['img']}' style=\"filter:shadow(color=red, direction=90, strength=3);\"><BR>";
} else {
$returnHTML .= "<img " . ((($row['maxdur'] - 2) <= $row['duration'] && $row['duration'] > 2) ? " style='background-image:url(i/blink.gif);' " : "") . " src='i/sh/{$row['img']}'><BR>";
@ -1696,7 +1696,7 @@ function showitem($row, $type, $returned = false, $infOnly = false)
$returnHTML .= "<a href='?edit=1&dress={$row['id']}'>надеть</a> ";
}
if (($row['type'] == 50) OR ($row['type'] == 12) OR ($row['magic']) OR ($incmagic['cur'])) {
if ($row['type'] == 50 OR $row['type'] == 12 OR !empty($row['magic']) OR !empty($incmagic['cur'])) {
$returnHTML .= "<a onclick=\"";
if ($magic['id'] == 43) $returnHTML .= "okno('Название встраиваемого свитка', 'main.php?edit=1&use={$row['id']}', 'target')";
elseif ($magic['targeted'] == 1) $returnHTML .= "okno('Введите название предмета', 'main.php?edit=1&use={$row['id']}', 'target')";
@ -1847,9 +1847,12 @@ function showitem($row, $type, $returned = false, $infOnly = false)
if (!empty($row['opisan'])) $returnHTML .= "<br>" . nl2br($row['opisan']);
//Хрен пойми что есть что.
$returnHTML .= (($magic['name'] && $row['type'] != 50) ? "<span style='color: maroon;'>Наложены заклятия:</span> " . $magic['name'] . "<BR>" : "") . "
" . (($row['text']) ? "<em style='font-size:11px; color:chocolate;'> " . $row['text'] . "</em><BR>" : "") . "
" . (($incmagic['max']) ? " Встроено заклятие <img src=\"i/magic/" . $incmagic['img'] . "\" /> " . $incmagic['cur'] . " шт. <BR>" : "");
if (!empty($magic['name']) AND $row['type'] != 50)
$returnHTML .= "<br><span style='color: maroon;'>Наложены заклятия:</span>" . $magic['name'];
if (!empty($row['text']))
$returnHTML .= "<br><em style='font-size:11px; color:chocolate;'>" .$row['text']. "</em>";
if (!empty($incmagic['max']))
$returnHTML .= "<br>Встроено заклятие <img src=i/magic" . $incmagic['img'] . "> " . $incmagic['cur'] . " шт.";
if (!empty($row['podzem'])) $returnHTML .= "<br><span style='font-size:11px; color:maroon;'>Предмет из подземелья</span>";
if ($row['podzem'] == 1) $returnHTML .= "<br><span style='font-size:11px; color:maroon'>Пропадёт если не найти выход</span>";