Фикс функции отображения предметов

This commit is contained in:
lopar 2018-06-24 21:00:03 +03:00
parent 3deab714ff
commit 9fa324ba15

View File

@ -2706,102 +2706,76 @@ function show_shop_items($it, $from = 'shop')
/**
* По ходу, главная функция отображения предметов.
*
* @param $row
* @param $type
* @param $row - массив значений, передаваймый из запроса к таблице inventory
* @param $type - тип предмета. Где бы их всех взять?
* @param bool $returned
* @return string
*/
function showitem($row, $type = 0, $returned = false)
function showitem($row, $type, $returned = false)
{
// Type 10 - нашлось в улучшениях атефактов.
global $user, $runes_exp;
$returnHTML = '';
if ((($row['maxdur'] <= ($row['duration'])) || ($row['dategoden'] && $row['dategoden'] <= time()))) {
destructitem($row['id']);
}
$magic = db::c()->query('SELECT * FROM `magic` WHERE `id` = ?i', $row['magic'])->fetch_assoc();
$incmagic = db::c()->query('SELECT * FROM `magic` WHERE `id` = ?i', $row['includemagic'])->fetch_assoc();
$incmagic['name'] = $row['includemagicname'];
$incmagic['cur'] = $row['includemagicdex'];
$incmagic['max'] = $row['includemagicmax'];
if (!$magic) {
if ($row['magic']) $magic = db::c()->query('SELECT * FROM `magic` WHERE `id` = ?i', $row['magic'])->fetch_assoc();
else {
$magic['chanse'] = $incmagic['chanse'];
$magic['time'] = $incmagic['time'];
$magic['targeted'] = $incmagic['targeted'];
}
if ($row['includemagic']) $incmagic = db::c()->query('SELECT * FROM `magic` WHERE `id` = ?i', $row['includemagic'])->fetch_assoc();
$incmagic['name'] = $row['includemagicname'];
$incmagic['cur'] = $row['includemagicdex'];
$incmagic['max'] = $row['includemagicmax'];
if (!$row['count'] || $type == 10) {
$up = ($row['upgrade'] > 0 ? " <font color=blue><b>[" . $row['upgrade'] . "]</b></font>" : "");
$up = ($row['upgrade'] > 0 ? " <b>[" . $row['upgrade'] . "]</b>" : "");
$returnHTML .= '<TR bgcolor="#C7C7C7" ><TD align="center" width="100">';
if ($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>";//<img ".((($row['maxdur']-2)<=$row['duration'] && $dress['duration'] > 2)?" style='background-image:url(i/blink.gif);' ":"")." src='i/sh/{$row['img']}' style=\"margin:0px,0px,-100000%,0px;\"><BR>
} else {
$returnHTML .= "<img " . ((($row['maxdur'] - 2) <= $row['duration'] && $dress['duration'] > 2) ? " style='background-image:url(i/blink.gif);' " : "") . " src='i/sh/{$row['img']}'><BR>";
}
if (($user['sila'] >= $row['nsila']) &&
($user['lovk'] >= $row['nlovk']) &&
($user['inta'] >= $row['ninta']) &&
($user['vinos'] >= $row['nvinos']) &&
($user['intel'] >= $row['nintel']) &&
($user['mudra'] >= $row['nmudra']) &&
($user['level'] >= $row['nlevel']) &&
(((int)$user['align'] == $row['nalign']) || ($row['nalign'] == 0) || ($row['nalign'] == 1.1 && ($user['align'] > 1 && $user['align'] < 2) || $user['align'] == 6)) &&
($user['noj'] >= $row['nnoj']) &&
($user['topor'] >= $row['ntopor']) &&
($user['dubina'] >= $row['ndubina']) &&
($user['mec'] >= $row['nmech']) &&
($user['mfire'] >= $row['nfire']) &&
($user['mwater'] >= $row['nwater']) &&
($user['mair'] >= $row['nair']) &&
($user['mearth'] >= $row['nearth']) &&
($user['mlight'] >= $row['nlight']) &&
($user['mgray'] >= $row['ngray']) &&
($user['mdark'] >= $row['ndark']) &&
($row['type'] < 13 || ($row['type'] == 50 || $row['type'] == 22 || $row['type'] == 23 || $row['type'] == 24)) &&
($row['needident'] == 0)
) {
if (($row['type'] == 12) || ($row['magic']) || ($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')";
} elseif ($magic['targeted'] == 2) {
$returnHTML .= "findlogin('Введите имя персонажа', 'main.php?edit=1&use={$row['id']}', 'target')";
} else {
$returnHTML .= "window.location='main.php?edit=1&use=" . $row['id'] . "';";
}
$returnHTML .= "\"href='#'>исп-ть</a><BR> ";
}
if ($row['type'] != 50) {
$returnHTML .= "<a href='?edit=1&dress={$row['id']}'>надеть</a> ";
}
} elseif (($row['type'] == 50) OR ($row['type'] == 12) OR ($row['magic']) OR ($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')";
} elseif ($magic['targeted'] == 2) {
$returnHTML .= "findlogin('Введите имя персонажа', 'main.php?edit=1&use={$row['id']}', 'target')";
} else {
$returnHTML .= "window.location='main.php?edit=1&use=" . $row['id'] . "';";
}
$returnHTML .= "\"href='#'>исп-ть</a><BR> ";
($user['lovk'] >= $row['nlovk']) &&
($user['inta'] >= $row['ninta']) &&
($user['vinos'] >= $row['nvinos']) &&
($user['intel'] >= $row['nintel']) &&
($user['mudra'] >= $row['nmudra']) &&
($user['level'] >= $row['nlevel']) &&
(((int)$user['align'] == $row['nalign']) || ($row['nalign'] == 0)) &&
($user['noj'] >= $row['nnoj']) &&
($user['topor'] >= $row['ntopor']) &&
($user['dubina'] >= $row['ndubina']) &&
($user['mec'] >= $row['nmech']) &&
($user['mfire'] >= $row['nfire']) &&
($user['mwater'] >= $row['nwater']) &&
($user['mair'] >= $row['nair']) &&
($user['mearth'] >= $row['nearth']) &&
($user['mlight'] >= $row['nlight']) &&
($user['mgray'] >= $row['ngray']) &&
($user['mdark'] >= $row['ndark']) &&
($row['needident'] == 0) &&
($row['type'] < 13 || ($row['type'] == 22 || $row['type'] == 23 || $row['type'] == 24))) {
$returnHTML .= "<a href='?edit=1&dress={$row['id']}'>надеть</a> ";
}
if (($row['type'] == 50) OR ($row['type'] == 12) OR ($row['magic']) OR ($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')";
elseif ($magic['targeted'] == 2) $returnHTML .= "findlogin('Введите имя персонажа', 'main.php?edit=1&use={$row['id']}', 'target')";
else $returnHTML .= "window.location='main.php?edit=1&use=" . $row['id'] . "';";
$returnHTML .= "\"href='#'>использовать</a><BR> ";
}
if ($type != 10) {
$returnHTML .= '<br />ID: ' . $row['id'] . '<br />';
// if ($row["koll"]) $returnHTML .= "<div style=\"font-size:3px\">&nbsp;</div><a title=\"Собрать\" href=\"/main.php?$link&stack=$row[id]\"><img border=\"0\" src=\"i/stack.gif\"></a> ";
if ($row["koll"] > 1) $returnHTML .= "<a title=\"Разделить\" onclick=\"splitstack('$row[name]','main.php?edit=1&unstack=$row[id]', '$row[img]', 1);return false;\" href=\"javascript:void(0)\"><img border=\"0\" src=\"i/unstack.gif\"></a>&nbsp;";
#onclick=\"delItmsNo('Выкинуть предмет?','deleteItems',0,'','".$row['img']."','".$row['name']."','main.php?edit=1&destruct=".$row['id']."');\"
$returnHTML .= "<img src=i/clear.gif style=\"cursor:hand;\" onclick=\"delItmsNo('Выкинуть предмет?','deleteItems',0,'','" . $row['img'] . "','" . $row['name'] . "','main.php?edit=1&destruct=" . $row['id'] . "');\"></TD><td>";
#$returnHTML .= "<img src=i/clear.gif style=\"cursor:hand;\" onclick=\"if (confirm('Предмет {$row['name']} будет утерян, вы уверены?')) window.location='main.php?edit=1&destruct=".$row['id']."'\"></TD><td>";
} else {
$returnHTML .= "<a href=upgrade_items.php?up=" . $row['id'] . ">Улучшить</a></td><td>";
}
@ -2818,16 +2792,16 @@ function showitem($row, $type = 0, $returned = false)
$returnHTML .= 'Уровень руны: <b>' . $row['rune_level'] . '</b> (<b title=\'Опыт\'>' . $row['rune_exp'] . '/' . $runes_exp[$row['rune_level'] + 1] . '</b>)<br />';
}
if ($row['ecost'] > 0) {
$returnHTML .= "<b>Цена: {$row['ecost']} екр.</b> &nbsp; &nbsp;";
$returnHTML .= "<small style='color: green'>Предмет куплен за еврокредиты.</small> &nbsp; &nbsp;";
} elseif ($row['point'] > 0) {
$returnHTML .= "<b>Цена: {$row['point']} реп.</b> &nbsp; &nbsp;";
$returnHTML .= "<small style='color: green'>Предмет куплен за очки репутации.</small> &nbsp; &nbsp;";
} else {
$returnHTML .= "<b>Цена: {$row['cost']} кр.</b> &nbsp; &nbsp;";
}
if ($row['zeton'] > 0) {
$returnHTML .= "<br><b>Жетон: {$row['zeton']}</b>&nbsp<br>";
}
if (@$row['count']) {
if ($row['count']) {
$returnHTML .= "<small>(количество: {$row['count']})</small>";
}
if ($row['for_me'] > 0) {
@ -2847,32 +2821,32 @@ function showitem($row, $type = 0, $returned = false)
" . (($magic['time']) ? "Продолжительность действия магии: " . $magic['time'] . " мин.<BR>" : "") . "
" . (($row['goden']) ? "Срок годности: {$row['goden']} дн. " . ((!$row['count']) ? "(до " . date("Y.m.d H:i", $row['dategoden']) . ")" : "") . "<BR>" : "") . "
" . (($row['nsila'] || $row['nlovk'] || $row['ninta'] || $row['nvinos'] OR $row['nlevel'] OR $row['nintel'] OR $row['nmudra'] OR $row['nnoj'] OR $row['ntopor'] OR $row['ndubina'] OR $row['nmech'] OR $row['nfire'] OR $row['nwater'] OR $row['nair'] OR $row['nearth'] OR $row['nearth'] OR $row['nlight'] OR $row['ngray'] OR $row['ndark']) ? "<b>Требуется минимальное:</b><BR>" : "") . "
" . (($row['nsila'] > 0) ? " " . (($row['nsila'] > $user['sila']) ? "<font color=red>" : "") . "Сила: {$row['nsila']}</font><BR>" : "") . "
" . (($row['nlovk'] > 0) ? " " . (($row['nlovk'] > $user['lovk']) ? "<font color=red>" : "") . "Ловкость: {$row['nlovk']}</font><BR>" : "") . "
" . (($row['ninta'] > 0) ? " " . (($row['ninta'] > $user['inta']) ? "<font color=red>" : "") . "Интуиция: {$row['ninta']}</font><BR>" : "") . "
" . (($row['nvinos'] > 0) ? " " . (($row['nvinos'] > $user['vinos']) ? "<font color=red>" : "") . "Выносливость: {$row['nvinos']}</font><BR>" : "") . "
" . (($row['nlevel'] > 0) ? " " . (($row['nlevel'] > $user['level']) ? "<font color=red>" : "") . "Уровень: {$row['nlevel']}</font><BR>" : "") . "
" . (($row['nintel'] > 0) ? " " . (($row['nintel'] > $user['intel']) ? "<font color=red>" : "") . "Интеллект: {$row['nintel']}</font><BR>" : "") . "
" . (($row['nnoj'] > 0) ? " " . (($row['nnoj'] > $user['noj']) ? "<font color=red>" : "") . "Мастерство владения ножами и кастетами: {$row['nnoj']}</font><BR>" : "") . "
" . (($row['ntopor'] > 0) ? " " . (($row['ntopor'] > $user['topor']) ? "<font color=red>" : "") . "Мастерство владения топорами и секирами: {$row['ntopor']}</font><BR>" : "") . "
" . (($row['ndubina'] > 0) ? " " . (($row['ndubina'] > $user['dubina']) ? "<font color=red>" : "") . "Мастерство владения дубинами и булавами: {$row['ndubina']}</font><BR>" : "") . "
" . (($row['nmech'] > 0) ? " " . (($row['nmech'] > $user['mec']) ? "<font color=red>" : "") . "Мастерство владения мечами: {$row['nmech']}</font><BR>" : "") . "
" . (($row['nfire'] > 0) ? " " . (($row['nfire'] > $user['mfire']) ? "<font color=red>" : "") . "Мастерство владения стихией Огня: {$row['nfire']}</font><BR>" : "") . "
" . (($row['nwater'] > 0) ? " " . (($row['nwater'] > $user['mwater']) ? "<font color=red>" : "") . "Мастерство владения стихией Воды: {$row['nwater']}</font><BR>" : "") . "
" . (($row['nair'] > 0) ? " " . (($row['nair'] > $user['mair']) ? "<font color=red>" : "") . "Мастерство владения стихией Воздуха: {$row['nair']}</font><BR>" : "") . "
" . (($row['nearth'] > 0) ? " " . (($row['nearth'] > $user['mearth']) ? "<font color=red>" : "") . "Мастерство владения стихией Земли: {$row['nearth']}</font><BR>" : "") . "
" . (($row['nlight'] > 0) ? " " . (($row['nlight'] > $user['mlight']) ? "<font color=red>" : "") . "Мастерство владения магией Света: {$row['nlight']}</font><BR>" : "") . "
" . (($row['ngray'] > 0) ? " " . (($row['ngray'] > $user['mgray']) ? "<font color=red>" : "") . "Мастерство владения серой магией: {$row['ngray']}</font><BR>" : "") . "
" . (($row['ndark'] > 0) ? " " . (($row['ndark'] > $user['mdark']) ? "<font color=red>" : "") . "Мастерство владения магией Тьмы: {$row['ndark']}</font><BR>" : "") . "
" . (($row['nsila'] > 0) ? " " . (($row['nsila'] > $user['sila']) ? "<span style='color: red'>" : "") . "Сила: {$row['nsila']}</span><BR>" : "") . "
" . (($row['nlovk'] > 0) ? " " . (($row['nlovk'] > $user['lovk']) ? "<span style='color: red'>" : "") . "Ловкость: {$row['nlovk']}</span><BR>" : "") . "
" . (($row['ninta'] > 0) ? " " . (($row['ninta'] > $user['inta']) ? "<span style='color: red'>" : "") . "Интуиция: {$row['ninta']}</span><BR>" : "") . "
" . (($row['nvinos'] > 0) ? " " . (($row['nvinos'] > $user['vinos']) ? "<span style='color: red'>" : "") . "Выносливость: {$row['nvinos']}</span><BR>" : "") . "
" . (($row['nlevel'] > 0) ? " " . (($row['nlevel'] > $user['level']) ? "<span style='color: red'>" : "") . "Уровень: {$row['nlevel']}</span><BR>" : "") . "
" . (($row['nintel'] > 0) ? " " . (($row['nintel'] > $user['intel']) ? "<span style='color: red'>" : "") . "Интеллект: {$row['nintel']}</span><BR>" : "") . "
" . (($row['nnoj'] > 0) ? " " . (($row['nnoj'] > $user['noj']) ? "<span style='color: red'>" : "") . "Мастерство владения ножами и кастетами: {$row['nnoj']}</span><BR>" : "") . "
" . (($row['ntopor'] > 0) ? " " . (($row['ntopor'] > $user['topor']) ? "<span style='color: red'>" : "") . "Мастерство владения топорами и секирами: {$row['ntopor']}</span><BR>" : "") . "
" . (($row['ndubina'] > 0) ? " " . (($row['ndubina'] > $user['dubina']) ? "<span style='color: red'>" : "") . "Мастерство владения дубинами и булавами: {$row['ndubina']}</span><BR>" : "") . "
" . (($row['nmech'] > 0) ? " " . (($row['nmech'] > $user['mec']) ? "<span style='color: red'>" : "") . "Мастерство владения мечами: {$row['nmech']}</span><BR>" : "") . "
" . (($row['nfire'] > 0) ? " " . (($row['nfire'] > $user['mfire']) ? "<span style='color: red'>" : "") . "Мастерство владения стихией Огня: {$row['nfire']}</span><BR>" : "") . "
" . (($row['nwater'] > 0) ? " " . (($row['nwater'] > $user['mwater']) ? "<span style='color: red'>" : "") . "Мастерство владения стихией Воды: {$row['nwater']}</span><BR>" : "") . "
" . (($row['nair'] > 0) ? " " . (($row['nair'] > $user['mair']) ? "<span style='color: red'>" : "") . "Мастерство владения стихией Воздуха: {$row['nair']}</span><BR>" : "") . "
" . (($row['nearth'] > 0) ? " " . (($row['nearth'] > $user['mearth']) ? "<span style='color: red'>" : "") . "Мастерство владения стихией Земли: {$row['nearth']}</span><BR>" : "") . "
" . (($row['nlight'] > 0) ? " " . (($row['nlight'] > $user['mlight']) ? "<span style='color: red'>" : "") . "Мастерство владения магией Света: {$row['nlight']}</span><BR>" : "") . "
" . (($row['ngray'] > 0) ? " " . (($row['ngray'] > $user['mgray']) ? "<span style='color: red'>" : "") . "Мастерство владения серой магией: {$row['ngray']}</span><BR>" : "") . "
" . (($row['ndark'] > 0) ? " " . (($row['ndark'] > $user['mdark']) ? "<span style='color: red'>" : "") . "Мастерство владения магией Тьмы: {$row['ndark']}</span><BR>" : "") . "
" . (($row['gmeshok'] OR $row['gsila'] OR $row['mfkrit'] OR $row['mfakrit'] OR $row['mfuvorot'] OR $row['mfauvorot'] OR $row['glovk'] OR $row['ghp'] OR $row['ginta'] OR $row['gintel'] OR $row['gnoj'] OR $row['gtopor'] OR $row['gdubina'] OR $row['gmech'] OR $row['gfire'] OR $row['gwater'] OR $row['gair'] OR $row['gearth'] OR $row['gearth'] OR $row['glight'] OR $row['ggray'] OR $row['gdark'] OR $row['minu'] OR $row['maxu'] OR $row['bron1'] OR $row['bron2'] OR $row['bron3'] OR $row['bron4']) ? "<b>Действует на:</b><BR>" : "") . "
" . (($row['minu']) ? " Минимальное наносимое повреждение: +{$row['minu']}<BR>" : "") . "
" . (($row['maxu']) ? " Максимальное наносимое повреждение: +{$row['maxu']}<BR>" : "");
if ($row['gsila']) {
$returnHTML .= "• Сила: +" . $row['gsila'];
$returnHTML .= "• Сила: " . plusorminus($row['gsila']);
if ($row['free_stat'] > 0) {
$returnHTML .= " <a href=?modif_stat=gsila&ids=" . $row['id'] . "&edit=1><img src=i/up.gif></a>";
$returnHTML .= " <a href=?modif_stat=gsila&ids=" . $row['id'] . "&edit=1>🔼</a>";
}
$returnHTML .= "<br>";
}
@ -2880,7 +2854,7 @@ function showitem($row, $type = 0, $returned = false)
if ($row['glovk']) {
$returnHTML .= "• Ловкость: " . plusorminus($row['glovk']);
if ($row['free_stat'] > 0) {
$returnHTML .= " <a href=?modif_stat=glovk&ids=" . $row['id'] . "&edit=1><img src=i/up.gif></a>";
$returnHTML .= " <a href=?modif_stat=glovk&ids=" . $row['id'] . "&edit=1>🔼</a>";
}
$returnHTML .= "<br>";
}
@ -2889,7 +2863,7 @@ function showitem($row, $type = 0, $returned = false)
if ($row['ginta']) {
$returnHTML .= "• Интуиция: " . plusorminus($row['ginta']);
if ($row['free_stat'] > 0) {
$returnHTML .= " <a href=?modif_stat=ginta&ids=" . $row['id'] . "&edit=1><img src=i/up.gif></a>";
$returnHTML .= " <a href=?modif_stat=ginta&ids=" . $row['id'] . "&edit=1>🔼</a>";
}
$returnHTML .= "<br>";
}
@ -2897,7 +2871,7 @@ function showitem($row, $type = 0, $returned = false)
if ($row['gintel']) {
$returnHTML .= "• Интеллект: " . plusorminus($row['gintel']);
if ($row['free_stat'] > 0) {
$returnHTML .= " <a href=?modif_stat=gintel&ids=" . $row['id'] . "&edit=1><img src=i/up.gif></a>";
$returnHTML .= " <a href=?modif_stat=gintel&ids=" . $row['id'] . "&edit=1>🔼</a>";
}
$returnHTML .= "<br>";
}
@ -2909,7 +2883,7 @@ function showitem($row, $type = 0, $returned = false)
if ($row['mfkrit'] > 0) {
$returnHTML .= "• Мф. критических ударов: " . plusorminus($row['mfkrit']) . "%";
if ($row['free_mf'] > 0) {
$returnHTML .= " <a href=?modif_mf=mfkrit&ids=" . $row['id'] . "&edit=1><img src=i/up.gif></a>";
$returnHTML .= " <a href=?modif_mf=mfkrit&ids=" . $row['id'] . "&edit=1>🔼</a>";
}
$returnHTML .= "<br>";
}
@ -2917,7 +2891,7 @@ function showitem($row, $type = 0, $returned = false)
if ($row['mfakrit'] > 0) {
$returnHTML .= "• Мф. против крит. ударов: " . plusorminus($row['mfakrit']) . "%";
if ($row['free_mf'] > 0) {
$returnHTML .= " <a href=?modif_mf=mfakrit&ids=" . $row['id'] . "&edit=1><img src=i/up.gif></a>";
$returnHTML .= " <a href=?modif_mf=mfakrit&ids=" . $row['id'] . "&edit=1>🔼</a>";
}
$returnHTML .= "<br>";
}
@ -2925,21 +2899,19 @@ function showitem($row, $type = 0, $returned = false)
if ($row['mfuvorot'] > 0) {
$returnHTML .= "• Мф. увертливости: " . plusorminus($row['mfuvorot']) . "%";
if ($row['free_mf'] > 0) {
$returnHTML .= " <a href=?modif_mf=mfuvorot&ids=" . $row['id'] . "&edit=1><img src=i/up.gif></a>";
$returnHTML .= " <a href=?modif_mf=mfuvorot&ids=" . $row['id'] . "&edit=1>🔼</a>";
}
$returnHTML .= "<br>";
}
if ($row['mfauvorot'] > 0) {
$returnHTML .= "• Мф. против увертлив.: " . plusorminus($row['mfauvorot']) . "%";
if ($row['free_mf'] > 0) {
$returnHTML .= " <a href=?modif_mf=mfauvorot&ids=" . $row['id'] . "&edit=1><img src=i/up.gif></a>";
$returnHTML .= " <a href=?modif_mf=mfauvorot&ids=" . $row['id'] . "&edit=1>🔼</a>";
}
$returnHTML .= "<br>";
}
$returnHTML .= (($row['gnoj']) ? "• Мастерство владения ножами и кастетами: +{$row['gnoj']}<BR>" : "") . "
" . (($row['gtopor']) ? " Мастерство владения топорами и секирами: +{$row['gtopor']}<BR>" : "") . "
" . (($row['gdubina']) ? " Мастерство владения дубинами и булавами: +{$row['gdubina']}<BR>" : "") . "
@ -2956,7 +2928,7 @@ function showitem($row, $type = 0, $returned = false)
if ($row['bron1'] > 0) {
$returnHTML .= "• Броня головы: " . $row['bron1'];
if ($row['free_bron'] > 0) {
$returnHTML .= " <a href=?modif_bron=bron1&ids=" . $row['id'] . "&edit=1><img src=i/up.gif></a>";
$returnHTML .= " <a href=?modif_bron=bron1&ids=" . $row['id'] . "&edit=1>🔼</a>";
}
$returnHTML .= "<br>";
}
@ -2964,7 +2936,7 @@ function showitem($row, $type = 0, $returned = false)
if ($row['bron2'] > 0) {
$returnHTML .= "• Броня корпуса: " . $row['bron2'];
if ($row['free_bron'] > 0) {
$returnHTML .= " <a href=?modif_bron=bron2&ids=" . $row['id'] . "&edit=1><img src=i/up.gif></a>";
$returnHTML .= " <a href=?modif_bron=bron2&ids=" . $row['id'] . "&edit=1>🔼</a>";
}
$returnHTML .= "<br>";
}
@ -2972,7 +2944,7 @@ function showitem($row, $type = 0, $returned = false)
if ($row['bron3'] > 0) {
$returnHTML .= "• Броня пояса: " . $row['bron3'];
if ($row['free_bron'] > 0) {
$returnHTML .= " <a href=?modif_bron=bron3&ids=" . $row['id'] . "&edit=1><img src=i/up.gif></a>";
$returnHTML .= " <a href=?modif_bron=bron3&ids=" . $row['id'] . "&edit=1>🔼</a>";
}
$returnHTML .= "<br>";
}
@ -2980,31 +2952,31 @@ function showitem($row, $type = 0, $returned = false)
if ($row['bron4'] > 0) {
$returnHTML .= "• Броня ног: " . $row['bron4'];
if ($row['free_bron'] > 0) {
$returnHTML .= " <a href=?modif_bron=bron4&ids=" . $row['id'] . "&edit=1><img src=i/up.gif></a>";
$returnHTML .= " <a href=?modif_bron=bron4&ids=" . $row['id'] . "&edit=1>🔼</a>";
}
$returnHTML .= "<br>";
}
$returnHTML .= (($row['gmeshok']) ? "Увеличивает рюкзак: +{$row['gmeshok']}<BR>" : "") . "
$returnHTML .= (($row['gmeshok']) ? "Вместимость рюкзака: +{$row['gmeshok']}<BR>" : "") . "
" . (($row['letter']) ? "Количество символов: " . strlen($row['letter']) . "</div>" : "") . "
" . (($row['letter']) ? "На бумаге записан текст:<div style='background-color:#FAF0E6;'> " . nl2br($row['letter']) . "</div>" : "") . "
" . (($row['opisan']) ? "&bull; " . nl2br($row['opisan']) . "<br />" : "") . "
" . (($magic['name'] && $row['type'] != 50) ? "<font color=maroon>Наложены заклятия:</font> " . $magic['name'] . "<BR>" : "") . "
" . (($row['text']) ? "На ручке выгравирована надпись:<center>" . $row['text'] . "</center><BR>" : "") . "
" . (($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>" : "") . "
" . (($row['podzem']) ? "<font style='font-size:11px; color:#990000'>Предмет из подземелья</font><BR>" : "") . "
" . (($row['laba'] == 1) ? "<font style='font-size: 11px; color:#990000'>Пропадёт если не найти выход</font><BR>" : "") . "
" . (($row['laba'] == 2) ? "<font style='font-size: 11px; color:#990000'>Предмет пропадёт после выхода</font><BR>" : "") . "
" . ((!$row['isrep']) ? "<small><font color=maroon>Предмет не подлежит ремонту</font></small><BR>" : "");
" . (($row['podzem']) ? "<span style='font-size:11px; color:maroon;'>Предмет из подземелья</span><BR>" : "") . "
" . (($row['laba'] == 1) ? "<span style='font-size: 11px; color:maroon'>Пропадёт если не найти выход</span><BR>" : "") . "
" . (($row['laba'] == 2) ? "<span style='font-size: 11px; color:maroon'>Предмет пропадёт после выхода</span><BR>" : "") . "
" . ((!$row['isrep']) ? "<span style='font-size: 11px; color:maroon'>Предмет не подлежит ремонту</span><BR>" : "");
if ($row['free_bron'] > 0) {
$returnHTML .= "<font color=blue>Свободных улучшений брони: " . $row['free_bron'] . "</font><br>";
$returnHTML .= "<span style='color:blue'>Свободных улучшений брони: " . $row['free_bron'] . "</span><br>";
}
if ($row['free_stat'] > 0) {
$returnHTML .= "<font color=blue>Свободных улучшений параметров: " . $row['free_stat'] . "</font><br>";
$returnHTML .= "<span style='color:blue'>Свободных улучшений параметров: " . $row['free_stat'] . "</span><br>";
}
if ($row['free_mf'] > 0) {
$returnHTML .= "<font color=blue>Свободных улучшений модификаторов: " . $row['free_mf'] . "%</font><br>";
$returnHTML .= "<span style='color:blue'>Свободных улучшений модификаторов: " . $row['free_mf'] . "%</span><br>";
}
if ($row['add_proc_mf'] > 0 || $row['add_proc_uron'] > 0 || $row['add_proc_bron'] > 0) {
@ -3019,9 +2991,8 @@ function showitem($row, $type = 0, $returned = false)
$returnHTML .= '&bull; Брони:' . plusorminus($row['add_proc_bron']) . '%<br />';
}
}
} else {
$returnHTML .= "<font color=maroon><B>Свойства предмета не идентифицированы</B></font><BR>";
$returnHTML .= "<span style='color: maroon'><B>Свойства предмета не идентифицированы</B></span><BR>";
}
$osob = array(22, 23);
if (in_array($row['type'], $osob)) {
@ -3032,7 +3003,8 @@ function showitem($row, $type = 0, $returned = false)
$returnHTML .= '&bull; может одеваться на броню<br />';
}
}
$returnHTML .= "<small>Сделано в CapitalCity</small><br /></td></TR>";
$returnHTML .= "<br /></td></TR>";
if ($returned) {
return $returnHTML;
}