Функция nick() переехала в класс Nick.
This commit is contained in:
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Разные способы отображения строки с логином персонажа.
|
||||
*/
|
||||
|
||||
class Nick extends User
|
||||
{
|
||||
private $user_data;
|
||||
|
||||
private function getInvisibilityStatus()
|
||||
{
|
||||
return db::c()->query('SELECT 1 FROM users_effects WHERE type = 1022 AND owner_id = ?i', $this->id);
|
||||
$User->login;
|
||||
}
|
||||
|
||||
/**
|
||||
* Отображение иконки склонности.
|
||||
* @return string
|
||||
*/
|
||||
private function getAlign()
|
||||
{
|
||||
if (isset($this->align)) {
|
||||
return sprintf('<img src="i/align_%s.gif">', $this->align);
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Отображение иконки клана.
|
||||
* @return string
|
||||
*/
|
||||
private function getClan()
|
||||
{
|
||||
if (isset($this->clan)) {
|
||||
return sprintf('<img src="i/clan/%s.gif">', $this->clan);
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Берем ID и возвращаем его. Что-то для обратной совместимости, скорее всего.
|
||||
* TODO: Отвязаться от функции и удалить.
|
||||
* @param $playerId
|
||||
*
|
||||
* @return Nick
|
||||
*/
|
||||
public static function id($playerId)
|
||||
{
|
||||
return new self($playerId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Возвращает строку со склонностью, кланом, логином, уровнем, ссылкой на профиль.
|
||||
*
|
||||
* @param int $showInvisibility - По умолчанию 0. Выбрать 1, если надо отображать невидимый статус.
|
||||
*
|
||||
* @return string
|
||||
* @throws \Krugozor\Database\Mysql\Exception
|
||||
*/
|
||||
public function full($showInvisibility = 0)
|
||||
{
|
||||
if ($showInvisibility && $this->getInvisibilityStatus()) {
|
||||
return '<i>невидимка</i>';
|
||||
}
|
||||
return $this->getAlign().$this->getClan().sprintf('<b>%s</b> [%s] <a href="inf.php?%s" target="_blank"><img src="i/inf.gif" style="width:12px;height:11px"></a>', $this->login, $this->level, $this->login);
|
||||
}
|
||||
|
||||
/**
|
||||
* Возвращает строку с логином или невидимым статусом.
|
||||
* @return string
|
||||
* @throws \Krugozor\Database\Mysql\Exception
|
||||
*/
|
||||
public function short()
|
||||
{
|
||||
if ($this->getInvisibilityStatus()) {
|
||||
return '<i>невидимка</i>';
|
||||
} else {
|
||||
return htmlspecialchars($this->login);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Возвращает строку со склонностью, кланом, логином, уровнем, ссылкой на профиль, здоровьем.
|
||||
* @return string
|
||||
*/
|
||||
public function battle()
|
||||
{
|
||||
return $this->getAlign().$this->getClan().sprintf('<b>%s</b> [%s] <a href="inf.php?%s" target="_blank"><img src="i/inf.gif" style="width:12px;height:11px"></a> <img src="i/herz.gif" alt="HP"> _hp_/_maxhp_', $this->login, $this->level, $this->login);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -121,7 +121,7 @@ class User
|
||||
$nameString .= ' <b>' . $this->login . '</b> ';
|
||||
}
|
||||
if ($this->clan) {
|
||||
$nameString .= sprintf('<img src="/i/klan/%s.png" >', ClanImage($this->clan));
|
||||
$nameString .= sprintf('<img src="/i/clan/%s.png" >', ClanImage($this->clan));
|
||||
}
|
||||
echo '<div class="user-info">';
|
||||
echo '<div class="info">';
|
||||
|
||||
@@ -104,7 +104,7 @@ class fbattle
|
||||
}
|
||||
if ($us && (int)$us['hp'] > 0) {
|
||||
$tr = settravma($k, 0, 86400, 1);
|
||||
$this->add_log('<span class=date>' . date("H:i") . '</span> ' . nick::id($k)->short() . ' получил повреждение: <font color=red>' . $tr . '</font><BR>');
|
||||
$this->add_log('<span class=date>' . date("H:i") . '</span> ' . Nick::id($k)->short() . ' получил повреждение: <font color=red>' . $tr . '</font><BR>');
|
||||
}
|
||||
}
|
||||
//$this->write_log ();
|
||||
@@ -803,7 +803,7 @@ class fbattle
|
||||
|
||||
function razmen_log($type, $kuda, $chem, $uron, $kto, $c1, $pokomy, $c2, $hp, $maxhp)
|
||||
{
|
||||
$this->write_stat(nick::id($kto)->short() . "|++|" . nick::id($pokomy)->short() . "|++|" . $type . "|++|" . $uron . "|++|" . $kuda . "|++|" . $chem);
|
||||
$this->write_stat(Nick::id($kto)->short() . "|++|" . Nick::id($pokomy)->short() . "|++|" . $type . "|++|" . $uron . "|++|" . $kuda . "|++|" . $chem);
|
||||
|
||||
if ($this->enemyhar['sex'] && $kto == $this->enemyhar['id']) {
|
||||
$sex1 = false;
|
||||
@@ -932,7 +932,7 @@ class fbattle
|
||||
$textuvorot = array(" <font color=green><B>уклонился</B></font> от удара ", " <font color=green><B>увернулся</B></font> от удара ", " <font color=green><B>отскочил</B></font> от удара ");
|
||||
}
|
||||
|
||||
return '<span class=date>' . date("[H:i:s]") . '</span> ' . nick::id($kto)->short() . ' ' . $textfail[rand(0, count($textfail) - 1)] . ' ' . $hark2[rand(0, count($hark2) - 1)] . ' ' . nick::id($pokomy)->short() . ' ' . $textuvorot[rand(0, count($textuvorot) - 1)] . ' ' . $textchem[rand(0, count($textchem) - 1)] . ' ' . $kuda . '.<BR>';
|
||||
return '<span class=date>' . date("[H:i:s]") . '</span> ' . Nick::id($kto)->short() . ' ' . $textfail[rand(0, count($textfail) - 1)] . ' ' . $hark2[rand(0, count($hark2) - 1)] . ' ' . Nick::id($pokomy)->short() . ' ' . $textuvorot[rand(0, count($textuvorot) - 1)] . ' ' . $textchem[rand(0, count($textchem) - 1)] . ' ' . $kuda . '.<BR>';
|
||||
break;
|
||||
//блок
|
||||
case "block":
|
||||
@@ -941,7 +941,7 @@ class fbattle
|
||||
} else {
|
||||
$textblock = array(" заблокировал удар ", " остановил удар ", " отбил удар ");
|
||||
}
|
||||
return '<span class=date>' . date("[H:i:s]") . '</span> ' . nick::id($kto)->short() . ' ' . $textfail[rand(0, count($textfail) - 1)] . ' ' . $hark2[rand(0, count($hark2) - 1)] . ' ' . nick::id($pokomy)->short() . ' ' . $textblock[rand(0, count($textblock) - 1)] . ' ' . $textchem[rand(0, count($textchem) - 1)] . ' ' . $kuda . '.<BR>';
|
||||
return '<span class=date>' . date("[H:i:s]") . '</span> ' . Nick::id($kto)->short() . ' ' . $textfail[rand(0, count($textfail) - 1)] . ' ' . $hark2[rand(0, count($hark2) - 1)] . ' ' . Nick::id($pokomy)->short() . ' ' . $textblock[rand(0, count($textblock) - 1)] . ' ' . $textchem[rand(0, count($textchem) - 1)] . ' ' . $kuda . '.<BR>';
|
||||
break;
|
||||
//крит
|
||||
case "krit":
|
||||
@@ -950,7 +950,7 @@ class fbattle
|
||||
} else {
|
||||
$textkrit = array(", напугав всех, неслышно подойдя сзади ударил", ", сказав \"БУ!\", ласково ударил", ", расслабившись, ударил", ", показав сразу два пальца, ударил", ", напугав всех, укусил", ", проклиная этот сайт, ударил");
|
||||
}
|
||||
return '<span class=date>' . date("[H:i:s]") . '</span> ' . nick::id($pokomy)->short() . ' ' . $textud[rand(0, count($textud) - 1)] . ' ' . $hark[rand(0, count($hark) - 1)] . ' ' . nick::id($kto)->short() . ' ' . $textkrit[rand(0, count($textkrit) - 1)] . ' ' . $kuda . '.<b><font color=red>-' . $uron . '</font></b> [' . $hp . '/' . $maxhp . ']' . '<BR>';
|
||||
return '<span class=date>' . date("[H:i:s]") . '</span> ' . Nick::id($pokomy)->short() . ' ' . $textud[rand(0, count($textud) - 1)] . ' ' . $hark[rand(0, count($hark) - 1)] . ' ' . Nick::id($kto)->short() . ' ' . $textkrit[rand(0, count($textkrit) - 1)] . ' ' . $kuda . '.<b><font color=red>-' . $uron . '</font></b> [' . $hp . '/' . $maxhp . ']' . '<BR>';
|
||||
break;
|
||||
//крит
|
||||
case "krita":
|
||||
@@ -959,7 +959,7 @@ class fbattle
|
||||
} else {
|
||||
$textkrit = array(", напугав всех, неслышно подойдя сзади, пробив блок, ударил", ", сказав \"БУ!\", ласково, пробив блок, ударил", ", расслабившись, пробив блок, ударил", ", показав сразу два пальца, пробив блок, ударил", ", напугав всех, пробив блок, укусил", ", проклиная этот сайт, пробив блок, ударил");
|
||||
}
|
||||
return '<span class=date>' . date("[H:i:s]") . '</span> ' . nick::id($pokomy)->short() . ' ' . $textud[rand(0, count($textud) - 1)] . ' ' . $hark[rand(0, count($hark) - 1)] . ' ' . nick::id($kto)->short() . ' ' . $textkrit[rand(0, count($textkrit) - 1)] . ' ' . $kuda . '.<b><font color=red>-' . $uron . '</font> </b>[' . $hp . '/' . $maxhp . ']' . '<BR>';
|
||||
return '<span class=date>' . date("[H:i:s]") . '</span> ' . Nick::id($pokomy)->short() . ' ' . $textud[rand(0, count($textud) - 1)] . ' ' . $hark[rand(0, count($hark) - 1)] . ' ' . Nick::id($kto)->short() . ' ' . $textkrit[rand(0, count($textkrit) - 1)] . ' ' . $kuda . '.<b><font color=red>-' . $uron . '</font> </b>[' . $hp . '/' . $maxhp . ']' . '<BR>';
|
||||
break;
|
||||
// попадание
|
||||
case "udar":
|
||||
@@ -968,7 +968,7 @@ class fbattle
|
||||
} else {
|
||||
$textudar = array(", разбежавшись, рубанул", " отчаянно проткнул ", " нехотя уколол ", " не подумав, рубанул ", ", улыбаясь, саданул укол ", " приложил удар ", " ударил ", " сдуру вмазал ");
|
||||
}
|
||||
return '<span class=date>' . date("[H:i:s]") . '</span> ' . nick::id($pokomy)->short() . ' ' . $textud[rand(0, count($textud) - 1)] . ' ' . $hark[rand(0, count($hark) - 1)] . ' ' . nick::id($kto)->short() . '' . $textudar[rand(0, count($textudar) - 1)] . ' ' . $textchem[rand(0, count($textchem) - 1)] . ' ' . $kuda . ' <b>-' . $uron . '</b> [' . $hp . '/' . $maxhp . ']' . '<BR>';
|
||||
return '<span class=date>' . date("[H:i:s]") . '</span> ' . Nick::id($pokomy)->short() . ' ' . $textud[rand(0, count($textud) - 1)] . ' ' . $hark[rand(0, count($hark) - 1)] . ' ' . Nick::id($kto)->short() . '' . $textudar[rand(0, count($textudar) - 1)] . ' ' . $textchem[rand(0, count($textchem) - 1)] . ' ' . $kuda . ' <b>-' . $uron . '</b> [' . $hp . '/' . $maxhp . ']' . '<BR>';
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1065,7 +1065,7 @@ class fbattle
|
||||
// if(in_array($k,$war)) {
|
||||
unset($this->battle[$k]);
|
||||
|
||||
$this->add_log('<span class=date>' . date("H:i") . '</span> ' . nick::id($k)->short() . ' проиграл бой!<BR>');
|
||||
$this->add_log('<span class=date>' . date("H:i") . '</span> ' . Nick::id($k)->short() . ' проиграл бой!<BR>');
|
||||
|
||||
mysql_query('UPDATE `users` SET `hp` = 0, `fullhptime` = ' . time() . ' WHERE `id` = \'' . $k . '\' LIMIT 1;');
|
||||
foreach ($this->battle as $kak => $vav) {
|
||||
@@ -1200,7 +1200,7 @@ class fbattle
|
||||
if ($us && (int)$us['hp'] > 0) {
|
||||
if (!$this->battle_data['blood']) {
|
||||
$tr = settravma($k, 0, 86400, 1);
|
||||
$this->add_log('<span class=date>' . date("H:i") . '</span> ' . nick::id($k)->short() . ' получил повреждение: <font color=red>' . $tr . '</font><BR>');
|
||||
$this->add_log('<span class=date>' . date("H:i") . '</span> ' . Nick::id($k)->short() . ' получил повреждение: <font color=red>' . $tr . '</font><BR>');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1257,13 +1257,13 @@ class fbattle
|
||||
// оцениваем игроков
|
||||
//$cost1 =0; $cost2 =0; $kula4ka = 0; $t2c =0; $t1c =0; $lvs1=0; $lvs2=0; $bxp = 0;
|
||||
foreach ($this->t1 as $k => $v) {
|
||||
$nks1[] = nick::id($v)->short();
|
||||
$nks1hist[] = nick::id($v)->full(1);
|
||||
$nks1[] = Nick::id($v)->short();
|
||||
$nks1hist[] = Nick::id($v)->full(1);
|
||||
}
|
||||
$lvs1 = $lvs1 / ($t1c + 1);
|
||||
foreach ($this->t2 as $k => $v) {
|
||||
$nks2[] = nick::id($v)->short();
|
||||
$nks2hist[] = nick::id($v)->full(1);
|
||||
$nks2[] = Nick::id($v)->short();
|
||||
$nks2hist[] = Nick::id($v)->full(1);
|
||||
}
|
||||
|
||||
// тима победителей
|
||||
@@ -1271,7 +1271,7 @@ class fbattle
|
||||
$flag = 1;
|
||||
foreach ($this->t1 as $k => $v) {
|
||||
mysql_query('UPDATE `battle` SET `win` = 1 WHERE `id` = ' . $this->user['battle'] . ' LIMIT 1');
|
||||
$this->t1[$k] = nick::id($v)->short();
|
||||
$this->t1[$k] = Nick::id($v)->short();
|
||||
$this->exp[$v] = $this->exp[$v] * $opitas / 1;
|
||||
$this->exp[$v] = round($this->exp[$v]);
|
||||
|
||||
@@ -1611,7 +1611,7 @@ class fbattle
|
||||
echo "<script>console.log('Win Fiz');</script>";
|
||||
}
|
||||
|
||||
addchp('<font color=red>Внимание!</font> Победа! Бой окончен. Всего вами нанесено урона : ' . $this->damage[$v] . ' HP. Получено опыта : ' . $this->exp[$v] . ' (' . $dop_exp . '%)' . $ads . ' ', '{[]}' . nick::id($v)->short() . '{[]}');
|
||||
addchp('<font color=red>Внимание!</font> Победа! Бой окончен. Всего вами нанесено урона : ' . $this->damage[$v] . ' HP. Получено опыта : ' . $this->exp[$v] . ' (' . $dop_exp . '%)' . $ads . ' ', '{[]}' . Nick::id($v)->short() . '{[]}');
|
||||
|
||||
mysql_query('UPDATE `users` SET `win` = (`win` +1), `fullhptime` = ' . time() . ' WHERE `id` = "' . $v . '"');
|
||||
GiveExp($v, $this->exp[$v]);
|
||||
@@ -1630,7 +1630,7 @@ class fbattle
|
||||
$flag = 2;
|
||||
foreach ($this->t2 as $k => $v) {
|
||||
mysql_query('UPDATE `battle` SET `win` = 2 WHERE `id` = "' . $this->user['battle'] . '" LIMIT 1');
|
||||
$this->t2[$k] = nick::id($v)->short();
|
||||
$this->t2[$k] = Nick::id($v)->short();
|
||||
|
||||
if ($this->battle_data['aren_of'] == 1 && $this->t2[$k] && $v < _BOTSEPARATOR_) {
|
||||
mysql_query('INSERT INTO `logs_arena` (`battle`, `user`, `uid`, `damage`, `team`) VALUES ("' . $this->user['battle'] . '", "' . $this->t1[$k] . '", "' . $v . '", "' . $this->damage[$v] . '", "2")');
|
||||
@@ -1695,7 +1695,7 @@ class fbattle
|
||||
$us = mysql_query('UPDATE `inventory` SET `duration`=`duration`+1 WHERE `type` <> 12 AND `dressed` = 1 AND `owner` = \'' . $v . '\';');
|
||||
}
|
||||
$this->exp[$v] = 0;
|
||||
addchp('<font color=red>Внимание!</font> Бой окончен. Всего вами нанесено урона ' . (int)$this->damage[$v] . ' HP. Получено опыта 0. ', '{[]}' . nick::id($v)->short() . '{[]}');
|
||||
addchp('<font color=red>Внимание!</font> Бой окончен. Всего вами нанесено урона ' . (int)$this->damage[$v] . ' HP. Получено опыта 0. ', '{[]}' . Nick::id($v)->short() . '{[]}');
|
||||
mysql_query('UPDATE `users` SET `lose`=`lose` +1 WHERE `id` = \'' . $v . '\';');
|
||||
// если поединок был кровавым - еще и ставм травмы
|
||||
}
|
||||
@@ -1736,18 +1736,18 @@ class fbattle
|
||||
$us = mysql_query('SELECT duration, maxdur, name FROM `inventory` WHERE `type` <> 12 AND `dressed` = 1 AND `owner` = \'' . $v . '\';');
|
||||
while ($rrow = mysql_fetch_row($us)) {
|
||||
if (($rrow[1] - $rrow[0]) == 1)
|
||||
$this->add_log('<span class=date>' . date("[H:i:s]") . '</span> Внимание! У "' . nick::id($v)->short() . '" предмет "' . $rrow[2] . '" в критическом состоянии! <BR><small>(на правах рекламы) <b>Ремонтная мастерская oldbbk</b>. Мы даем вторую жизнь старым вещам!</small><BR>');
|
||||
$this->add_log('<span class=date>' . date("[H:i:s]") . '</span> Внимание! У "' . Nick::id($v)->short() . '" предмет "' . $rrow[2] . '" в критическом состоянии! <BR><small>(на правах рекламы) <b>Ремонтная мастерская oldbbk</b>. Мы даем вторую жизнь старым вещам!</small><BR>');
|
||||
elseif (($rrow[1] - $rrow[0]) == 2)
|
||||
$this->add_log('<span class=date>' . date("[H:i:s]") . '</span> Внимание! У "' . nick::id($v)->short() . '" предмет "' . $rrow[2] . '" нуждается в ремонте! <BR><small>(на правах рекламы) <b>Ремонтная мастерская oldbbk</b>. Мы даем вторую жизнь старым вещам!</small><BR>');
|
||||
$this->add_log('<span class=date>' . date("[H:i:s]") . '</span> Внимание! У "' . Nick::id($v)->short() . '" предмет "' . $rrow[2] . '" нуждается в ремонте! <BR><small>(на правах рекламы) <b>Ремонтная мастерская oldbbk</b>. Мы даем вторую жизнь старым вещам!</small><BR>');
|
||||
}
|
||||
}
|
||||
foreach ($this->t2 as $k => $v) {
|
||||
$us = mysql_query('SELECT duration, maxdur, name FROM `inventory` WHERE `type` <> 12 AND `dressed` = 1 AND `owner` = \'' . $v . '\';');
|
||||
while ($rrow = mysql_fetch_row($us)) {
|
||||
if (($rrow[1] - $rrow[0]) == 1)
|
||||
$this->add_log('<span class=date>' . date("[H:i:s]") . '</span> Внимание! У "' . nick::id($v)->short() . '" предмет ' . $rrow[2] . ' в критическом состоянии! <BR><small>(на правах рекламы) <b>Ремонтная мастерская oldbbk</b>. Мы даем вторую жизнь старым вещам!</small><BR>');
|
||||
$this->add_log('<span class=date>' . date("[H:i:s]") . '</span> Внимание! У "' . Nick::id($v)->short() . '" предмет ' . $rrow[2] . ' в критическом состоянии! <BR><small>(на правах рекламы) <b>Ремонтная мастерская oldbbk</b>. Мы даем вторую жизнь старым вещам!</small><BR>');
|
||||
elseif (($rrow[1] - $rrow[0]) == 2)
|
||||
$this->add_log('<span class=date>' . date("[H:i:s]") . '</span> Внимание! У "' . nick::id($v)->short() . '" предмет "' . $rrow[2] . '" нуждается в ремонте! <BR><small>(на правах рекламы) <b>Ремонтная мастерская oldbbk</b>. Мы даем вторую жизнь старым вещам!</small><BR>');
|
||||
$this->add_log('<span class=date>' . date("[H:i:s]") . '</span> Внимание! У "' . Nick::id($v)->short() . '" предмет "' . $rrow[2] . '" нуждается в ремонте! <BR><small>(на правах рекламы) <b>Ремонтная мастерская oldbbk</b>. Мы даем вторую жизнь старым вещам!</small><BR>');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1761,7 +1761,7 @@ class fbattle
|
||||
$this->add_log('<span class=date>' . date("[H:i:s]") . '</span> ... и победители стали калечить проигравших...<BR>');
|
||||
foreach ($lomka as $k => $v) {
|
||||
$tr = settravma($v, 0, 86400, 1);
|
||||
$this->add_log('<span class=date>' . date("[H:i:s]") . '</span> ' . nick::id($v)->short() . ' получил повреждение: <font color=red>' . $tr . '</font><BR>');
|
||||
$this->add_log('<span class=date>' . date("[H:i:s]") . '</span> ' . Nick::id($v)->short() . ' получил повреждение: <font color=red>' . $tr . '</font><BR>');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (c) 2018.
|
||||
* Author: Igor Barkov <lopar.4ever@gmail.com>
|
||||
* Project name: Battles-Game
|
||||
*/
|
||||
|
||||
class nick
|
||||
{
|
||||
private $user_data;
|
||||
|
||||
/**
|
||||
* nick constructor.
|
||||
* @param int $playerId
|
||||
*/
|
||||
private function __construct($playerId)
|
||||
{
|
||||
if (!$this->user_data) {
|
||||
$user = db::c()->query('
|
||||
SELECT `login`, `level`, U.`align`, `short`, (SELECT 1 FROM `effects` WHERE `owner` = U.`id` AND `type` = 1022) AS `invis`, U.`hp`, `maxhp`
|
||||
FROM `users` U
|
||||
LEFT JOIN `clans` C ON C.`id` = `klan`
|
||||
WHERE U.`id` = ?i', $playerId)->fetch_assoc();
|
||||
$this->user_data = $user;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $playerId
|
||||
* @return nick
|
||||
*/
|
||||
public static function id($playerId)
|
||||
{
|
||||
return new self($playerId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $showInvisibility
|
||||
* @return string
|
||||
*/
|
||||
public function full($showInvisibility = 0)
|
||||
{
|
||||
$n = '';
|
||||
if ($showInvisibility && isset($this->user_data['invis'])) {
|
||||
return '<i>невидимка</i>';
|
||||
} else {
|
||||
if (isset($this->user_data['align'])) {
|
||||
$n .= sprintf('<img src="i/align_%s.gif">', intval($this->user_data['align']));
|
||||
}
|
||||
if (isset($this->user_data['klan'])) {
|
||||
$n .= sprintf('<img src="i/klan/%s.gif">', htmlspecialchars($this->user_data['klan']));
|
||||
}
|
||||
}
|
||||
$n .= sprintf('<b>%s</b> [%s] <a href="inf.php?%s" target="_blank"><img src="i/inf.gif" style="width:12px;height:11px"></a>', htmlspecialchars($this->user_data['login']), intval($this->user_data['level']), htmlspecialchars($this->user_data['login']));
|
||||
|
||||
return $n;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function short()
|
||||
{
|
||||
if ($this->user_data['invis']) {
|
||||
return '<i>невидимка</i>';
|
||||
} else return htmlspecialchars($this->user_data['login']);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user