This commit is contained in:
Igor Barkov [iwork] 2018-12-27 16:57:52 +02:00
parent 8d34a55435
commit bcfee83be1

View File

@ -960,301 +960,309 @@ function showinf_pers($id, $pas = 0, $battle = 0, $me = 0, $main = false) //FIXM
$user['boots'] = 0;
$user['shadow'] = 'invis.gif';
}
$r .= '<center>';
$r .= ($user['align'] > 0 ? "<img src=\"/i/align_" . $user['align'] . ".gif\" />" : "") . ($user['klan'] != '' ? '<img title="' . ClanImage($user['klan']) . '" src="i/klan/' . ClanImage($user['klan']) . '.gif" />' : "") . "<b>$user[login]</b> [";
$r .= $user['level'];
$r .= "]<a href=\"inf.php?$user[id]\" target=\"_blank\"><img src=\"/i/inf.gif\" width=\"12\" height=\"11\" /></a>";
if ($user['block']) {
$r .= "<br /><font class=\"private\">Персонаж заблокирован</font>";
}
$r .= "<table cellspacing=0 cellpadding=0><tr><td colspan=3 width=100%>";
$r .= setHP2($user['hp'], $user['maxhp']);
$r .= '</td></tr>';
if (($user['level'] > 3) && !$pas && !$battle) {
$r .= '<tr><td colspan=3>';
$r .= echoscroll('m1');
$r .= echoscroll('m2');
$r .= echoscroll('m3');
$r .= echoscroll('m4');
$r .= echoscroll('m5');
$r .= '<br /></td></tr>';
$r .= '<tr><td colspan=3>';
$r .= echoscroll('m6') . '' . echoscroll('m7') . '' . echoscroll('m8') . '' . echoscroll('m9') . '' . echoscroll('m10');
$r .= '</td></tr>';
}
$r .= '<tr><td width=62 valign=top><table width=100% cellspacing=0 cellpadding=0><tr><td>';
if ($user['sergi'] > 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['sergi'])->fetch_assoc();
if ($dress['includemagicdex'] && (!$pas || ($battle && $me))) {
$r .= showhrefmagic($dress);
} else {
$r .= '<img class=\'tooltip\' ' . ((($dress['maxdur'] - 2) <= $dress['duration'] && $dress['duration'] > 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=60 height=20 title="<b>' . $dress['name'] . "</b><br />Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "<br />Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "<br />На серьгах выгравировано '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "<br />Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "<br />Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "<br />Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "<br />Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "<br />Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "<br />Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "<br />Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "<br />Броня ног: " . plusorminus($dress['bron4']) : "") . '" />';
}
} else {
$r .= '<img src="i/w1.gif" width="60" height="20" class="tooltip" title="Пустой слот Серьги" />';
}
$r .= '</td></tr><tr><td>';
if ($user['kulon'] > 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['kulon'])->fetch_assoc();
if ($dress['includemagicdex'] && (!$pas || ($battle && $me))) {
$r .= showhrefmagic($dress);
} else {
$r .= '<img class=\'tooltip\' ' . ((($dress['maxdur'] - 2) <= $dress['duration'] && $dress['duration'] > 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=60 height=20 title="<b>' . $dress['name'] . "</b><br />Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "<br />Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "<br />На ожерелье выгравировано '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "<br />Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "<br />Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "<br />Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "<br />Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "<br />Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "<br />Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "<br />Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "<br />Броня ног: " . plusorminus($dress['bron4']) : "") . '" />';
}
} else {
$r .= '<img src="i/w2.gif" width=60 height=20 class="tooltip" title="Пустой слот Ожерелье" />';
}
$r .= '</td></tr><tr><td>';
if ($user['weap'] > 0) {
$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 {
$r .= '<img class=\'tooltip\' ' . ((($dress['maxdur'] - 2) <= $dress['duration'] && $dress['duration'] > 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=60 height=60 title="<b>' . $dress['name'] . "</b><br />Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "<br />Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['minu'] > 0) ? "<br />Урон {$dress['minu']}-{$dress['maxu']}" : "") . (($dress['text'] != null) ? "<br />На оружии выгравировано '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "<br />Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "<br />Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "<br />Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "<br />Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "<br />Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "<br />Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "<br />Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "<br />Броня ног: " . plusorminus($dress['bron4']) : "") . '" />';
}
} else {
$r .= '<img class=\'tooltip\' src="i/w3.gif" width=60 height=60 title="Пустой слот Оружие" />';
}
$r .= '</td></tr><tr><td>';
if ($user['bron'] > 0 || $user['rybax'] > 0 || $user['plaw'] > 0) {
$title = '';
$d = '';
if ($user['plaw']) {
$d = $user['plaw'];
if ($user['bron']) {
$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['bron'])->fetch_assoc();
$title .= '<br />--------------------<br /><b>' . $dress['name'] . '</b><br />Прочность ' . $dress['duration'] . '/' . $dress['maxdur'] . '' . (($dress['ghp'] > 0) ? '<br />Уровень жизни ' . plusorminus($dress['ghp']) : '') . (($dress['text'] != null) ? '<br />На одежде вышито ' . $dress['text'] . '' : '') . (($dress['gsila'] != 0) ? '<br />Сила ' . plusorminus($dress['gsila']) . '' : '') . (($dress['glovk'] != 0) ? '<br />Ловкость ' . plusorminus($dress['glovk']) . '' : '') . (($dress['ginta'] != 0) ? '<br />Интуиция ' . plusorminus($dress['ginta']) . '' : '') . (($dress['gintel'] != 0) ? '<br />Интеллект ' . plusorminus($dress['gintel']) . '' : '') . (($dress['bron1'] != 0) ? '<br />Броня головы: ' . plusorminus($dress['bron1']) . '' : '') . (($dress['bron2'] != 0) ? '<br />Броня корпуса: ' . plusorminus($dress['bron2']) . '' : '') . (($dress['bron3'] != 0) ? '<br />Броня пояса: ' . plusorminus($dress['bron3']) . '' : '') . (($dress['bron4'] != 0) ? '<br />Броня ног: ' . plusorminus($dress['bron4']) . '' : '') . '';
}
if ($user['rybax']) {
$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['rybax'])->fetch_assoc();
$title .= '<br />--------------------<br /><b>' . $dress['name'] . '</b><br />Прочность ' . $dress['duration'] . '/' . $dress['maxdur'] . '' . (($dress['ghp'] > 0) ? '<br />Уровень жизни ' . plusorminus($dress['ghp']) : '') . (($dress['text'] != null) ? '<br />На одежде вышито ' . $dress['text'] . '' : '') . (($dress['gsila'] != 0) ? '<br />Сила ' . plusorminus($dress['gsila']) . '' : '') . (($dress['glovk'] != 0) ? '<br />Ловкость ' . plusorminus($dress['glovk']) . '' : '') . (($dress['ginta'] != 0) ? '<br />Интуиция ' . plusorminus($dress['ginta']) . '' : '') . (($dress['gintel'] != 0) ? '<br />Интеллект ' . plusorminus($dress['gintel']) . '' : '') . (($dress['bron1'] != 0) ? '<br />Броня головы: ' . plusorminus($dress['bron1']) . '' : '') . (($dress['bron2'] != 0) ? '<br />Броня корпуса: ' . plusorminus($dress['bron2']) . '' : '') . (($dress['bron3'] != 0) ? '<br />Броня пояса: ' . plusorminus($dress['bron3']) . '' : '') . (($dress['bron4'] != 0) ? '<br />Броня ног: ' . plusorminus($dress['bron4']) . '' : '') . '';
}
} elseif ($user['bron']) {
$d = $user['bron'];
if ($user['rybax']) {
$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['rybax'])->fetch_assoc();
$title .= "<br />--------------------<br /><b>$dress[name]</b><br />Прочность $dress[duration]/$dress[maxdur]" . (($dress['ghp'] > 0) ? "<br />Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "<br />На одежде вышито '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "<br />Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "<br />Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "<br />Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "<br />Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "<br />Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "<br />Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "<br />Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "<br />Броня ног: " . plusorminus($dress['bron4']) : "") . '"';
}
} elseif ($user['rybax']) {
$d = $user['rybax'];
}
if ($main == true) {
$title = '';
}
$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', $d)->fetch_assoc();
if ($dress['includemagicdex'] && (!$pas || ($battle && $me))) {
$r .= showhrefmagic($dress);
} else {
$r .= '<img class=\'tooltip\' ' . ((($dress['maxdur'] - 2) <= $dress['duration'] && $dress['duration'] > 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=60 height=80 title="<b>' . $dress['name'] . "</b><br />Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "<br />Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "<br />На одежде вышито '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "<br />Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "<br />Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "<br />Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "<br />Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "<br />Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "<br />Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "<br />Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "<br />Броня ног: " . plusorminus($dress['bron4']) : "") . '' . $title . '" />';
}
} else {
$r .= '<img class=\'tooltip\' src="i/w4.gif" width=60 height=80 title="Пустой слот Броня" />';
}
$r .= '</td></tr><tr><td><table cellspacing=0 cellpadding=0><tr><td>';
if ($user['r1'] > 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['r1'])->fetch_assoc();
if ($dress['includemagicdex'] && (!$pas || ($battle && $me))) {
$r .= showhrefmagic($dress);
} else {
$r .= '<img class=\'tooltip\' ' . ((($dress['maxdur'] - 2) <= $dress['duration'] && $dress['duration'] > 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=20 height=20 title="<b>' . $dress['name'] . "</b><br />Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "<br />Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "<br />На кольце выгравировано '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "<br />Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "<br />Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "<br />Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "<br />Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "<br />Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "<br />Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "<br />Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "<br />Броня ног: " . plusorminus($dress['bron4']) : "") . '" />';
}
} else {
$r .= '<img class=\'tooltip\' src="i/w6.gif" width=20 height=20 title="Пустой слот Кольцо" />';
}
$r .= '</td><td>';
if ($user['r2'] > 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['r2'])->fetch_assoc();
if ($dress['includemagicdex'] && (!$pas || ($battle && $me))) {
$r .= showhrefmagic($dress);
} else {
$r .= '<img class=\'tooltip\' ' . ((($dress['maxdur'] - 2) <= $dress['duration'] && $dress['duration'] > 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=20 height=20 title="<b>' . $dress['name'] . "</b><br />Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "<br />Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "<br />На кольце выгравировано '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "<br />Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "<br />Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "<br />Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "<br />Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "<br />Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "<br />Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "<br />Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "<br />Броня ног: " . plusorminus($dress['bron4']) : "") . '" />';
}
} else {
$r .= '<img class=\'tooltip\' src="i/w6.gif" width=20 height=20 title="Пустой слот Кольцо" />';
}
$r .= '</td><td>';
if ($user['r3'] > 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['r3'])->fetch_assoc();
if ($dress['includemagicdex'] && (!$pas || ($battle && $me))) {
$r .= showhrefmagic($dress);
} else {
$r .= '<img class=\'tooltip\' ' . ((($dress['maxdur'] - 2) <= $dress['duration'] && $dress['duration'] > 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=20 height=20 title="<b>' . $dress['name'] . "</b><br />Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "<br />Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "<br />На кольце выгравировано '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "<br />Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "<br />Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "<br />Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "<br />Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "<br />Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "<br />Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "<br />Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "<br />Броня ног: " . plusorminus($dress['bron4']) : "") . '" />';
}
} else {
$r .= '<img class=\'tooltip\' src="i/w6.gif" width=20 height=20 title="Пустой слот Кольцо" />';
}
$r .= '</td></tr></table></td></tr></table></td>';
$r .= '<td valign=top><img src="i/shadow/' . $user['shadow'] . '" width="76" height="209" /></td><td width="62" valign=top><table width=100% cellspacing=0 cellpadding=0><tr><td>';
if ($user['helm'] > 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['helm'])->fetch_assoc();
if ($dress['includemagicdex'] && (!$pas || ($battle && $me))) {
$r .= showhrefmagic($dress);
} else {
$r .= '<img class=\'tooltip\' ' . ((($dress['maxdur'] - 2) <= $dress['duration'] && $dress['duration'] > 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=60 height=60 title="<b>' . $dress['name'] . "</b><br />Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "<br />Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "<br />На шлеме выгравировано '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "<br />Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "<br />Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "<br />Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "<br />Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "<br />Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "<br />Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "<br />Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "<br />Броня ног: " . plusorminus($dress['bron4']) : "") . '" />';
}
} else {
$r .= '<img class=\'tooltip\' src="i/w9.gif" width=60 height=60 title="Пустой слот Шлем" />';
}
$r .= '</td></tr><tr><td>';
if ($user['perchi'] > 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['perchi'])->fetch_assoc();
if ($dress['includemagicdex'] && (!$pas || ($battle && $me))) {
$r .= showhrefmagic($dress);
} else {
$r .= '<img class=\'tooltip\' ' . ((($dress['maxdur'] - 2) <= $dress['duration'] && $dress['duration'] > 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=60 height=40 title="<b>' . $dress['name'] . "</b><br />Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "<br />Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "<br />На перчатках выгравировано '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "<br />Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "<br />Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "<br />Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "<br />Интеллект " . plusorminus($dress['gintel']) : "") . '" />';
}
} else {
$r .= '<img class=\'tooltip\' src="i/w11.gif" width=60 height=40 alt="Пустой слот Перчатки" />';
}
$r .= '</td></tr><tr><td>';
if ($user['shit'] > 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['shit'])->fetch_assoc();
if ($dress['includemagicdex'] && (!$pas || ($battle && $me))) {
$r .= showhrefmagic($dress);
} else {
$r .= '<img class=\'tooltip\' ' . ((($dress['maxdur'] - 2) <= $dress['duration'] && $dress['duration'] > 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=60 height=60 title="<b>' . $dress['name'] . "</b><br />Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "<br />Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "<br />На щите выгравировано '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "<br />Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "<br />Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "<br />Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "<br />Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "<br />Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "<br />Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "<br />Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "<br />Броня ног: " . plusorminus($dress['bron4']) : "") . '" />';
}
} else {
$r .= '<img class=\'tooltip\' src="i/w10.gif" width=60 height=60 title="Пустой слот Щит" />';
}
$r .= '</td></tr><tr><td>';
if ($user['boots'] > 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['boots'])->fetch_assoc();
if ($dress['includemagicdex'] && (!$pas || ($battle && $me))) {
$r .= showhrefmagic($dress);
} else {
$r .= '<img class=\'tooltip\' ' . ((($dress['maxdur'] - 2) <= $dress['duration'] && $dress['duration'] > 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=60 height=40 title="<b>' . $dress['name'] . "</b><br />Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "<br />Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "<br />На ботинках выгравировано '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "<br />Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "<br />Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "<br />Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "<br />Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "<br />Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "<br />Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "<br />Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "<br />Броня ног: " . plusorminus($dress['bron4']) : "") . '" />';
}
} else {
$r .= '<img class=\'tooltip\' src="i/w12.gif" width=60 height=40 title="Пустой слот Oбувь" />';
}
if ($invis) {
$data['id'] = null;
$r = <<<HTML
<div style="margin: 0 auto;"><img src="i/shadow/0.gif" width="76" height="209" /></div>
HTML;
} else {
$data = db::c()->query('SELECT * FROM `online` WHERE `date` >= ?i AND `id` = ?i', time() - 60, $user['id'])->fetch_assoc();
}
$r .= '</td></tr></table></td></tr></table>';
$ru_1 = show_rune(1, $user['id']);
$ru_2 = show_rune(2, $user['id']);
$ru_3 = show_rune(3, $user['id']);
$r .= '<center>';
$r .= ($user['align'] > 0 ? "<img src=\"/i/align_" . $user['align'] . ".gif\" />" : "") . ($user['klan'] != '' ? '<img title="' . ClanImage($user['klan']) . '" src="i/klan/' . ClanImage($user['klan']) . '.gif" />' : "") . "<b>$user[login]</b> [";
$r .= $user['level'];
$r .= "]<a href=\"inf.php?$user[id]\" target=\"_blank\"><img src=\"/i/inf.gif\" width=\"12\" height=\"11\" /></a>";
$r .= '<table cellspacing="0" cellpadding="0" border="0" style="background: url(i/runes_slots.jpg) no-repeat center bottom;"><tbody><tr><td width="59" height="48" align="right">' . $ru_1 . '</td><td width="74" height="48" align="center">' . $ru_2 . '</td><td width="57" height="48" align="left">' . $ru_3 . '</td></tr></tbody></table></center>';
$r .= '<center><table cellPadding=0 cellSpacing=0 width="100%"><tbody>';
if ($user['block']) {
$r .= "<br /><font class=\"private\">Персонаж заблокирован</font>";
}
if (!$battle) {
if ($pas) {
$r .= '<tr><td align=middle colSpan=2><b><small>' . GAMEDOMAIN . '</small></b></td></tr><tr><td colSpan=2>';
$online = db::c()->query('SELECT `u`.*, `o`.`date`, `u`.*, `o`.`real_time` FROM `users` AS `u`, `online` AS `o` WHERE `u`.`id` = `o`.`id` AND `u`.`id` = ?i ', $user['id'])->fetch_assoc();
if ($invis) {
$invis = db::c()->query('SELECT `time` FROM `effects` WHERE `owner` = ?i AND `type` = 1022', $user['id'])->fetch_assoc();//FIXME Тип содержит число, невозможное в базе.
}
if ($invis > time()) {
$data['id'] = null;
$online['date'] -= 60 * 120 - ($invis - time());
}
$r .= "<table cellspacing=0 cellpadding=0><tr><td colspan=3 width=100%>";
$r .= setHP2($user['hp'], $user['maxhp']);
if ($data['id'] != null && $user['id'] != 326) {
if ($data['room'] > 500 && $data['room'] < 561) {
$rrm = 'Башня смерти, участвует в турнире';
} else {
$rrm = $rooms[$data['room']];
}
$r .= '<center>Персонаж сейчас находится в игре.<b>"' . $rrm . '"</b></center>';
$r .= '</td></tr>';
if (($user['level'] > 3) && !$pas && !$battle) {
$r .= '<tr><td colspan=3>';
$r .= echoscroll('m1');
$r .= echoscroll('m2');
$r .= echoscroll('m3');
$r .= echoscroll('m4');
$r .= echoscroll('m5');
$r .= '<br /></td></tr>';
$r .= '<tr><td colspan=3>';
$r .= echoscroll('m6') . '' . echoscroll('m7') . '' . echoscroll('m8') . '' . echoscroll('m9') . '' . echoscroll('m10');
$r .= '</td></tr>';
}
$r .= '<tr><td width=62 valign=top><table width=100% cellspacing=0 cellpadding=0><tr><td>';
if ($user['sergi'] > 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['sergi'])->fetch_assoc();
if ($dress['includemagicdex'] && (!$pas || ($battle && $me))) {
$r .= showhrefmagic($dress);
} else {
$r .= "<center>Персонаж не в игре.</center>";
$r .= '<img class=\'tooltip\' ' . ((($dress['maxdur'] - 2) <= $dress['duration'] && $dress['duration'] > 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=60 height=20 title="<b>' . $dress['name'] . "</b><br />Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "<br />Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "<br />На серьгах выгравировано '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "<br />Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "<br />Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "<br />Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "<br />Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "<br />Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "<br />Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "<br />Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "<br />Броня ног: " . plusorminus($dress['bron4']) : "") . '" />';
}
} else {
$r .= '<img src="i/w1.gif" width="60" height="20" class="tooltip" title="Пустой слот Серьги" />';
}
$r .= '</td></tr><tr><td>';
if ($user['kulon'] > 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['kulon'])->fetch_assoc();
if ($dress['includemagicdex'] && (!$pas || ($battle && $me))) {
$r .= showhrefmagic($dress);
} else {
$r .= '<img class=\'tooltip\' ' . ((($dress['maxdur'] - 2) <= $dress['duration'] && $dress['duration'] > 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=60 height=20 title="<b>' . $dress['name'] . "</b><br />Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "<br />Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "<br />На ожерелье выгравировано '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "<br />Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "<br />Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "<br />Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "<br />Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "<br />Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "<br />Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "<br />Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "<br />Броня ног: " . plusorminus($dress['bron4']) : "") . '" />';
}
} else {
$r .= '<img src="i/w2.gif" width=60 height=20 class="tooltip" title="Пустой слот Ожерелье" />';
}
$r .= '</td></tr><tr><td>';
if ($user['weap'] > 0) {
$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 {
$r .= '<img class=\'tooltip\' ' . ((($dress['maxdur'] - 2) <= $dress['duration'] && $dress['duration'] > 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=60 height=60 title="<b>' . $dress['name'] . "</b><br />Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "<br />Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['minu'] > 0) ? "<br />Урон {$dress['minu']}-{$dress['maxu']}" : "") . (($dress['text'] != null) ? "<br />На оружии выгравировано '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "<br />Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "<br />Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "<br />Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "<br />Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "<br />Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "<br />Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "<br />Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "<br />Броня ног: " . plusorminus($dress['bron4']) : "") . '" />';
}
} else {
$r .= '<img class=\'tooltip\' src="i/w3.gif" width=60 height=60 title="Пустой слот Оружие" />';
}
$r .= '</td></tr><tr><td>';
if ($user['bron'] > 0 || $user['rybax'] > 0 || $user['plaw'] > 0) {
$title = '';
$d = '';
if ($user['plaw']) {
$d = $user['plaw'];
if ($user['bron']) {
$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['bron'])->fetch_assoc();
$title .= '<br />--------------------<br /><b>' . $dress['name'] . '</b><br />Прочность ' . $dress['duration'] . '/' . $dress['maxdur'] . '' . (($dress['ghp'] > 0) ? '<br />Уровень жизни ' . plusorminus($dress['ghp']) : '') . (($dress['text'] != null) ? '<br />На одежде вышито ' . $dress['text'] . '' : '') . (($dress['gsila'] != 0) ? '<br />Сила ' . plusorminus($dress['gsila']) . '' : '') . (($dress['glovk'] != 0) ? '<br />Ловкость ' . plusorminus($dress['glovk']) . '' : '') . (($dress['ginta'] != 0) ? '<br />Интуиция ' . plusorminus($dress['ginta']) . '' : '') . (($dress['gintel'] != 0) ? '<br />Интеллект ' . plusorminus($dress['gintel']) . '' : '') . (($dress['bron1'] != 0) ? '<br />Броня головы: ' . plusorminus($dress['bron1']) . '' : '') . (($dress['bron2'] != 0) ? '<br />Броня корпуса: ' . plusorminus($dress['bron2']) . '' : '') . (($dress['bron3'] != 0) ? '<br />Броня пояса: ' . plusorminus($dress['bron3']) . '' : '') . (($dress['bron4'] != 0) ? '<br />Броня ног: ' . plusorminus($dress['bron4']) . '' : '') . '';
}
if ($user['rybax']) {
$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['rybax'])->fetch_assoc();
$title .= '<br />--------------------<br /><b>' . $dress['name'] . '</b><br />Прочность ' . $dress['duration'] . '/' . $dress['maxdur'] . '' . (($dress['ghp'] > 0) ? '<br />Уровень жизни ' . plusorminus($dress['ghp']) : '') . (($dress['text'] != null) ? '<br />На одежде вышито ' . $dress['text'] . '' : '') . (($dress['gsila'] != 0) ? '<br />Сила ' . plusorminus($dress['gsila']) . '' : '') . (($dress['glovk'] != 0) ? '<br />Ловкость ' . plusorminus($dress['glovk']) . '' : '') . (($dress['ginta'] != 0) ? '<br />Интуиция ' . plusorminus($dress['ginta']) . '' : '') . (($dress['gintel'] != 0) ? '<br />Интеллект ' . plusorminus($dress['gintel']) . '' : '') . (($dress['bron1'] != 0) ? '<br />Броня головы: ' . plusorminus($dress['bron1']) . '' : '') . (($dress['bron2'] != 0) ? '<br />Броня корпуса: ' . plusorminus($dress['bron2']) . '' : '') . (($dress['bron3'] != 0) ? '<br />Броня пояса: ' . plusorminus($dress['bron3']) . '' : '') . (($dress['bron4'] != 0) ? '<br />Броня ног: ' . plusorminus($dress['bron4']) . '' : '') . '';
}
} elseif ($user['bron']) {
$d = $user['bron'];
if ($user['rybax']) {
$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['rybax'])->fetch_assoc();
$title .= "<br />--------------------<br /><b>$dress[name]</b><br />Прочность $dress[duration]/$dress[maxdur]" . (($dress['ghp'] > 0) ? "<br />Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "<br />На одежде вышито '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "<br />Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "<br />Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "<br />Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "<br />Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "<br />Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "<br />Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "<br />Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "<br />Броня ног: " . plusorminus($dress['bron4']) : "") . '"';
}
} elseif ($user['rybax']) {
$d = $user['rybax'];
}
if ($main == true) {
$title = '';
}
$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', $d)->fetch_assoc();
if ($dress['includemagicdex'] && (!$pas || ($battle && $me))) {
$r .= showhrefmagic($dress);
} else {
$r .= '<img class=\'tooltip\' ' . ((($dress['maxdur'] - 2) <= $dress['duration'] && $dress['duration'] > 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=60 height=80 title="<b>' . $dress['name'] . "</b><br />Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "<br />Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "<br />На одежде вышито '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "<br />Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "<br />Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "<br />Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "<br />Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "<br />Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "<br />Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "<br />Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "<br />Броня ног: " . plusorminus($dress['bron4']) : "") . '' . $title . '" />';
}
} else {
$r .= '<img class=\'tooltip\' src="i/w4.gif" width=60 height=80 title="Пустой слот Броня" />';
}
$r .= '</td></tr><tr><td><table cellspacing=0 cellpadding=0><tr><td>';
if ($user['r1'] > 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['r1'])->fetch_assoc();
if ($dress['includemagicdex'] && (!$pas || ($battle && $me))) {
$r .= showhrefmagic($dress);
} else {
$r .= '<img class=\'tooltip\' ' . ((($dress['maxdur'] - 2) <= $dress['duration'] && $dress['duration'] > 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=20 height=20 title="<b>' . $dress['name'] . "</b><br />Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "<br />Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "<br />На кольце выгравировано '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "<br />Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "<br />Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "<br />Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "<br />Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "<br />Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "<br />Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "<br />Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "<br />Броня ног: " . plusorminus($dress['bron4']) : "") . '" />';
}
} else {
$r .= '<img class=\'tooltip\' src="i/w6.gif" width=20 height=20 title="Пустой слот Кольцо" />';
}
$r .= '</td><td>';
if ($user['r2'] > 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['r2'])->fetch_assoc();
if ($dress['includemagicdex'] && (!$pas || ($battle && $me))) {
$r .= showhrefmagic($dress);
} else {
$r .= '<img class=\'tooltip\' ' . ((($dress['maxdur'] - 2) <= $dress['duration'] && $dress['duration'] > 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=20 height=20 title="<b>' . $dress['name'] . "</b><br />Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "<br />Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "<br />На кольце выгравировано '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "<br />Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "<br />Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "<br />Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "<br />Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "<br />Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "<br />Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "<br />Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "<br />Броня ног: " . plusorminus($dress['bron4']) : "") . '" />';
}
} else {
$r .= '<img class=\'tooltip\' src="i/w6.gif" width=20 height=20 title="Пустой слот Кольцо" />';
}
$r .= '</td><td>';
if ($user['r3'] > 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['r3'])->fetch_assoc();
if ($dress['includemagicdex'] && (!$pas || ($battle && $me))) {
$r .= showhrefmagic($dress);
} else {
$r .= '<img class=\'tooltip\' ' . ((($dress['maxdur'] - 2) <= $dress['duration'] && $dress['duration'] > 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=20 height=20 title="<b>' . $dress['name'] . "</b><br />Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "<br />Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "<br />На кольце выгравировано '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "<br />Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "<br />Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "<br />Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "<br />Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "<br />Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "<br />Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "<br />Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "<br />Броня ног: " . plusorminus($dress['bron4']) : "") . '" />';
}
} else {
$r .= '<img class=\'tooltip\' src="i/w6.gif" width=20 height=20 title="Пустой слот Кольцо" />';
}
$r .= '</td></tr></table></td></tr></table></td>';
$r .= '<td valign=top><img src="i/shadow/' . $user['shadow'] . '" width="76" height="209" /></td><td width="62" valign=top><table width=100% cellspacing=0 cellpadding=0><tr><td>';
if ($user['helm'] > 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['helm'])->fetch_assoc();
if ($dress['includemagicdex'] && (!$pas || ($battle && $me))) {
$r .= showhrefmagic($dress);
} else {
$r .= '<img class=\'tooltip\' ' . ((($dress['maxdur'] - 2) <= $dress['duration'] && $dress['duration'] > 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=60 height=60 title="<b>' . $dress['name'] . "</b><br />Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "<br />Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "<br />На шлеме выгравировано '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "<br />Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "<br />Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "<br />Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "<br />Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "<br />Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "<br />Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "<br />Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "<br />Броня ног: " . plusorminus($dress['bron4']) : "") . '" />';
}
} else {
$r .= '<img class=\'tooltip\' src="i/w9.gif" width=60 height=60 title="Пустой слот Шлем" />';
}
$r .= '</td></tr><tr><td>';
if ($user['perchi'] > 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['perchi'])->fetch_assoc();
if ($dress['includemagicdex'] && (!$pas || ($battle && $me))) {
$r .= showhrefmagic($dress);
} else {
$r .= '<img class=\'tooltip\' ' . ((($dress['maxdur'] - 2) <= $dress['duration'] && $dress['duration'] > 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=60 height=40 title="<b>' . $dress['name'] . "</b><br />Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "<br />Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "<br />На перчатках выгравировано '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "<br />Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "<br />Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "<br />Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "<br />Интеллект " . plusorminus($dress['gintel']) : "") . '" />';
}
} else {
$r .= '<img class=\'tooltip\' src="i/w11.gif" width=60 height=40 alt="Пустой слот Перчатки" />';
}
$r .= '</td></tr><tr><td>';
if ($user['shit'] > 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['shit'])->fetch_assoc();
if ($dress['includemagicdex'] && (!$pas || ($battle && $me))) {
$r .= showhrefmagic($dress);
} else {
$r .= '<img class=\'tooltip\' ' . ((($dress['maxdur'] - 2) <= $dress['duration'] && $dress['duration'] > 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=60 height=60 title="<b>' . $dress['name'] . "</b><br />Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "<br />Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "<br />На щите выгравировано '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "<br />Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "<br />Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "<br />Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "<br />Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "<br />Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "<br />Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "<br />Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "<br />Броня ног: " . plusorminus($dress['bron4']) : "") . '" />';
}
} else {
$r .= '<img class=\'tooltip\' src="i/w10.gif" width=60 height=60 title="Пустой слот Щит" />';
}
$r .= '</td></tr><tr><td>';
if ($user['boots'] > 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['boots'])->fetch_assoc();
if ($dress['includemagicdex'] && (!$pas || ($battle && $me))) {
$r .= showhrefmagic($dress);
} else {
$r .= '<img class=\'tooltip\' ' . ((($dress['maxdur'] - 2) <= $dress['duration'] && $dress['duration'] > 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=60 height=40 title="<b>' . $dress['name'] . "</b><br />Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "<br />Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "<br />На ботинках выгравировано '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "<br />Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "<br />Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "<br />Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "<br />Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "<br />Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "<br />Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "<br />Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "<br />Броня ног: " . plusorminus($dress['bron4']) : "") . '" />';
}
} else {
$r .= '<img class=\'tooltip\' src="i/w12.gif" width=60 height=40 title="Пустой слот Oбувь" />';
}
if ($invis) {
$data['id'] = null;
} else {
$data = db::c()->query('SELECT * FROM `online` WHERE `date` >= ?i AND `id` = ?i', time() - 60, $user['id'])->fetch_assoc();
}
$r .= '</td></tr></table></td></tr></table>';
$ru_1 = show_rune(1, $user['id']);
$ru_2 = show_rune(2, $user['id']);
$ru_3 = show_rune(3, $user['id']);
$r .= '<table cellspacing="0" cellpadding="0" border="0" style="background: url(i/runes_slots.jpg) no-repeat center bottom;"><tbody><tr><td width="59" height="48" align="right">' . $ru_1 . '</td><td width="74" height="48" align="center">' . $ru_2 . '</td><td width="57" height="48" align="left">' . $ru_3 . '</td></tr></tbody></table></center>';
$r .= '<center><table cellPadding=0 cellSpacing=0 width="100%"><tbody>';
if (!$battle) {
if ($pas) {
$r .= '<tr><td align=middle colSpan=2><b><small>' . GAMEDOMAIN . '</small></b></td></tr><tr><td colSpan=2>';
$online = db::c()->query('SELECT `u`.*, `o`.`date`, `u`.*, `o`.`real_time` FROM `users` AS `u`, `online` AS `o` WHERE `u`.`id` = `o`.`id` AND `u`.`id` = ?i ', $user['id'])->fetch_assoc();
if ($invis) {
$invis = db::c()->query('SELECT `time` FROM `effects` WHERE `owner` = ?i AND `type` = 1022', $user['id'])->fetch_assoc();//FIXME Тип содержит число, невозможное в базе.
}
if ($invis > time()) {
$data['id'] = null;
$online['date'] -= 60 * 120 - ($invis - time());
}
if ($data['id'] != null && $user['id'] != 326) {
if ($data['room'] > 500 && $data['room'] < 561) {
$rrm = 'Башня смерти, участвует в турнире';
} else {
$rrm = $rooms[$data['room']];
}
$r .= '<center>Персонаж сейчас находится в игре.<b>"' . $rrm . '"</b></center>';
} else {
$r .= "<center>Персонаж не в игре.</center>";
}
if ($user['battle'] > 0 && $user['invis'] == 0) {
$r .= '<br />Персонаж сейчас в <a target="_blank" href="logs.php?log=' . $user['battle'] . '">поединке</a>';
}
$r .= '</center>';
$r .= '<div class="effectList" style="padding-top: 15px;">';
$r .= show_eff_inf($user['id'], 1);
$r .= '</div></td></tr>';
}
$r .= '</tbody></table></center></td>';
$r .= '<td valign=top ' . (!$pas ? "style='width: 450px;'" : "") . '>';
$r .= 'Сила: ' . $user['sila'] . '<br>';
$r .= 'Ловкость: ' . $user['lovk'] . '<br>';
$r .= 'Интуиция: ' . $user['inta'] . '<br>';
$r .= 'Выносливость: ' . $user['vinos'] . '<br>';
if ($user['level'] > 3) {
$r .= 'Интеллект: ' . $user['intel'] . '<br>';
}
if (!$pas && (($user['stats'] > 0) || ($user['master'] > 0))) {
$r .= '<a href="main.php?edit=1">+ Способности</a><br>';
}
$r .= '<hr style=\'width: 50%; float: left;\' /><br />';
if (!$pas) {
$r .= 'Опыт: <b>' . $user['exp'] . '</b> (' . $user['nextup'] . ')<br>';
}
$r .= 'Уровень: ' . $user['level'] . '<br>';
$r .= 'Побед:&nbsp;<span>' . $user['win'] . '</span><br>';
$r .= 'Поражений:&nbsp;<span>' . $user['lose'] . '</span><br>';
$r .= 'Ничьих:&nbsp;<span>' . $user['nich'] . '</span><br>';
if ($user['klan'] && !$pas) {
$r .= "Клан: " . ClanImage($user['klan']) . "<br>";
} elseif ($user['klan']) {
$clann = db::c()->query('SELECT `name`, `glava` FROM `clans` WHERE `id` = ?i', $user['klan'])->fetch_assoc();
if ($clann['glava'] == $user['id']) $r .= "<sup>👑</sup> ";
$r .= $clann['name'] . " - " . $user['status'] . "<br>";
}
if ($user['admin'] == 1) $r .= "<b>Администратор</b><br>";
if ($pas) {
$date1 = explode(" ", $user['borntime']);
$date2 = explode("-", $date1[0]);
$date3 = "" . $date2[2] . "-" . $date2[1] . "-" . $date2[0] . "";
$r .= 'День рождения персонажа: ' . $date3 . '<br>';
$r .= '<hr />';
if ($user['palcom'] && $pas) {
$r .= "<br><span class=private>{$user['palcom']}</span>";
}
}
if ($user['battle'] > 0 && $user['invis'] == 0) {
$r .= '<br />Персонаж сейчас в <a target="_blank" href="logs.php?log=' . $user['battle'] . '">поединке</a>';
}
$r .= '</center>';
$r .= '<div class="effectList" style="padding-top: 15px;">';
$r .= show_eff_inf($user['id'], 1);
$r .= '</div></td></tr>';
}
$r .= '</tbody></table></center></td>';
$r .= '<td valign=top ' . (!$pas ? "style='width: 450px;'" : "") . '>';
$r .= 'Сила: ' . $user['sila'] . '<br>';
$r .= 'Ловкость: ' . $user['lovk'] . '<br>';
$r .= 'Интуиция: ' . $user['inta'] . '<br>';
$r .= 'Выносливость: ' . $user['vinos'] . '<br>';
if ($user['level'] > 3) {
$r .= 'Интеллект: ' . $user['intel'] . '<br>';
}
if (!$pas && (($user['stats'] > 0) || ($user['master'] > 0))) {
$r .= '<a href="main.php?edit=1">+ Способности</a><br>';
}
$r .= '<hr style=\'width: 50%; float: left;\' /><br />';
if (!$pas) {
$r .= 'Опыт: <b>' . $user['exp'] . '</b> (' . $user['nextup'] . ')<br>';
}
$r .= 'Уровень: ' . $user['level'] . '<br>';
$r .= 'Побед:&nbsp;<span>' . $user['win'] . '</span><br>';
$r .= 'Поражений:&nbsp;<span>' . $user['lose'] . '</span><br>';
$r .= 'Ничьих:&nbsp;<span>' . $user['nich'] . '</span><br>';
if ($user['klan'] && !$pas) {
$r .= "Клан: " . ClanImage($user['klan']) . "<br>";
} elseif ($user['klan']) {
$clann = db::c()->query('SELECT `name`, `glava` FROM `clans` WHERE `id` = ?i', $user['klan'])->fetch_assoc();
if ($clann['glava'] == $user['id']) $r .= "<sup>👑</sup> ";
$r .= $clann['name'] . " - " . $user['status'] . "<br>";
}
if ($user['admin'] == 1) $r .= "<b>Администратор</b><br>";
if ($pas) {
$date1 = explode(" ", $user['borntime']);
$date2 = explode("-", $date1[0]);
$date3 = "" . $date2[2] . "-" . $date2[1] . "-" . $date2[0] . "";
$r .= 'День рождения персонажа: ' . $date3 . '<br>';
$r .= '<hr />';
if ($user['palcom'] && $pas) {
$r .= "<br><span class=private>{$user['palcom']}</span>";
} else {
$r .= '<tr><td colSpan=2 style="padding-left: 25px;">';
$r .= 'Сила: ' . $user['sila'] . '<br>';
$r .= 'Ловкость: ' . $user['lovk'] . '<br>';
$r .= 'Интуиция: ' . $user['inta'] . '<br>';
$r .= 'Выносливость: ' . $user['vinos'] . '<br>';
if ($user['level'] > 3) {
$r .= 'Интеллект: ' . $user['intel'] . '<br>';
}
$r .= '</td></tr></table>';
}
} else {
$r .= '<tr><td colSpan=2 style="padding-left: 25px;">';
$r .= 'Сила: ' . $user['sila'] . '<br>';
$r .= 'Ловкость: ' . $user['lovk'] . '<br>';
$r .= 'Интуиция: ' . $user['inta'] . '<br>';
$r .= 'Выносливость: ' . $user['vinos'] . '<br>';
if ($user['level'] > 3) {
$r .= 'Интеллект: ' . $user['intel'] . '<br>';
}
$r .= '</td></tr></table>';
}
return $r;
}