Убираем сломанную сортировку
This commit is contained in:
parent
f201934dc4
commit
fb97d70add
30
shop.php
30
shop.php
@ -16,18 +16,13 @@ if ($user['battle'] != 0) {
|
||||
die();
|
||||
}
|
||||
|
||||
if ($_GET['sort'] == 1) {
|
||||
$_SESSION['type_sort'] = 1;
|
||||
} elseif ($_GET['sort'] == 2) {
|
||||
$_SESSION['type_sort'] = 2;
|
||||
}
|
||||
|
||||
if ($_GET['sed']) {
|
||||
$dress = mysql_fetch_array(mysql_query("SELECT `id`, `name`, `cost`, `type`, `duration`, `maxdur`, `goden`, `dategoden`, `koll` FROM `inventory` WHERE `dressed` = 0 AND `id` = '" . (int)$_GET['sed'] . "' AND `owner` = '{$user['id']}' LIMIT 1"));
|
||||
$price = $dress['cost'] * 1;
|
||||
$kols = '';
|
||||
if ($dress['koll']) {
|
||||
$price * $dress['koll'];
|
||||
$price *= $dress['koll'];
|
||||
$kols = '(x' . $dress['koll'] . ')';
|
||||
}
|
||||
destructitem($dress['id']);
|
||||
@ -145,15 +140,6 @@ $itemWeight = db::c()->query('SELECT sum(`massa`) AS `m` FROM `inventory` WHERE
|
||||
input.value = input.value.replace(/[^\d]/g, '');
|
||||
}
|
||||
|
||||
function check(val) {
|
||||
var otdel = '<?=$_GET['otdel'];?>';
|
||||
if (val == 0) {
|
||||
location.href = 'shop.php?otdel=' + otdel + '&sort=1';
|
||||
} else if (val == 1) {
|
||||
location.href = 'shop.php?otdel=' + otdel + '&sort=2';
|
||||
}
|
||||
}
|
||||
|
||||
function leave() {
|
||||
top.frames['main'].location = 'city.php?cp'
|
||||
}
|
||||
@ -233,20 +219,6 @@ $itemWeight = db::c()->query('SELECT sum(`massa`) AS `m` FROM `inventory` WHERE
|
||||
break;
|
||||
}
|
||||
?>"
|
||||
<span style="float: right; padding-right: 15px;">
|
||||
<label>
|
||||
<select style="width: 215px;" onchange="check(this.selectedIndex);">
|
||||
<option value="1" <?php if ($_SESSION['type_sort'] == 1) {
|
||||
echo "selected='selected'";
|
||||
} ?>
|
||||
onclick="location.href='shop.php?razdel=<?= $_GET['otdel']; ?>&sort=1';">Показывать все вещи</option>
|
||||
<option value="2" <?php if ($_SESSION['type_sort'] == 2) {
|
||||
echo "selected='selected'";
|
||||
} ?>
|
||||
onclick="location.href='shop.php?razdel=<?= $_GET['otdel']; ?>&sort=2';">Показывать вещи только моего уровня</option>
|
||||
</select>
|
||||
</label>
|
||||
</span>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
|
Loading…
Reference in New Issue
Block a user