code clean
This commit is contained in:
parent
62ba2f4c73
commit
d30ffb335d
58
main.php
58
main.php
@ -949,7 +949,8 @@ if (input::get('edit')) {
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center><B>Рюкзак (масса : <?= $getItemsBonuses->getItemsWeight() .'/'. $showUser->strength * 4 ?>)</B>
|
||||
<td align=center><B>Рюкзак (масса
|
||||
: <?= $getItemsBonuses->getItemsWeight() . '/' . $showUser->strength * 4 ?>)</B>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -962,65 +963,24 @@ if (input::get('edit')) {
|
||||
</tr>
|
||||
<?php endif;
|
||||
if ($_SESSION['razdel'] == null) {
|
||||
$data = db::c()->query('SELECT `inventory`.*,
|
||||
`magic`.`name` AS `magic_name`,
|
||||
`magic`.`chanse` AS `magic_chanse`,
|
||||
`magic`.`time` AS `magic_time`,
|
||||
`magic`.`file` AS `magic_file`,
|
||||
`magic`.`targeted` AS `magic_targeted`,
|
||||
`magic`.`needcharge` AS `magic_needcharge`,
|
||||
`magic`.`img` AS `magic_img` FROM `inventory` LEFT JOIN `magic` ON `magic` = `magic`.`id` WHERE `owner` = ?i AND `dressed` = 0 AND (`type` < 12 OR `type` = 22 OR `type` = 23 OR `type` = 24) AND `setsale` = 0 ORDER BY `update` DESC', $user['id']);
|
||||
$data_query = 'SELECT * FROM inventory WHERE owner = ?i AND dressed = 0 AND ( type < 12 OR type = 22 OR type = 23 OR type = 24 ) AND setsale = 0';
|
||||
}
|
||||
if ($_SESSION['razdel'] == 1) {
|
||||
$data = db::c()->query('SELECT `inventory`.*,
|
||||
`magic`.`name` AS `magic_name`,
|
||||
`magic`.`chanse` AS `magic_chanse`,
|
||||
`magic`.`time` AS `magic_time`,
|
||||
`magic`.`file` AS `magic_file`,
|
||||
`magic`.`targeted` AS `magic_targeted`,
|
||||
`magic`.`needcharge` AS `magic_needcharge`,
|
||||
`magic`.`img` AS `magic_img` FROM `inventory` LEFT JOIN `magic` ON `magic` = `magic`.`id` WHERE `owner` = ?i AND `dressed` = 0 AND `type` = 12 AND `setsale` = 0 ORDER BY `update` DESC', $user['id']);
|
||||
$data_query = 'SELECT * FROM inventory WHERE owner = ?i AND dressed = 0 AND type = 12 AND setsale = 0';
|
||||
}
|
||||
if ($_SESSION['razdel'] == 2) {
|
||||
$data = db::c()->query('SELECT `inventory`.*,
|
||||
`magic`.`name` AS `magic_name`,
|
||||
`magic`.`chanse` AS `magic_chanse`,
|
||||
`magic`.`time` AS `magic_time`,
|
||||
`magic`.`file` AS `magic_file`,
|
||||
`magic`.`targeted` AS `magic_targeted`,
|
||||
`magic`.`needcharge` AS `magic_needcharge`,
|
||||
`magic`.`img` AS `magic_img` FROM `inventory` LEFT JOIN `magic` ON `magic` = `magic`.`id` WHERE `owner` = ?i AND `dressed` = 0 AND (`type` > 12 OR `type` != 22 OR `type` != 23 OR `type` != 24) AND `setsale` = 0 ORDER BY `update` DESC', $user['id']);
|
||||
$data_query = 'SELECT * FROM inventory WHERE owner = ?i AND dressed = 0 AND (type > 12 OR type != 22 OR type != 23 OR type != 24) AND setsale = 0';
|
||||
}
|
||||
if ($_SESSION['razdel'] == 3) {
|
||||
$data = db::c()->query('SELECT `inventory`.*,
|
||||
`magic`.`name` AS `magic_name`,
|
||||
`magic`.`chanse` AS `magic_chanse`,
|
||||
`magic`.`time` AS `magic_time`,
|
||||
`magic`.`file` AS `magic_file`,
|
||||
`magic`.`targeted` AS `magic_targeted`,
|
||||
`magic`.`needcharge` AS `magic_needcharge`,
|
||||
`magic`.`img` AS `magic_img` FROM `inventory` LEFT JOIN `magic` ON `magic` = `magic`.`id` WHERE `owner` = ?i AND `dressed` = 0 AND `type` >= 80 AND `type` <= 89 AND `setsale` = 0 ORDER BY `update` ASC', $user['id']);
|
||||
$data_query = 'SELECT * FROM inventory WHERE owner = ?i AND dressed = 0 AND type >= 80 AND type <= 89 AND setsale = 0';
|
||||
}
|
||||
if ($_SESSION['razdel'] == 4) {
|
||||
$data = db::c()->query('SELECT `inventory`.*,
|
||||
`magic`.`name` AS `magic_name`,
|
||||
`magic`.`chanse` AS `magic_chanse`,
|
||||
`magic`.`time` AS `magic_time`,
|
||||
`magic`.`file` AS `magic_file`,
|
||||
`magic`.`targeted` AS `magic_targeted`,
|
||||
`magic`.`needcharge` AS `magic_needcharge`,
|
||||
`magic`.`img` AS `magic_img` FROM `inventory` LEFT JOIN `magic` ON `magic` = `magic`.`id` WHERE `owner` = ?i AND `dressed` = 0 AND `type` = 200 AND `setsale` = 0 ORDER BY `update` ASC', $user['id']);
|
||||
$data_query = 'SELECT * FROM inventory WHERE owner = ?i AND dressed = 0 AND type = 200 AND setsale = 0';
|
||||
}
|
||||
if ($_SESSION['razdel'] == 5) {
|
||||
$data = db::c()->query('SELECT `inventory`.*,
|
||||
`magic`.`name` AS `magic_name`,
|
||||
`magic`.`chanse` AS `magic_chanse`,
|
||||
`magic`.`time` AS `magic_time`,
|
||||
`magic`.`file` AS `magic_file`,
|
||||
`magic`.`targeted` AS `magic_targeted`,
|
||||
`magic`.`needcharge` AS `magic_needcharge`,
|
||||
`magic`.`img` AS `magic_img` FROM `inventory` LEFT JOIN `magic` ON `magic` = `magic`.`id` WHERE `owner` = ?i AND `dressed` = 0 AND `type` = 199 AND `setsale` = 0 ORDER BY `update` ASC', $user['id']);
|
||||
$data_query = 'SELECT * FROM inventory WHERE owner = ?i AND dressed = 0 AND type = 199 AND setsale = 0';
|
||||
}
|
||||
$data = db::c()->query($data_query, $_SESSION['uid']);
|
||||
|
||||
$groupNum = [];
|
||||
$viewInventory = [];
|
||||
|
Loading…
Reference in New Issue
Block a user