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

This commit is contained in:
lopar 2018-06-24 23:03:57 +03:00
parent d5b90f6909
commit 3bc9bbb292
2 changed files with 9 additions and 6 deletions

View File

@ -2711,7 +2711,7 @@ function show_shop_items($it, $from = 'shop')
* @param bool $returned
* @return string
*/
function showitem($row, $type, $returned = false)
function showitem($row, $type, $returned = false, $infOnly = false)
{
global $user, $runes_exp;
$returnHTML = '';
@ -2730,11 +2730,12 @@ function showitem($row, $type, $returned = false)
$incmagic['cur'] = $row['includemagicdex'];
$incmagic['max'] = $row['includemagicmax'];
if (!$row['count'] || $type == 10) {
$returnHTML .= '<TR bgcolor="#C7C7C7">';
if ((!$row['count'] || $type == 10) && $infOnly == false) {
$up = ($row['upgrade'] > 0 ? " <b>[" . $row['upgrade'] . "]</b>" : "");
$returnHTML .= '<TR bgcolor="#C7C7C7" ><TD align="center" width="100">';
$returnHTML .= '<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>
$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'] && $dress['duration'] > 2) ? " style='background-image:url(i/blink.gif);' " : "") . " src='i/sh/{$row['img']}'><BR>";
}
@ -2777,10 +2778,12 @@ function showitem($row, $type, $returned = false)
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;";
$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>";
} else {
$returnHTML .= "<a href=upgrade_items.php?up=" . $row['id'] . ">Улучшить</a></td><td>";
$returnHTML .= "<a href=upgrade_items.php?up=" . $row['id'] . ">Улучшить</a></td>";
}
}
$returnHTML .= "<td>";
if ($row['destinyinv'] > 0) {
$returnHTML .= "{$row['name']}{$up}<img src=i/align_{$row['nalign']}.gif>&nbsp;(Масса:&nbsp;{$row['massa']})<img src=i/destiny{$row['destinyinv']}.gif alt=\"Этот предмет связан с Вами общей судьбой. Вы не можете передать его кому-либо еще.\"><img src=i/artefact{$row['artefact']}.gif>" . (($row['present']) ? '&nbsp;<IMG SRC="i/podarok.gif" TITLE="Этот предмет вам подарил ' . $row['present'] . '. Вы не сможете передать этот предмет кому-либо еще." ALT="Этот предмет вам подарил ' . $row['present'] . '. Вы не сможете передать этот предмет кому-либо еще.">' : "") . "<BR>";
} elseif ($row['destiny'] > 0) {

View File

@ -111,7 +111,7 @@ if ($_SESSION['receiverName']) {
</form>
</td>
<td valign=top>
<?php echo showitem($row, '',true); ?>
<?php showitem($row, '','',true); ?>
</td>
</tr>
<?php endwhile ?>