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}
|
|
|
|
|
2019-01-12 09:34:24 +00:00
|
|
|
$iteminfo =[];
|
2019-01-14 13:46:20 +00:00
|
|
|
$result = db::c()->query('SELECT `shop`.*,
|
|
|
|
`magic`.`name` AS `magic_name`,
|
|
|
|
`magic`.`chanse` AS `magic_chanse`,
|
|
|
|
`magic`.`time` AS `magic_time`,
|
|
|
|
`magic`.`file` AS `magic_file`,
|
|
|
|
`magic`.`targeted` AS `magic_targeted`,
|
|
|
|
`magic`.`needcharge` AS `magic_needcharge`,
|
|
|
|
`magic`.`img` AS `magic_img`
|
|
|
|
|
|
|
|
FROM `shop` LEFT JOIN `magic` ON `magic` = `magic`.`id` WHERE count > 0 LIMIT 25');
|
2019-01-14 15:40:01 +00:00
|
|
|
$result2 = db::c()->query('SELECT `inventory`.*,
|
|
|
|
`magic`.`name` AS `magic_name`,
|
|
|
|
`magic`.`chanse` AS `magic_chanse`,
|
|
|
|
`magic`.`time` AS `magic_time`,
|
|
|
|
`magic`.`file` AS `magic_file`,
|
|
|
|
`magic`.`targeted` AS `magic_targeted`,
|
|
|
|
`magic`.`needcharge` AS `magic_needcharge`,
|
|
|
|
`magic`.`img` AS `magic_img` FROM `inventory` LEFT JOIN `magic` ON `magic` = `magic`.`id` WHERE owner = 11263');
|
2019-01-11 16:20:07 +00:00
|
|
|
while ($row = $result->fetch_assoc()) {
|
2019-01-11 20:26:10 +00:00
|
|
|
$iteminfo[] = new ShopItem($row);
|
2019-01-11 16:20:07 +00:00
|
|
|
}
|
|
|
|
|
2019-01-14 14:56:24 +00:00
|
|
|
while ($row = $result2->fetch_assoc()) {
|
|
|
|
$iteminfo[] = new InventoryItem($row);
|
|
|
|
}
|
2019-01-11 21:57:15 +00:00
|
|
|
|
2019-01-12 09:34:24 +00:00
|
|
|
echo "<table width='100%'>";
|
2019-01-11 19:16:39 +00:00
|
|
|
foreach ($iteminfo as $ii) {
|
2019-01-11 16:54:14 +00:00
|
|
|
echo "<tr><td bgcolor='#d3d3d3'>";
|
2019-01-11 19:16:39 +00:00
|
|
|
$ii->printImage();
|
2019-01-11 20:26:10 +00:00
|
|
|
$ii->printControls();
|
2019-01-11 16:47:16 +00:00
|
|
|
echo "</td>";
|
2019-01-11 16:54:14 +00:00
|
|
|
echo "<td bgcolor='#d3d3d3'>";
|
2019-01-11 20:27:20 +00:00
|
|
|
$ii->printInfo();
|
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>";
|