make class greater
This commit is contained in:
parent
3828806645
commit
1d881d47ad
@ -22,10 +22,11 @@ class ShopItem extends Item
|
|||||||
*/
|
*/
|
||||||
public function printControls()
|
public function printControls()
|
||||||
{
|
{
|
||||||
$btnPrice = 'Купить за ' . intval($this->cost) . ' кр.';
|
$btnPrice = "Купить за {intval($this->cost)} кр.";
|
||||||
|
$btnLink = "/shop.php?buy={$this->id}&rnd=".mt_rand();
|
||||||
echo <<<BTN
|
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="{$btnPrice}"
|
||||||
onclick="location='/admin.php'">
|
onclick="location='{$btnLink}'">
|
||||||
BTN;
|
BTN;
|
||||||
if ($this->count > 0) echo "<br><small>(Осталось: {$this->count} штук)</small>";
|
if ($this->count > 0) echo "<br><small>(Осталось: {$this->count} штук)</small>";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user