Отображение предметов
This commit is contained in:
parent
2548e7c09c
commit
3deab714ff
@ -2720,8 +2720,8 @@ function showitem($row, $type = 0, $returned = false)
|
||||
destructitem($row['id']);
|
||||
}
|
||||
|
||||
$magic = magicinf($row['magic']);
|
||||
$incmagic = mysql_fetch_array(mysql_query('SELECT * FROM `magic` WHERE `id` = \'' . $row['includemagic'] . '\' LIMIT 1;'));
|
||||
$magic = db::c()->query('SELECT * FROM `magic` WHERE `id` = ?i', $row['magic'])->fetch_assoc();
|
||||
$incmagic = db::c()->query('SELECT * FROM `magic` WHERE `id` = ?i', $row['includemagic'])->fetch_assoc();
|
||||
$incmagic['name'] = $row['includemagicname'];
|
||||
$incmagic['cur'] = $row['includemagicdex'];
|
||||
$incmagic['max'] = $row['includemagicmax'];
|
||||
@ -3047,7 +3047,7 @@ function show_item($row, $txt, $place)
|
||||
$ntxt = "В инвентаре";
|
||||
if ($txt == "В сундук") $ntxt = "В сундуке";
|
||||
|
||||
$magic = magicinf($row['magic']);
|
||||
$magic = db::c()->query('SELECT * FROM `magic` WHERE `id` = ?i', $$row['magic'])->fetch_assoc();
|
||||
$incmagic = mysql_fetch_array(mysql_query('SELECT * FROM `magic` WHERE `id` = \'' . $row['includemagic'] . '\' LIMIT 1'));
|
||||
$incmagic['name'] = $row['includemagicname'];
|
||||
$incmagic['cur'] = $row['includemagicdex'];
|
||||
@ -3291,7 +3291,7 @@ function show_item($row, $txt, $place)
|
||||
* @return array
|
||||
*/
|
||||
function magicinf($id)
|
||||
{
|
||||
{ //TODO Remove it!
|
||||
return db::c()->query('SELECT * FROM `magic` WHERE `id` = ?i', $id)->fetch_assoc();
|
||||
}
|
||||
|
||||
|
2
post.php
2
post.php
@ -42,7 +42,7 @@ if ($_SESSION['receiverName']) {
|
||||
db::c()->query('INSERT INTO `telegraph` (`receiver`,`text`) VALUES (?i,"?s")', $receiverId, $telegraphText);
|
||||
$statusMessage = 'Сообщение отправлено.';
|
||||
} else $statusMessage = 'Сообщение было оставлено пустым!';
|
||||
} else $statusMessage = 'Телеграф сломался!';
|
||||
}
|
||||
|
||||
if ($submit == 'sendItem' && $sendItemId && $user['money'] >= 1) {
|
||||
$res = db::c()->query('SELECT `id`,`name` FROM `inventory` WHERE `owner` = ?i AND `id` = ?i AND `dressed` = 0 AND `setsale` = 0 AND `present` = "?s" AND `artefact` = 0', $_SESSION['uid'], $sendItemId, null)->fetch_assoc();
|
||||
|
Loading…
Reference in New Issue
Block a user