runes goodbuy
This commit is contained in:
parent
094b8a6027
commit
0d5f5c1a43
@ -37,21 +37,21 @@ class ShopItem extends Item
|
||||
{
|
||||
switch ($shopType) {
|
||||
default:
|
||||
$btnPrice = "Купить за " . intval($this->cost) . " кр.";
|
||||
$btnValue = "Купить за " . intval($this->cost) . " кр.";
|
||||
$btnLink = "/shop.php?buy={$this->id}&rnd=" . mt_rand();
|
||||
break;
|
||||
case 'ashop':
|
||||
$btnPrice = "Купить за " . intval($this->ecost) . " eкр.";
|
||||
$btnValue = "Купить за " . intval($this->ecost) . " eкр.";
|
||||
$btnLink = "/ashop.php?buy={$this->id}&rnd=" . mt_rand();
|
||||
break;
|
||||
case 'sell':
|
||||
$btnPrice = "Продать";
|
||||
$btnValue = "Продать";
|
||||
$btnLink = "/shop.php?sell={$this->id}&rnd=".mt_rand();
|
||||
break;
|
||||
}
|
||||
|
||||
echo <<<BTN
|
||||
<p><input type="button" style="background: darkgrey; border: 1px solid grey; border-radius: 2px;" value="{$btnPrice}"
|
||||
<p><input type="button" style="background: darkgrey; border: 1px solid grey; border-radius: 2px;" value="{$btnValue}"
|
||||
onclick="location='{$btnLink}'">
|
||||
BTN;
|
||||
if ($this->count > 0) echo "<br><small>В наличии: {$this->count} штук</small>";
|
||||
|
@ -1456,17 +1456,6 @@ function showpersout($pas = 0) //FIXME Сделать по человеческ
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<table cellspacing="0" cellpadding="0" border="0"
|
||||
style="background: url('i/runes_slots.jpg') no-repeat center bottom;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="59" height="48" align="right"><?= show_rune(1, $user['id']) ?></td>
|
||||
<td width="74" height="48" align="center"><?= show_rune(2, $user['id']) ?></td>
|
||||
<td width="57" height="48" align="left"><?= show_rune(3, $user['id']) ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<TABLE cellPadding=0 cellSpacing=0 width="100%">
|
||||
<TBODY>
|
||||
<?
|
||||
@ -1623,7 +1612,6 @@ function showitem2()
|
||||
function showitem($row, $type = null, $returned = false, $infOnly = false)
|
||||
{
|
||||
global $user;
|
||||
$runes_exp = ['1' => 10500, '2' => 23500, '3' => 38500, '4' => 57000, '5' => 77000, '6' => 103000, '7' => 136500, '8' => 171500, '9' => 212500, '10' => 257500];
|
||||
$returnHTML = '';
|
||||
$incmagic = [];
|
||||
$up = '';
|
||||
@ -1706,9 +1694,6 @@ function showitem($row, $type = null, $returned = false, $infOnly = false)
|
||||
$returnHTML .= " <img src=i/podarok.gif class='tooltip' title='Этот предмет вам подарил {$row['present']}. Вы не сможете передать этот предмет кому-либо еще.' alt='Этот предмет вам подарил {$row['present']}. Вы не сможете передать этот предмет кому-либо еще.'>";
|
||||
// Конец первой строчки
|
||||
|
||||
if ($row['type'] == 24 && $type != 11)
|
||||
$returnHTML .= "<br>Уровень руны: <b>" . $row['rune_level'] . "</b> (<b title='Опыт'>" . $row['rune_exp'] . "/" . $runes_exp[$row['rune_level'] + 1] . "</b>)";
|
||||
|
||||
if (!empty($row['ecost'])) {
|
||||
$returnHTML .= "<br><small style='color: green'>Предмет куплен за еврокредиты.</small>";
|
||||
} elseif (!empty($row['point'])) {
|
||||
@ -1876,34 +1861,6 @@ function showitem($row, $type = null, $returned = false, $infOnly = false)
|
||||
echo $returnHTML;
|
||||
}
|
||||
|
||||
function show_rune($slot, $uid, $type = 0)
|
||||
{
|
||||
global $user;
|
||||
$runes_exp = ['1' => 10500, '2' => 23500, '3' => 38500, '4' => 57000, '5' => 77000, '6' => 103000, '7' => 136500, '8' => 171500, '9' => 212500, '10' => 257500];
|
||||
$us = db::c()->query('SELECT `id`, `rune_1`, `rune_2`, `rune_3` FROM `users` WHERE `id` = ?i', $uid)->fetch_assoc();
|
||||
if (isset($us['id'])) {
|
||||
if ($us['rune_' . $slot] > 0) {
|
||||
$ruid = $us['rune_' . $slot];
|
||||
$rtype = (23 + $slot);
|
||||
$dress = db::c()->query('SELECT `id`, `img`, `name`, `duration`, `maxdur`, `rune_level`, `rune_exp` FROM `inventory` WHERE `id` = ?i AND `owner` = ?i', $ruid, $us['id'])->fetch_assoc();
|
||||
if (isset($dress['id'])) {
|
||||
if ($us['id'] == $user['id'] && $type == 1) {
|
||||
$r = '<a href=\'main.php?edit=1&drop=' . $rtype . '\'><img class=\'tooltip\' src="i/sh/' . $dress['img'] . '" width="30" height="30" title="Снять <b>' . $dress['name'] . '</b><br />Уровень: ' . $dress['rune_level'] . '<br />Опыт: ' . $dress['rune_exp'] . '/' . $runes_exp[$dress['rune_level'] + 1] . '<br />Прочность: ' . $dress['duration'] . '/' . $dress['maxdur'] . '" /></a>';
|
||||
} else {
|
||||
$r = '<img class=\'tooltip\' src="i/sh/' . $dress['img'] . '" width="30" height="30" title="<b>' . $dress['name'] . '</b><br />Уровень: ' . $dress['rune_level'] . '<br />Прочность : ' . $dress['duration'] . '/' . $dress['maxdur'] . '" />';
|
||||
}
|
||||
} else {
|
||||
$r = '<img class=\'tooltip\' src="i/none.gif" width="30" height="30" title="<b>Пустой слот Руна</b>" />';
|
||||
}
|
||||
} else {
|
||||
$r = '<img class=\'tooltip\' src="i/none.gif" width="30" height="30" title="<b>Пустой слот Руна</b>" />';
|
||||
}
|
||||
} else {
|
||||
$r = '<img class=\'tooltip\' src="i/none.gif" width="30" height="30" title="<b>Пустой слот Руна</b>" />';
|
||||
}
|
||||
return $r;
|
||||
}
|
||||
|
||||
function undressall($id)
|
||||
{
|
||||
for ($i = 1; $i <= 26; $i++) {
|
||||
|
11
main.php
11
main.php
@ -604,17 +604,6 @@ function showpersinv($id)
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<table cellspacing="0" cellpadding="0" border="0"
|
||||
style="background: url('http://i.oldbk.com/i/runes_slots.jpg') no-repeat center bottom;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="59" height="48" align="right"><? echo show_rune(1, $user['id'], 1); ?></td>
|
||||
<td width="74" height="48" align="center"><? echo show_rune(2, $user['id'], 1); ?></td>
|
||||
<td width="57" height="48" align="left"><? echo show_rune(3, $user['id'], 1); ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</CENTER> <?php
|
||||
}
|
||||
|
||||
|
@ -413,7 +413,7 @@ if (input::post('goto') == 'gravirovka') {
|
||||
?>
|
||||
</small>
|
||||
</TD>
|
||||
<TD valign=top><?= showitem($row) ?></TD>
|
||||
<TD valign=top><?php #showitem($row) ?></TD>
|
||||
</TR>
|
||||
<?php
|
||||
}
|
||||
@ -432,7 +432,7 @@ if (input::post('goto') == 'gravirovka') {
|
||||
за <?= $row['cost'] ?> кр.</A><BR>
|
||||
</small>
|
||||
</TD>
|
||||
<TD valign=top><?= showitem($row) ?></TD>
|
||||
<TD valign=top><?php #showitem($row) ?></TD>
|
||||
</TR>
|
||||
<?php
|
||||
}
|
||||
@ -460,7 +460,7 @@ if (input::post('goto') == 'gravirovka') {
|
||||
за <?= $babki ?> <?= $cost_t ?>.</A><BR>
|
||||
</small>
|
||||
</TD>
|
||||
<TD valign=top><?= showitem($row) ?></TD>
|
||||
<TD valign=top><?php #showitem($row) ?></TD>
|
||||
</TR>
|
||||
<?php
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user