damned selling items

This commit is contained in:
lopar 2019-01-14 23:08:02 +02:00
parent 0437d6c4a1
commit 0393614719
1 changed files with 2 additions and 13 deletions

View File

@ -120,15 +120,13 @@ if ($sellItemId) {
}
$allcost = mt_rand(0,$dress['cost']/2);
#destructitem($dress['id']);
db::c()->query('DELETE FROM `inventory` WHERE `id` = ?i', $dress['id']);
db::c()->query('UPDATE `users` SET `money` = ?i WHERE `id` = ?i', $allcost, $_SESSION['uid']);
$status = "Вы продали «{$dress['name']}» $kols за " . $allcost . " кр.";
$deloText = "{$user['login']} продал товар «{$dress['name']}»{$kols}id:({$dress['id']}) в магазине за {$allcost} кр.";
addToDelo($deloText);
// Для обновления данных о деньгах на странице
$user['money'] -= $allcost;
}
if (!empty($_GET['buy'])) {
@ -214,12 +212,6 @@ if (!empty($_GET['buy'])) {
<script src="js/mi.js"></script>
<link rel="stylesheet" href="css/bkstyle.css?101"/>
<link rel="stylesheet" href="css/mi.css"/>
<style>
.row {
font-family: Tahoma, sans-serif;
font-size: 13px;
}
</style>
<script>
function leave() {
top.frames['main'].location = 'city.php?cp'
@ -248,7 +240,6 @@ if (!empty($_GET['buy'])) {
<TABLE class="zebra" WIDTH=100% CELLSPACING="1" CELLPADDING="2" BGCOLOR="#A5A5A5">
<?php
if ($saleItems == true) {
foreach ($iteminfo as $ii) {
echo "<tr><td style='width: 150px; text-align: center;'>";
$ii->printImage();
@ -258,8 +249,6 @@ if (!empty($_GET['buy'])) {
$ii->printInfo();
echo "</td></tr>";
}
} else {
foreach ($iteminfo as $ii) {
echo "<tr><td style='width: 150px; text-align: center;'>";