From d78a9c65dd16311d0796a34da3919ceb82cdda68 Mon Sep 17 00:00:00 2001 From: "Igor Barkov [iwork]" Date: Thu, 27 Dec 2018 18:13:40 +0200 Subject: [PATCH] showitem lapshacode remove --- functions.php | 204 ++++++++++++++++++-------------------------------- 1 file changed, 71 insertions(+), 133 deletions(-) diff --git a/functions.php b/functions.php index a32ca09..ba49bed 100644 --- a/functions.php +++ b/functions.php @@ -765,15 +765,13 @@ function echoscroll($slot) // ссылка на магию function showhrefmagic($dress) { - global $user; - $r = ''; - if ($user['battle']) { - $script = 'fbattle'; - } else { - $script = 'main'; - } - + $user =db::c()->query('SELECT `battle` FROM `users` WHERE `id` = ?i', $_SESSION['uid'])->fetch_assoc(); $magic = db::c()->query('SELECT * FROM `magic` WHERE `id` = ?i', $dress['includemagic'])->fetch_assoc(); + + $r = ''; + $script = 'main'; + if ($user['battle']) $script = 'fbattle'; + $r .= " невидимка

- + HTML; } else { $r .= '
'; - $r .= ($user['align'] > 0 ? "" : "") . ($user['klan'] != '' ? '' : "") . "$user[login] ["; + $r .= (!empty($user['align']) ? " " : "") . (!empty($user['klan']) ? ' ' : "") . "$user[login] ["; $r .= $user['level']; $r .= "]"; @@ -983,27 +955,14 @@ HTML; $r .= ''; - if (($user['level'] > 3) && !$pas && !$battle) { - $r .= ''; - $r .= echoscroll('m1'); - $r .= echoscroll('m2'); - $r .= echoscroll('m3'); - $r .= echoscroll('m4'); - $r .= echoscroll('m5'); - $r .= '
'; - $r .= ''; - $r .= echoscroll('m6') . '' . echoscroll('m7') . '' . echoscroll('m8') . '' . echoscroll('m9') . '' . echoscroll('m10'); - $r .= ''; - } - $r .= '
'; 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))) { + $dress = db::c()->query('SELECT `name`, `img`, `duration`, `maxdur`, `ghp`, `text`, `includemagicdex` FROM `inventory` WHERE `id` = ?i', $user['sergi'])->fetch_assoc(); + if ($dress['includemagicdex'] && ($battle && $me)) { $r .= showhrefmagic($dress); } else { - $r .= ' 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=60 height=20 title="' . $dress['name'] . "
Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "
Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "
На серьгах выгравировано '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "
Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "
Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "
Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "
Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "
Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "
Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "
Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "
Броня ног: " . plusorminus($dress['bron4']) : "") . '" />'; + $r .= '" . ((!empty($dress['text'])) ? "
{$dress['text']}" : "") . '" />'; } } else { $r .= ''; @@ -1013,10 +972,10 @@ HTML; 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))) { + if ($dress['includemagicdex'] && ($battle && $me)) { $r .= showhrefmagic($dress); } else { - $r .= ' 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=60 height=20 title="' . $dress['name'] . "
Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "
Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "
На ожерелье выгравировано '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "
Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "
Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "
Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "
Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "
Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "
Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "
Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "
Броня ног: " . plusorminus($dress['bron4']) : "") . '" />'; + $r .= '" . ((!empty($dress['text'])) ? "
{$dress['text']}" : "") . '" />'; } } else { $r .= ''; @@ -1026,10 +985,10 @@ HTML; 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))) { + if ($dress['includemagicdex'] && ($battle && $me)) { $r .= showhrefmagic($dress); } else { - $r .= ' 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=60 height=60 title="' . $dress['name'] . "
Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "
Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['minu'] > 0) ? "
Урон {$dress['minu']}-{$dress['maxu']}" : "") . (($dress['text'] != null) ? "
На оружии выгравировано '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "
Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "
Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "
Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "
Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "
Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "
Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "
Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "
Броня ног: " . plusorminus($dress['bron4']) : "") . '" />'; + $r .= '" . ((!empty($dress['text'])) ? "
{$dress['text']}" : "") . '" />'; } } else { $r .= ''; @@ -1065,10 +1024,10 @@ HTML; $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))) { + if ($dress['includemagicdex'] && $battle && $me) { $r .= showhrefmagic($dress); } else { - $r .= ' 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=60 height=80 title="' . $dress['name'] . "
Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "
Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "
На одежде вышито '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "
Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "
Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "
Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "
Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "
Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "
Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "
Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "
Броня ног: " . plusorminus($dress['bron4']) : "") . '' . $title . '" />'; + $r .= '" . ((!empty($dress['text'])) ? "
{$dress['text']}" : "") . '" />'; } } else { $r .= ''; @@ -1078,10 +1037,10 @@ HTML; 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))) { + if ($dress['includemagicdex'] && ($battle && $me)) { $r .= showhrefmagic($dress); } else { - $r .= ' 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=20 height=20 title="' . $dress['name'] . "
Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "
Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "
На кольце выгравировано '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "
Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "
Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "
Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "
Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "
Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "
Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "
Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "
Броня ног: " . plusorminus($dress['bron4']) : "") . '" />'; + $r .= '" . ((!empty($dress['text'])) ? "
{$dress['text']}" : "") . '" />'; } } else { $r .= ''; @@ -1091,10 +1050,10 @@ HTML; 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))) { + if ($dress['includemagicdex'] && ($battle && $me)) { $r .= showhrefmagic($dress); } else { - $r .= ' 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=20 height=20 title="' . $dress['name'] . "
Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "
Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "
На кольце выгравировано '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "
Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "
Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "
Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "
Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "
Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "
Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "
Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "
Броня ног: " . plusorminus($dress['bron4']) : "") . '" />'; + $r .= '" . ((!empty($dress['text'])) ? "
{$dress['text']}" : "") . '" />'; } } else { $r .= ''; @@ -1104,10 +1063,10 @@ HTML; 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))) { + if ($dress['includemagicdex'] && ($battle && $me)) { $r .= showhrefmagic($dress); } else { - $r .= ' 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=20 height=20 title="' . $dress['name'] . "
Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "
Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "
На кольце выгравировано '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "
Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "
Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "
Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "
Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "
Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "
Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "
Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "
Броня ног: " . plusorminus($dress['bron4']) : "") . '" />'; + $r .= '" . ((!empty($dress['text'])) ? "
{$dress['text']}" : "") . '" />'; } } else { $r .= ''; @@ -1120,10 +1079,10 @@ HTML; 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))) { + if ($dress['includemagicdex'] && ($battle && $me)) { $r .= showhrefmagic($dress); } else { - $r .= ' 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=60 height=60 title="' . $dress['name'] . "
Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "
Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "
На шлеме выгравировано '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "
Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "
Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "
Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "
Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "
Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "
Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "
Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "
Броня ног: " . plusorminus($dress['bron4']) : "") . '" />'; + $r .= '" . ((!empty($dress['text'])) ? "
{$dress['text']}" : "") . '" />'; } } else { $r .= ''; @@ -1133,10 +1092,10 @@ HTML; 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))) { + if ($dress['includemagicdex'] && ($battle && $me)) { $r .= showhrefmagic($dress); } else { - $r .= ' 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=60 height=40 title="' . $dress['name'] . "
Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "
Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "
На перчатках выгравировано '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "
Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "
Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "
Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "
Интеллект " . plusorminus($dress['gintel']) : "") . '" />'; + $r .= '" . ((!empty($dress['text'])) ? "
{$dress['text']}" : "") . '" />'; } } else { $r .= 'Пустой слот Перчатки'; @@ -1146,10 +1105,10 @@ HTML; 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))) { + if ($dress['includemagicdex'] && ($battle && $me)) { $r .= showhrefmagic($dress); } else { - $r .= ' 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=60 height=60 title="' . $dress['name'] . "
Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "
Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "
На щите выгравировано '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "
Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "
Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "
Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "
Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "
Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "
Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "
Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "
Броня ног: " . plusorminus($dress['bron4']) : "") . '" />'; + $r .= '" . ((!empty($dress['text'])) ? "
{$dress['text']}" : "") . '" />'; } } else { $r .= ''; @@ -1159,20 +1118,16 @@ HTML; 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))) { + if ($dress['includemagicdex'] && ($battle && $me)) { $r .= showhrefmagic($dress); } else { - $r .= ' 2 && !$pas) ? " style='background-image:url(i/blink.gif);' " : "") . ' src="i/sh/' . $dress['img'] . '" width=60 height=40 title="' . $dress['name'] . "
Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . "" . (($dress['ghp'] > 0) ? "
Уровень жизни " . plusorminus($dress['ghp']) : "") . (($dress['text'] != null) ? "
На ботинках выгравировано '{$dress['text']}'" : "") . (($dress['gsila'] != 0) ? "
Сила " . plusorminus($dress['gsila']) : "") . (($dress['glovk'] != 0) ? "
Ловкость " . plusorminus($dress['glovk']) : "") . (($dress['ginta'] != 0) ? "
Интуиция " . plusorminus($dress['ginta']) : "") . (($dress['gintel'] != 0) ? "
Интеллект " . plusorminus($dress['gintel']) : "") . (($dress['bron1'] != 0) ? "
Броня головы: " . plusorminus($dress['bron1']) : "") . (($dress['bron2'] != 0) ? "
Броня корпуса: " . plusorminus($dress['bron2']) : "") . (($dress['bron3'] != 0) ? "
Броня пояса: " . plusorminus($dress['bron3']) : "") . (($dress['bron4'] != 0) ? "
Броня ног: " . plusorminus($dress['bron4']) : "") . '" />'; + $r .= '" . ((!empty($dress['text'])) ? "
{$dress['text']}" : "") . '" />'; } } else { $r .= ''; } - 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(); - } + $data = db::c()->query('SELECT * FROM `online` WHERE `date` >= ?i AND `id` = ?i', time() - 60, $user['id'])->fetch_assoc(); $r .= '
'; $ru_1 = show_rune(1, $user['id']); @@ -1183,77 +1138,61 @@ HTML; $r .= '
'; if (!$battle) { - if ($pas) { - $r .= ''; + $r .= '
Персонаж сейчас находится в игре."' . $rrm . '"
'; + } else { + $r .= "
Персонаж не в игре.
"; } + + if ($user['battle'] > 0 && $user['invis'] == 0) { + $r .= '
Персонаж сейчас в поединке'; + } + $r .= ''; + $r .= '
'; + $r .= show_eff_inf($user['id'], 1); + $r .= '
'; + $r .= '
' . GAMEDOMAIN . '
'; - $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 .= '
Персонаж сейчас находится в игре."' . $rrm . '"
'; + $r .= '
' . GAMEDOMAIN . '
'; + + if ($data['id'] != null && $user['id'] != 326) { + if ($data['room'] > 500 && $data['room'] < 561) { + $rrm = 'Башня смерти, участвует в турнире'; } else { - $r .= "
Персонаж не в игре.
"; + $rrm = $rooms[$data['room']]; } - - if ($user['battle'] > 0 && $user['invis'] == 0) { - $r .= '
Персонаж сейчас в поединке'; - } - $r .= ''; - $r .= '
'; - $r .= show_eff_inf($user['id'], 1); - $r .= '
'; - $r .= ''; + $r .= ''; $r .= 'Сила: ' . $user['sila'] . '
'; $r .= 'Ловкость: ' . $user['lovk'] . '
'; $r .= 'Интуиция: ' . $user['inta'] . '
'; $r .= 'Выносливость: ' . $user['vinos'] . '
'; - if ($user['level'] > 3) { - $r .= 'Интеллект: ' . $user['intel'] . '
'; - } - if (!$pas && (($user['stats'] > 0) || ($user['master'] > 0))) { - $r .= '+ Способности
'; - } - $r .= '

'; - if (!$pas) { - $r .= 'Опыт: ' . $user['exp'] . ' (' . $user['nextup'] . ')
'; - } - $r .= 'Уровень: ' . $user['level'] . '
'; - $r .= 'Побед: ' . $user['win'] . '
'; - $r .= 'Поражений: ' . $user['lose'] . '
'; - $r .= 'Ничьих: ' . $user['nich'] . '
'; + $r .= 'Интеллект: ' . $user['intel'] . '
'; + $r .= 'Мудрость: ' . $user['mudra'] . '
'; - if ($user['klan'] && !$pas) { - $r .= "Клан: " . ClanImage($user['klan']) . "
"; - } elseif ($user['klan']) { + + $r .= '

'; + + $r .= 'Уровень: ' . $user['level'] . '
'; + $r .= 'Побед: ' . $user['win'] . '
'; + $r .= 'Поражений: ' . $user['lose'] . '
'; + $r .= 'Ничьих: ' . $user['nich'] . '
'; + + if ($user['klan']) { $clann = db::c()->query('SELECT `name`, `glava` FROM `clans` WHERE `id` = ?i', $user['klan'])->fetch_assoc(); if ($clann['glava'] == $user['id']) $r .= "👑 "; - $r .= $clann['name'] . " - " . $user['status'] . "
"; + $r .= $clann['name'] . " " . $user['status'] . "
"; } if ($user['admin'] == 1) $r .= "Администратор
"; - if ($pas) { + if ($user['borntime']) { $date1 = explode(" ", $user['borntime']); $date2 = explode("-", $date1[0]); $date3 = "" . $date2[2] . "-" . $date2[1] . "-" . $date2[0] . ""; $r .= 'День рождения персонажа: ' . $date3 . '
'; - $r .= '
'; - if ($user['palcom'] && $pas) { - $r .= "
{$user['palcom']}"; - } } + if ($user['palcom']) $r .= "
{$user['palcom']}"; + $r .= '
'; } else { $r .= ''; @@ -1261,9 +1200,8 @@ HTML; $r .= 'Ловкость: ' . $user['lovk'] . '
'; $r .= 'Интуиция: ' . $user['inta'] . '
'; $r .= 'Выносливость: ' . $user['vinos'] . '
'; - if ($user['level'] > 3) { - $r .= 'Интеллект: ' . $user['intel'] . '
'; - } + $r .= 'Интеллект: ' . $user['intel'] . '
'; + $r .= 'Мудрость: ' . $user['mudra'] . '
'; $r .= ''; } } @@ -2801,8 +2739,8 @@ function addlog($id, $log) function star_sign($month, $day) { if (empty($month) or empty($day)) { - $month = (int)sprintf("%02d", mt_rand(1,12)); - $day = (int)sprintf("%02d", mt_rand(1,29)); + $month = (int)sprintf("%02d", mt_rand(1, 12)); + $day = (int)sprintf("%02d", mt_rand(1, 29)); } $signs = ["10", "11", "12", "01", "02", "03", "04", "05", "06", "07", "08", "09"]; $signsstart = [01 => 21, 02 => 20, 03 => 20, 04 => 20, 05 => 20, 06 => 20, 07 => 21, 08 => 22, 09 => 23, 10 => 23, 11 => 23, 12 => 23];