battles/test.php

32 lines
896 B
PHP
Raw Normal View History

2019-01-11 16:20:07 +00:00
<?php
require_once 'config.php';
//include '../functions.php';
//showinf_pers(10736,1);
//showinf_pers(10736);
//// Получить все...
//$items = [];
//$res = db::c()->query('SELECT name,img,type,id FROM inventory WHERE owner = 11263 AND dressed = 1');
//foreach ($res->fetch_assoc() as $value) {
// $items[$value[0]] = $value;
//}
//print_r($items);
# $items = []; foreach(фетч того ебучего массива as $value) {$items[$value['id']] = $value}
$result = db::c()->query('SELECT * FROM `shop` WHERE count > 0');
while ($row = $result->fetch_assoc()) {
2019-01-11 16:26:33 +00:00
$iteminfo[] = new ItemClass($row);
2019-01-11 16:20:07 +00:00
}
2019-01-11 16:49:49 +00:00
echo "<table width='100%'><th colspan='2'>Товары магазина</th>";
2019-01-11 16:20:07 +00:00
foreach ($iteminfo as $iinfo) {
2019-01-11 16:49:49 +00:00
echo "<tr><td>";
2019-01-11 16:47:16 +00:00
$iinfo->printItemImage();
echo "</td>";
echo "<td>";
2019-01-11 16:20:07 +00:00
$iinfo->printItemStats();
2019-01-11 16:49:49 +00:00
echo "</td></tr>";
2019-01-11 16:20:07 +00:00
}
2019-01-11 16:49:49 +00:00
echo "</table>";