Стоимость продажи 10% от цены минус цена за повреждения.
This commit is contained in:
parent
8efc054436
commit
da286487ed
8
shop.php
8
shop.php
@ -180,7 +180,7 @@ $shopCategoryType = empty($_POST['sale']) ?: $_POST['sale'];
|
|||||||
$shopCategoryTypeNumber = empty($_GET['otdel']) ?: $_GET['otdel'];
|
$shopCategoryTypeNumber = empty($_GET['otdel']) ?: $_GET['otdel'];
|
||||||
switch ($shopCategoryTypeNumber) {
|
switch ($shopCategoryTypeNumber) {
|
||||||
default:
|
default:
|
||||||
$shopCategoryType = "Скупка товара";
|
$shopCategoryType = "Предметы в инвентаре";
|
||||||
$saleItems = true;
|
$saleItems = true;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
@ -288,6 +288,7 @@ switch ($shopCategoryTypeNumber) {
|
|||||||
<TR>
|
<TR>
|
||||||
<TD align=center>
|
<TD align=center>
|
||||||
<h3><?= $shopCategoryType ?></h3>
|
<h3><?= $shopCategoryType ?></h3>
|
||||||
|
Вы можете продать ваши предметы за 10% от стоимости.
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
<TR>
|
<TR>
|
||||||
@ -299,7 +300,7 @@ switch ($shopCategoryTypeNumber) {
|
|||||||
$data = db::c()->query('SELECT * FROM `inventory` WHERE `owner` = ?i AND `dressed` = 0 AND `setsale` = 0 AND `cost` > 0 AND `present` = "?s" AND `tradesale` = 0 AND `podzem` = 0 ORDER BY `update` DESC', $user['id'], null);
|
$data = db::c()->query('SELECT * FROM `inventory` WHERE `owner` = ?i AND `dressed` = 0 AND `setsale` = 0 AND `cost` > 0 AND `present` = "?s" AND `tradesale` = 0 AND `podzem` = 0 ORDER BY `update` DESC', $user['id'], null);
|
||||||
while ($row = $data->fetch_assoc()) {
|
while ($row = $data->fetch_assoc()) {
|
||||||
$row['count'] = 1;
|
$row['count'] = 1;
|
||||||
$price = $row['cost'] * 1;
|
$price = $row['cost'] * 0.1;
|
||||||
if ($row['koll']) {
|
if ($row['koll']) {
|
||||||
$price *= $row['koll'];
|
$price *= $row['koll'];
|
||||||
}
|
}
|
||||||
@ -358,8 +359,7 @@ switch ($shopCategoryTypeNumber) {
|
|||||||
<B>Масса всех ваших вещей: <?= $itemWeight['m'] ?>/<?= get_meshok() ?>
|
<B>Масса всех ваших вещей: <?= $itemWeight['m'] ?>/<?= get_meshok() ?>
|
||||||
<BR>У вас в наличии: <span style="color: #339900;"><?= $user['money'] ?></span> кр.</B>
|
<BR>У вас в наличии: <span style="color: #339900;"><?= $user['money'] ?></span> кр.</B>
|
||||||
<hr>
|
<hr>
|
||||||
<INPUT TYPE="submit" value="Продать вещи" name="sale"><BR><br/>
|
<a href="shop.php?otdel=sale&rnd=<?= mt_rand() ?>">Продать вещи</a>
|
||||||
<a href="shop.php?otdel=sale&rnd=<?= mt_rand() ?>">Продажа товаров</a>
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><b>Оружие:</b></dt>
|
<dt><b>Оружие:</b></dt>
|
||||||
<dd><a href="shop.php?otdel=1&rnd=<?= mt_rand() ?>">кастеты,ножи</a></dd>
|
<dd><a href="shop.php?otdel=1&rnd=<?= mt_rand() ?>">кастеты,ножи</a></dd>
|
||||||
|
Loading…
Reference in New Issue
Block a user