showpersout() code clean

This commit is contained in:
lopar 2018-03-08 23:53:15 +02:00
parent 8326c6620e
commit 99b306e12b
4 changed files with 65 additions and 201 deletions

View File

@ -1999,7 +1999,7 @@ function showinf_pers($id, $pas = 0, $battle = 0, $me = 0, $main = false) //FIXM
}
$r .= "<table cellspacing=0 cellpadding=0><tr><td colspan=3 width=100%>";
$r .= setHP($user['hp'], $user['maxhp'], $battle);
$r .= setHP($user['hp'], $user['maxhp']);
$r .= '</td></tr>';
@ -2303,78 +2303,30 @@ function showinf_pers($id, $pas = 0, $battle = 0, $me = 0, $main = false) //FIXM
return $r;
}
function showpersout($id, $pas = 0, $battle = 0, $me = 0)
/**
* Смотрим на себя в главном окне игры.
* @param int $pas
*/
function showpersout($pas = 0)
{
global $rooms;
global $user;
if ($id > _BOTSEPARATOR_) {
$bots = mysql_fetch_array(mysql_query('SELECT * FROM `bots` WHERE `id` = ' . (int)$id . ' LIMIT 1'));
$id = $bots['prototype'];
$user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '{$id}' LIMIT 1"));
$user['login'] = $bots['name'];
$user['hp'] = $bots['hp'];
} else {
$user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '{$id}' LIMIT 1"));
$invis = $user["invis"];
}
if ($battle && $invis && $user['id'] != $_SESSION['uid']) {
$user['level'] = '??';
$user['login'] = '</a><b><i>невидимка</i></b>';
$user['align'] = '0';
$user['klan'] = '';
$user['id'] = '';
$user['hp'] = '??';
$user['maxhp'] = '??';
$user['sila'] = '??';
$user['lovk'] = '??';
$user['inta'] = '??';
$user['vinos'] = '??';
$user['intel'] = '??';
$user['deal'] = 0;
$user['sergi'] = 0;
$user['kulon'] = 0;
$user['r1'] = 0;
$user['r2'] = 0;
$user['r3'] = 0;
$user['weap'] = 0;
$user['bron'] = 0;
$user['helm'] = 0;
$user['perchi'] = 0;
$user['shit'] = 0;
$user['boots'] = 0;
$user['shadow'] = 'invis.gif';
}
echo '<CENTER>';
if ($user['deal'] > 0) {
$deal = '<img src=\'i/deal.gif\' /> ';
} else {
$deal = '';
}
echo "<A HREF=\"javascript:top.AddToPrivate('$user[login]', top.CtrlPress)\" target=refreshed><img src=\"/i/lock.gif\" width=20 height=15></A>$deal" . ($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> [";
echo $user['level'];
echo "]<a href=inf.php?$user[id] target=_blank><IMG SRC=/i/inf.gif WIDTH=12 HEIGHT=11 ALT=\"Инф. о $user[login]\"></a>";
nick::id($user['id'])->full();
if ($user['block']) {
echo "<BR><FONT class=private>Персонаж заблокирован!</font>";
echo "<br><span class=private>Персонаж заблокирован!</span>";
}
?>
<TABLE cellspacing=0 cellpadding=0>
<tr>
<TD colspan=3 width=100%>
<?
echo setHP($user['hp'], $user['maxhp'], $battle);
?>
<?=setHP($user['hp'], $user['maxhp'])?>
</td>
</tr>
<?
if (($user['level'] > 3) && !$pas && !$battle) { ?>
if (($user['level'] > 3) && !$pas) { ?>
<TR>
<TD colspan=3>
<?
@ -2407,7 +2359,7 @@ function showpersout($id, $pas = 0, $battle = 0, $me = 0)
<TD><?php
if ($user['sergi'] > 0) {
$dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `id` = '{$user['sergi']}' LIMIT 1;"));
if ($dress['includemagicdex'] && (!$pas || ($battle && $me))) {
if ($dress['includemagicdex'] && !$pas) {
echo showhrefmagic($dress);
} else {
echo '<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']) : "") . '" />';
@ -2421,7 +2373,7 @@ function showpersout($id, $pas = 0, $battle = 0, $me = 0)
<TD><?php
if ($user['kulon'] > 0) {
$dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `id` = '{$user['kulon']}' LIMIT 1;"));
if ($dress['includemagicdex'] && (!$pas || ($battle && $me))) {
if ($dress['includemagicdex'] && !$pas) {
echo showhrefmagic($dress);
} else {
echo '<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']) : "") . '" />';
@ -2435,7 +2387,7 @@ function showpersout($id, $pas = 0, $battle = 0, $me = 0)
<TD><?php
if ($user['weap'] > 0) {
$dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `id` = '{$user['weap']}' LIMIT 1;"));
if ($dress['includemagicdex'] && (!$pas || ($battle && $me))) {
if ($dress['includemagicdex'] && !$pas) {
echo showhrefmagic($dress);
} else {
echo '<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']) : "") . '" />';
@ -2469,7 +2421,7 @@ function showpersout($id, $pas = 0, $battle = 0, $me = 0)
$d = $user['rybax'];
}
$dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `id` = '{$d}' LIMIT 1"));
if ($dress['includemagicdex'] && (!$pas || ($battle && $me))) {
if ($dress['includemagicdex'] && !$pas) {
echo showhrefmagic($dress);
} else {
echo '<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 . '" />';
@ -2486,7 +2438,7 @@ function showpersout($id, $pas = 0, $battle = 0, $me = 0)
<td><?php
if ($user['r1'] > 0) {
$dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `id` = '{$user['r1']}' LIMIT 1;"));
if ($dress['includemagicdex'] && (!$pas || ($battle && $me))) {
if ($dress['includemagicdex'] && !$pas) {
showhrefmagic($dress);
} else {
echo '<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']) : "") . '" />';
@ -2498,7 +2450,7 @@ function showpersout($id, $pas = 0, $battle = 0, $me = 0)
<td><?php
if ($user['r2'] > 0) {
$dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `id` = '{$user['r2']}' LIMIT 1;"));
if ($dress['includemagicdex'] && (!$pas || ($battle && $me))) {
if ($dress['includemagicdex'] && !$pas) {
echo showhrefmagic($dress);
} else {
echo '<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']) : "") . '" />';
@ -2510,7 +2462,7 @@ function showpersout($id, $pas = 0, $battle = 0, $me = 0)
<td><?php
if ($user['r3'] > 0) {
$dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `id` = '{$user['r3']}' LIMIT 1;"));
if ($dress['includemagicdex'] && (!$pas || ($battle && $me))) {
if ($dress['includemagicdex'] && !$pas) {
echo showhrefmagic($dress);
} else {
echo '<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']) : "") . '" />';
@ -2534,7 +2486,7 @@ function showpersout($id, $pas = 0, $battle = 0, $me = 0)
<TD><?php
if ($user['helm'] > 0) {
$dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `id` = '{$user['helm']}' LIMIT 1;"));
if ($dress['includemagicdex'] && (!$pas || ($battle && $me))) {
if ($dress['includemagicdex'] && !$pas) {
echo showhrefmagic($dress);
} else {
echo '<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']) : "") . '" />';
@ -2548,7 +2500,7 @@ function showpersout($id, $pas = 0, $battle = 0, $me = 0)
<TD><?php
if ($user['perchi'] > 0) {
$dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `id` = '{$user['perchi']}' LIMIT 1;"));
if ($dress['includemagicdex'] && (!$pas || ($battle && $me))) {
if ($dress['includemagicdex'] && !$pas) {
echo showhrefmagic($dress);
} else {
echo '<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']) : "") . '" />';
@ -2562,7 +2514,7 @@ function showpersout($id, $pas = 0, $battle = 0, $me = 0)
<TD><?php
if ($user['shit'] > 0) {
$dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `id` = '{$user['shit']}' LIMIT 1;"));
if ($dress['includemagicdex'] && (!$pas || ($battle && $me))) {
if ($dress['includemagicdex'] && !$pas) {
echo showhrefmagic($dress);
} else {
echo '<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']) : "") . '" />';
@ -2576,7 +2528,7 @@ function showpersout($id, $pas = 0, $battle = 0, $me = 0)
<TD><?php
if ($user['boots'] > 0) {
$dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `id` = '{$user['boots']}' LIMIT 1;"));
if ($dress['includemagicdex'] && (!$pas || ($battle && $me))) {
if ($dress['includemagicdex'] && !$pas) {
echo showhrefmagic($dress);
} else {
echo '<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']) : "") . '" />';
@ -2584,13 +2536,9 @@ function showpersout($id, $pas = 0, $battle = 0, $me = 0)
} else {
echo '<img class=\'tooltip\' src="i/w12.gif" width=60 height=40 title="Пустой слот Oбувь" />';
}
if ($invis) $data["id"] = null; else
$data = mysql_fetch_array(mysql_query("SELECT * FROM `online` WHERE `date` >= " . (time() - 60) . " AND `id` = " . $user['id'] . ";"));
$dd = mysql_query("SELECT * FROM `effects` WHERE `owner` = " . $user['id'] . ";");
?></A></TD>
?>
</A>
</TD>
</TR>
</TABLE>
</TD>
@ -2600,9 +2548,9 @@ function showpersout($id, $pas = 0, $battle = 0, $me = 0)
style="background: url('i/runes_slots.jpg') no-repeat center bottom;">
<tbody>
<tr>
<td width="59" height="48" align="right"><? echo show_rune(1, $user['id']); ?></td>
<td width="74" height="48" align="center"><? echo show_rune(2, $user['id']); ?></td>
<td width="57" height="48" align="left"><? echo show_rune(3, $user['id']); ?></td>
<td width="59" height="48" align="right"><?=show_rune(1, $user['id'])?></td>
<td width="74" height="48" align="center"><?=show_rune(2, $user['id'])?></td>
<td width="57" height="48" align="left"><?=show_rune(3, $user['id'])?></td>
</tr>
</tbody>
</table>
@ -2612,45 +2560,12 @@ function showpersout($id, $pas = 0, $battle = 0, $me = 0)
<TABLE cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<?
if (!$battle) {
?>
<? if ($pas) { ?>
<TR>
<TD align=middle colSpan=2><B>
<small><?=GAMEDOMAIN?></small>
</B></TD>
</TR>
<TR>
<TD colSpan=2>
<SMALL><?php
$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', $user1['id'])->fetch_assoc();
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']];
}
echo '<center>Персонаж сейчас находится в игре.<B>"' . $rrm . '"</B></center>';
} else {
echo "<center>Персонаж не в игре.</center>";
}
?><?
if ($user['battle'] > 0 && $user['invis'] == 0) {
echo '<BR>Персонаж сейчас в <a target=_blank href="logs.php?log=', $user['battle'], '">поединке</a>';
}
?></CENTER></SMALL>
<div class="effectList" style="padding-top: 15px;">
<? echo show_eff_inf($user['id'], 1); ?>
</div>
</TD></TR><? }
if (!$pas) {
if ($trt) {
echo "<TR><TD><IMG height=25 src=\"i/travma.gif\" width=40></TD><TD><SMALL>У персонажа $trt травма.</SMALL></TD></TR>";
}
$dd = mysql_query("SELECT * FROM `effects` WHERE `owner` = " . $user['id'] . ";");
$param_bonus = [];
while ($row = mysql_fetch_array($dd)) {
if ($row['time'] < time()) {
$row['time'] = time();
@ -2664,106 +2579,56 @@ function showpersout($id, $pas = 0, $battle = 0, $me = 0)
$param_bonus['vinos'] = $row['vinos'];
}
}
?>
</TBODY></TABLE></CENTER>
</TD>
<TD valign=top <?= (!$pas ? "style='width:450px;'" : "") ?>
?>
<TD valign=top style='width:450px;'></TD>
Сила:
<?php
echo $user['sila'];
if ($param_bonus['sila']) echo " <b><font color=green>(+" . $param_bonus['sila'] . ")</font></b>";
?><BR>
Ловкость: <?php
echo $user['lovk'];
if ($param_bonus['lovk']) echo " <b><font color=green>(+" . $param_bonus['lovk'] . ")</font></b>";
?><BR>
Интуиция: <?php
echo $user['inta'];
if ($param_bonus['inta']) echo " <b><font color=green>(+" . $param_bonus['inta'] . ")</font></b>";
?><BR>
Выносливость: <?php
echo $user['vinos'];
if ($param_bonus['vinos']) echo " <b><font color=green>(+" . $param_bonus['vinos'] . ")</font></b>";
?><BR>
Сила: <?=$user['sila']?>
<?php if ($param_bonus['sila']) echo " <b><font color=green>(+" . $param_bonus['sila'] . ")</font></b>"; ?><BR>
Ловкость: <?=$user['lovk']?>
<?php if ($param_bonus['lovk']) echo " <b><font color=green>(+" . $param_bonus['lovk'] . ")</font></b>"; ?><BR>
Интуиция: <?=$user['inta']?>
<?php if ($param_bonus['inta']) echo " <b><font color=green>(+" . $param_bonus['inta'] . ")</font></b>"; ?><BR>
Выносливость:<?=$user['vinos']?>
<?php if ($param_bonus['vinos']) echo " <b><font color=green>(+" . $param_bonus['vinos'] . ")</font></b>"; ?><BR>
Интеллект: <?=$user['intel']?><BR>
Мудрость: <?=$user['mudra']?><BR>
<?php
if (!$pas && (($user['stats'] > 0) || ($user['master'] > 0))) {
?>
<?php if ($user['stats'] > 0 || $user['master'] > 0): ?>
<a href="main.php?edit=1">+ Способности</a>
<?php endif; ?>
<hr>
Опыт: <b><?=$user['exp']?></b> (<?= $user['nextup'] ?>) <br>
Уровень: <?=$user['level']?><br>
Побед: <?=$user['win']?><br>
Поражений: <?=$user['lose']?><br>
Ничьих: <?=$user['nich']?><br>
<?
}
echo "<hr>";
if (!$pas) {
?>
Опыт: <b><?=$user['exp']?></b> (<?= $user['nextup'] ?>)
<BR></small>
<?
} ?>
Уровень: <?=$user['level']?><BR></small>
Побед: <span title='Побед: <?= $user['win'] ?>'><?= $user['win'] ?></span><br>
Поражений: <span title='Поражений: <?= $user['lose'] ?>'><?= $user['lose'] ?></span><br>
Ничьих: <span title='Ничьих: <?= $user['nich'] ?>'><?= $user['nich'] ?></span><br>
<?
if (!$pas) {
$ekr_bank = db::c()->query('SELECT SUM(`ekr`) AS `bank_ekr`,SUM(`cr`) AS `bank_cr` FROM `bank` WHERE `owner`= ?i', $user['id'])->fetch_assoc();
?>
Деньги: <b><?=$user['money']?></b> кр.<br/>
В банке: <b><?=$ekr_bank['bank_cr']?></b> кр. / <b><?=$ekr_bank['bank_ekr']?></b> eкр.<br>
<?
}
if ($user['klan'] && !$pas) {
Деньги: <b><?=$user['money']?></b> кр.<br>
В банке: <b><?=$ekr_bank['bank_cr']?><b> кр. / <b><?=$ekr_bank['bank_ekr']?></b> eкр.<br>
<?
if ($user['klan']) {
echo "Клан: " . ClanImage($user['klan']) . "<BR></small>";
} elseif ($user['klan']) {
$clann = db::c()->query('SELECT `name`,`short` FROM `clans` WHERE `id`= ?i', $user['klan'])->fetch_assoc();
$clanname = $clann['name'];
$clannamesh = $clann['short'];
echo "<a href='encicl/index.php?section=99&page=clans1&clan=" . close_dangling_tags($clannamesh) . "' target=_blank>" . close_dangling_tags($clanname) . "</a> - " . close_dangling_tags($user['status']) . "</small><BR />";
}
if ($pas) {
$date1 = explode(" ", $user['borntime']);
$date2 = explode("-", $date1[0]);
$date3 = "" . $date2[2] . "-" . $date2[1] . "-" . $date2[0] . "";
?>
Место рождения: <b><?= $user['borncity'] ?></b><BR>
День рождения персонажа: <?= $date3 ?><br/>
<?
echo("<hr>");
if ($user['palcom'] && $pas) {
echo "Сообщение от Паладинов о причине отправки в хаос/блокировке: <br>
<font class=private>{$user['palcom']}</font>";
}
$effect = db::c()->query('SELECT `time` FROM `effects` WHERE `owner` = ?i AND `type` = ?i', $user['id'], 4)->fetch_assoc();
if ($effect['time']) {
echo "<br />Хаос еще <i>" . timeOut($effect['time'] - time()) . "</i>";
}
}
} else {
?>
<TR>
<TD colSpan=2 style="padding-left:25px;">
Сила: <?= $user['sila'] ?><BR>
Ловкость: <?= $user['lovk'] ?><BR>
Интуиция: <?= $user['inta'] ?><BR>
Выносливость: <?= $user['vinos'] ?><BR>
Интеллект: <?= $user['intel'] ?><BR>
Мудрость: <?= $user['mudra'] ?><BR>
Сила: <?=$user['sila']?><BR>
Ловкость: <?=$user['lovk']?><BR>
Интуиция: <?=$user['inta']?><BR>
Выносливость: <?=$user['vinos']?><BR>
Интеллект: <?=$user['intel']?><BR>
Мудрость: <?=$user['mudra']?><BR>
</td>
</tr></table>
<?

View File

@ -2781,8 +2781,7 @@ $online = db::c()->query('SELECT 1 FROM `online` WHERE `real_time` >= ?i', (time
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top" style="width:250px;">
<?php isset($_GET['krttime']) ? $krttime = 1 : $krttime = 0; ?>
<?= showpersout($_SESSION['uid'], 0, 0, 0, $krttime) ?>
<?php showpersout(); ?>
</td>
<td>&nbsp;</td>
<TD valign=top align=right>

View File

@ -201,7 +201,7 @@ print"<table width=\"440\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td align=\"left\"><b style='font-size:12px;'>".$ber['login']."[".$ber["level"]."]</b><IMG alt=\"Инфо\" src=\"i/inf.gif\" width=12 height=12></td>
<td align=\"left\">";
echo setHP($ber['hp'],$ber['maxhp'],$battle);
echo setHP($ber['hp'],$ber['maxhp']);
print"</td>";
if($ber['id'] == $glav_id){
print"<td align=\"left\" ><IMG alt=\"Лидер группы\" src=\"http://img.combats.com/i/misc/lead1.gif\" width=24 height=15>";

View File

@ -68,7 +68,7 @@ color: #000000;
<TABLE width=250 cellspacing=0 cellpadding=0><TR>
<TD valign=top width=250 nowrap><CENTER>
<?showpersout($user['id'],1,1,1)?>
<?showpersout(1)?>
</CENTER>
</TD></TR>
</TABLE>
@ -434,7 +434,7 @@ print"</i><BR><BR>";
<?
$bot="Лука";
$buser = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `login` = '$bot' LIMIT 1;"));
showpersout($buser['id'],1,1,1);
showpersout(1);
?>
</TD>
</TR>