moving to imgclass

This commit is contained in:
Igor Barkov [iwork] 2019-01-16 18:26:16 +02:00
parent cb29429a2a
commit 813a741b2a
2 changed files with 20 additions and 11 deletions

View File

@ -43,4 +43,9 @@ NAME;
onclick="location='/admin.php'"> onclick="location='/admin.php'">
BTN; BTN;
} }
public function getId()
{
return $this->id;
}
} }

View File

@ -64,6 +64,10 @@ if ($_SESSION['receiverName']) {
`magic`.`targeted` AS `magic_targeted`, `magic`.`targeted` AS `magic_targeted`,
`magic`.`needcharge` AS `magic_needcharge`, `magic`.`needcharge` AS `magic_needcharge`,
`magic`.`img` AS `magic_img` FROM `inventory` LEFT JOIN `magic` ON `magic` = `magic`.`id` WHERE `owner` = ?i AND `dressed` = 0 AND `setsale` = 0 AND `present` = "?s" AND `artefact` = 0 ORDER BY `update` DESC', $_SESSION['uid'], null); `magic`.`img` AS `magic_img` FROM `inventory` LEFT JOIN `magic` ON `magic` = `magic`.`id` WHERE `owner` = ?i AND `dressed` = 0 AND `setsale` = 0 AND `present` = "?s" AND `artefact` = 0 ORDER BY `update` DESC', $_SESSION['uid'], null);
$iteminfo = [];
while ($row = $queryItems->fetch_assoc()) {
$iteminfo[] = new InventoryItem($row);
}
} }
} }
?> ?>
@ -107,22 +111,22 @@ if ($_SESSION['receiverName']) {
<td valign=top align=right> <td valign=top align=right>
<table class="zebra" WIDTH=100%"> <table class="zebra" WIDTH=100%">
<th colspan="2">Передача предметов</th> <th colspan="2">Передача предметов</th>
<?php while ($row = $queryItems->fetch_assoc()): ?> <?php foreach ($iteminfo as $ii): ?>
<tr> <tr>
<td align=center> <td bgcolor='#d3d3d3'>
<img src="i/sh/<?= $row['img'] ?>"><br> <?php $ii->printImage(); ?>
<form method="post"> <form method="post">
<input type="hidden" name="action" value="sendItem"> <input type="hidden" name="action" value="sendItem">
<input type="hidden" name="item_id" value="<?= $row['id'] ?>"> <input type="hidden" name="item_id" value="<?= $ii->getId() ?>">
<input type="submit" value="Передать за 1кр."> <input type="submit" value="Передать за 1кр.">
</form> </form>
</td> </td>
<td valign=top> <td bgcolor='#d3d3d3'>
<?php showitem($row, '','',true); ?> <?php $ii->printInfo(); ?>
</td> </td>
</tr> </tr>
<?php endwhile ?> <?php endforeach; ?>
<?php if ($queryItems->getNumRows() == 0): ?> <?php if (empty($queryItems->getNumRows())): ?>
<tr> <tr>
<td align=center bgcolor=#C7C7C7>Нечего передавать...</td> <td align=center bgcolor=#C7C7C7>Нечего передавать...</td>
</tr> </tr>