Куча мелочей, в том числе по #42.
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
use Battles\Bank;
|
||||
use Battles\Database\DBPDO;
|
||||
use Battles\Item;
|
||||
use Battles\ShopItem;
|
||||
use Battles\Template;
|
||||
|
||||
ob_start();
|
||||
session_start();
|
||||
require_once 'functions.php';
|
||||
$saleItems = false;
|
||||
@@ -71,12 +71,12 @@ switch ($shopCategoryTypeNumber) {
|
||||
// MUST BE ARRAY!
|
||||
$iteminfo = [];
|
||||
if (!$saleItems) {
|
||||
$shopItems = $db->ofetchAll("select * from items inner join trade_offers on id = shop_item_id where shop_id = 1 and shop_item_quantity !=0");
|
||||
$shopItems = DBPDO::$db->ofetchAll("select * from items inner join trade_offers on id = shop_item_id where shop_id = 1 and shop_item_quantity !=0");
|
||||
foreach ($shopItems as $shopItemObject) {
|
||||
$iteminfo[] = new ShopItem($shopItemObject, 'buyshop');
|
||||
}
|
||||
} else {
|
||||
$inventoryItems = $db->ofetchall("select * from inventory where on_sale = 0 and dressed_slot = 0 and durability > 0 and owner_id = ?", $user->getId());
|
||||
$inventoryItems = DBPDO::$db->ofetchall("select * from inventory where on_sale = 0 and dressed_slot = 0 and durability > 0 and owner_id = ?", $user->getId());
|
||||
foreach ($inventoryItems as $inventoryItemObject) {
|
||||
$iteminfo[] = new ShopItem($inventoryItemObject, 'sellshop');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user