notice fixes

This commit is contained in:
Igor Barkov [iwork] 2019-01-15 18:05:19 +02:00
parent 016e5a9ccd
commit e2ca31b543

126
ashop.php
View File

@ -24,7 +24,7 @@ $shopItems = db::c()->query('SELECT `ashop`.*,
`magic`.`needcharge` AS `magic_needcharge`, `magic`.`needcharge` AS `magic_needcharge`,
`magic`.`img` AS `magic_img` `magic`.`img` AS `magic_img`
FROM `ashop` LEFT JOIN `magic` ON `magic` = `magic`.`id` WHERE `count` > 0 AND `cost` > 0 AND `razdel` = ?i ORDER by `nlevel` ASC, `id` ASC', $_GET['otdel']); FROM `ashop` LEFT JOIN `magic` ON `magic` = `magic`.`id` WHERE `count` > 0 AND `ecost` > 0 AND `razdel` = ?i ORDER by `nlevel` ASC, `id` ASC', $_GET['otdel']);
$iteminfo = []; $iteminfo = [];
while ($row = $shopItems->fetch_assoc()) { while ($row = $shopItems->fetch_assoc()) {
@ -74,69 +74,65 @@ if (!empty($_GET['buy'])) {
} }
} }
$shopCategory = ''; $shopCategory = '';
if ($_REQUEST['compare'] && !$_REQUEST['common'] && !$_REQUEST['present']) { $shopCategoryTypeNumber = empty($_GET['otdel']) ?: $_GET['otdel'];
$shopCategory = "Составление подарочного букета"; switch ($shopCategoryTypeNumber) {
} else { default:
switch ($_GET['otdel']) { $shopCategory = "Кастеты и ножи";
default: break;
$shopCategory = "Кастеты и ножи"; case 1:
$_GET['otdel'] = 1; $shopCategory = "Кастеты и ножи";
break; break;
case 1: case 11:
$shopCategory = "Кастеты и ножи"; $shopCategory = "Топоры";
break; break;
case 11: case 12:
$shopCategory = "Топоры"; $shopCategory = "Дубины и булавы";
break; break;
case 12: case 13:
$shopCategory = "Дубины и булавы"; $shopCategory = "Мечи";
break; break;
case 13: case 14:
$shopCategory = "Мечи"; $shopCategory = "Луки и арбалеты";
break; break;
case 14: case 2:
$shopCategory = "Луки и арбалеты"; $shopCategory = "Сапоги";
break; break;
case 2: case 21:
$shopCategory = "Сапоги"; $shopCategory = "Перчатки";
break; break;
case 21: case 22:
$shopCategory = "Перчатки"; $shopCategory = "Легкая броня";
break; break;
case 22: case 23:
$shopCategory = "Легкая броня"; $shopCategory = "Тяжелая броня";
break; break;
case 23: case 24:
$shopCategory = "Тяжелая броня"; $shopCategory = "Шлемы";
break; break;
case 24: case 3:
$shopCategory = "Шлемы"; $shopCategory = "Щиты";
break; break;
case 3: case 4:
$shopCategory = "Щиты"; $shopCategory = "Серьги";
break; break;
case 4: case 41:
$shopCategory = "Серьги"; $shopCategory = "Ожерелья";
break; break;
case 41: case 42:
$shopCategory = "Ожерелья"; $shopCategory = "Кольца";
break; break;
case 42: case 5:
$shopCategory = "Кольца"; $shopCategory = "Заклинания: нейтральные";
break; break;
case 5: case 51:
$shopCategory = "Заклинания: нейтральные"; $shopCategory = "Заклинания: боевые и защитные";
break; break;
case 51: case 6:
$shopCategory = "Заклинания: боевые и защитные"; $shopCategory = "Амуниция";
break; break;
case 6: case 7:
$shopCategory = "Амуниция"; $shopCategory = "Букеты";
break; break;
case 7:
$shopCategory = "Букеты";
break;
}
} }
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
@ -197,7 +193,7 @@ if ($_REQUEST['compare'] && !$_REQUEST['common'] && !$_REQUEST['present']) {
<dd><a href="?otdel=5&rnd=<?= mt_rand() ?>">разные</a></dd> <dd><a href="?otdel=5&rnd=<?= mt_rand() ?>">разные</a></dd>
<dt><b>Разное:</b></dt> <dt><b>Разное:</b></dt>
<dd><a href="?otdel=6&rnd=<?= mt_rand() ?>">амуниция</a></dd> <dd><a href="?otdel=6&rnd=<?= mt_rand() ?>">амуниция</a></dd>
<dd><a href="?otdel=7rnd=<?= mt_rand() ?>">букеты</a></dd> <dd><a href="?otdel=7&rnd=<?= mt_rand() ?>">букеты</a></dd>
</dl> </dl>
</td> </td>
</tr> </tr>