runes goodbuy
This commit is contained in:
@@ -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>";
|
||||
|
||||
Reference in New Issue
Block a user