Ремонт переехал на новый лад.
This commit is contained in:
parent
c59a309a43
commit
b96f0eea92
29
repair.php
29
repair.php
@ -23,7 +23,7 @@ if ($_GET['rep'] && ($_GET['sid'] == 2)) {
|
||||
mysql_query("UPDATE `inventory` SET `text` = '' WHERE `owner` = '{$user['id']}' AND `dressed` = 0 AND `id` = '" . (int)$_GET['rep'] . "' LIMIT 1");
|
||||
}
|
||||
|
||||
// Полный ремонт
|
||||
// Ремонт
|
||||
if ($_GET['sid'] && $_GET['rep']) {
|
||||
$row = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `isrep` = 1 AND `owner` = '{$user['id']}' AND `dressed` = 0 AND `id` = '{$_GET['rep']}' AND `setsale`=0 LIMIT 1;"));
|
||||
$full = $row['duration'];
|
||||
@ -47,8 +47,8 @@ if ($_GET['sid'] && $_GET['rep']) {
|
||||
}
|
||||
|
||||
if (input::post('goto') == 'remont') {
|
||||
$data = db::c()->query('SELECT * FROM `inventory` WHERE `type` < 12 AND `dressed` = 0 AND `isrep` = 1 AND `setsale` = 0 AND `duration` > 0 AND `owner` = ?i ORDER BY `update` DESC', $_SESSION['uid']);
|
||||
$onecost = 0.1;
|
||||
$remont_query = db::c()->query('SELECT * FROM `inventory` WHERE `type` < 12 AND `dressed` = 0 AND `isrep` = 1 AND `setsale` = 0 AND `duration` > 0 AND `owner` = ?i ORDER BY `update` DESC', $_SESSION['uid']);
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@ -117,7 +117,7 @@ if (input::post('goto') == 'remont') {
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php if (input::post('goto') == 'remont'):
|
||||
while ($row = $data->fetch_assoc()): ?>
|
||||
while ($row = $remont_query->fetch_assoc()): ?>
|
||||
<div class="appblock">
|
||||
<span class="legend"><?= $row['name'] ?></span>
|
||||
<div style="text-align: center">
|
||||
@ -136,27 +136,6 @@ if (input::post('goto') == 'remont') {
|
||||
<TABLE width=100% bgcolor="#A5A5A5">
|
||||
<TABLE WIDTH=100% BGCOLOR="#A5A5A5">
|
||||
<?php
|
||||
if (input::post('goto') == 'remont') {
|
||||
while ($row = $data->fetch_assoc()) {
|
||||
?>
|
||||
<TR>
|
||||
<TD align=center><IMG SRC="i/sh/<?= $row['img'] ?>">
|
||||
<BR>
|
||||
<small>
|
||||
<? if ($row['duration'] > 0) { ?>
|
||||
<A HREF="?rep=<?= $row['id'] ?>&sid=full">Ремонт
|
||||
за <?= round(($row['duration'] * $onecost), 2) ?> кр.</A><BR><? } else {
|
||||
echo "не нуждается в ремонте";
|
||||
} ?>
|
||||
</small>
|
||||
</TD>
|
||||
<?php
|
||||
echo "<TD valign=top>";
|
||||
showitem($row);
|
||||
echo "</TD></TR>";
|
||||
}
|
||||
}
|
||||
|
||||
if (input::post('goto') == 'gravirovka') {
|
||||
$data = db::c()->query('SELECT * FROM `inventory` WHERE `owner` = ?i AND `dressed` = 0 AND `type` = 3 AND `name` NOT LIKE "?S" AND `setsale`=0 ORDER by `update` DESC', $_SESSION['uid'], '%Букет%');
|
||||
while ($row = $data->fetch_assoc()) {
|
||||
|
Loading…
Reference in New Issue
Block a user