Правка запросов в showinf_pers()

This commit is contained in:
lopar 2018-01-29 16:29:29 +02:00
parent 51fca79288
commit 37d20bcf2d

View File

@ -1922,7 +1922,7 @@ function nick3($id)
function ClanImage($clan_id)
{
$clanimg = mysql_fetch_assoc(mysql_query("SELECT `short` FROM `clans` WHERE `id` = '{$clan_id}' LIMIT 1"));
$clanimg = db::c()->query('SELECT `short` FROM `clans` WHERE `id` = ?i ', $clan_id)->fetch_assoc()
if ($clanimg['short']) {
$clanimg = $clanimg['short'];
} else {
@ -2374,7 +2374,7 @@ function showinf_pers($id, $pas = 0, $battle = 0, $me = 0, $main = false) //FIXM
$r .= '</td></tr><tr><td>';
if ($user['weap'] > 0) {
$dress = db::c()->query('SELECT `name`, `img`, `duration`, `maxdur`, `ghp`, `gsila`, `glovk`, `ginta`, `gintel`, `text`, `bron1`, `bron2`, `bron3`, `bron4`, `includemagicdex` FROM `inventory` WHERE `id` = ?i', $user['weap'])->fetch_assoc();
$dress = db::c()->query('SELECT `minu`, `maxu`, `name`, `img`, `duration`, `maxdur`, `ghp`, `gsila`, `glovk`, `ginta`, `gintel`, `text`, `bron1`, `bron2`, `bron3`, `bron4`, `includemagicdex` FROM `inventory` WHERE `id` = ?i', $user['weap'])->fetch_assoc();
if ($dress['includemagicdex'] && (!$pas || ($battle && $me))) {
$r .= showhrefmagic($dress);
} else {
@ -4465,12 +4465,12 @@ function showpersinv($id)
function show_rune($slot, $uid, $type = 0)
{
global $user, $runes_exp;
$us = mysql_fetch_array(mysql_query('SELECT `id`, `rune_1`, `rune_2`, `rune_3` FROM `users` WHERE `id` = "' . $uid . '" LIMIT 1'));
$us = db::c()->query('SELECT `id`, `rune_1`, `rune_2`, `rune_3` FROM `users` WHERE `id` = ?i', $uid)->fetch_assoc();
if (isset($us['id'])) {
if ($us['rune_' . $slot] > 0) {
$ruid = $us['rune_' . $slot];
$rtype = (23 + $slot);
$dress = mysql_fetch_array(mysql_query('SELECT `id`, `img`, `name`, `duration`, `maxdur`, `rune_level`, `rune_exp` FROM `inventory` WHERE `id` = "' . $ruid . '" AND `owner` = "' . $us['id'] . '" LIMIT 1'));
$dress = db::c()->query('SELECT `id`, `img`, `name`, `duration`, `maxdur`, `rune_level`, `rune_exp` FROM `inventory` WHERE `id` = ?i AND `owner` = ?i', $ruid, $us['id'])->fetch_assoc();
if (isset($dress['id'])) {
if ($us['id'] == $user['id'] && $type == 1) {
$r = '<a href=\'main.php?edit=1&drop=' . $rtype . '\'><img class=\'tooltip\' src="i/sh/' . $dress['img'] . '" width="30" height="30" title="Снять <b>' . $dress['name'] . '</b><br />Уровень: ' . $dress['rune_level'] . '<br />Опыт: ' . $dress['rune_exp'] . '/' . $runes_exp[$dress['rune_level'] + 1] . '<br />Прочность: ' . $dress['duration'] . '/' . $dress['maxdur'] . '" /></a>';