runes goodbuy

This commit is contained in:
lopar
2019-01-16 22:20:47 +02:00
parent 094b8a6027
commit 0d5f5c1a43
4 changed files with 7 additions and 61 deletions

View File

@@ -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) . "р.";
$btnValue = "Купить за " . intval($this->ecost) . "р.";
$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>";