1124 lines
53 KiB
PHP
1124 lines
53 KiB
PHP
<?php
|
||
|
||
use Admin\Monster;
|
||
use Clan\ClanInfo;
|
||
use Core\Config;
|
||
use Core\Database;
|
||
use Core\Db;
|
||
use Helper\Conversion;
|
||
use Inf\Awards;
|
||
use Inf\LastNames;
|
||
use Inf\Twinks;
|
||
use Inf\Zodiac;
|
||
use Model\Constant\Stat;
|
||
use User\Effects;
|
||
|
||
if (!defined('GAME_VERSION')) {
|
||
require_once '_incl_data/autoload.php';
|
||
}
|
||
|
||
if (isset($_GET['md5'])) {
|
||
die(md5($_GET['md5']));
|
||
}
|
||
|
||
Config::init();
|
||
Database::init();
|
||
$c['inf'] = true;
|
||
|
||
include_once('_incl_data/class/__db_connect.php');
|
||
$u = User::start();
|
||
$statnames = new Stat();
|
||
$statnames->getBonus();
|
||
|
||
const LOWERCASE = 3;
|
||
const UPPERCASE = 1;
|
||
|
||
$uplogin = explode('&', $_SERVER['QUERY_STRING']);
|
||
$uplogin = $uplogin[0];
|
||
|
||
if (!isset($_GET['id'])) {
|
||
$_GET['id'] = 0;
|
||
}
|
||
|
||
if (!isset($_GET['login'])) {
|
||
$_GET['login'] = null;
|
||
}
|
||
|
||
match (true) {
|
||
!empty($_GET['id']) && $_GET['id'] > 0 => $inf = User::getInfo($_GET['id']),
|
||
!empty($_GET['login']) && $_GET['login'] !== 'delete' => $inf = User::getInfo($_GET['login']),
|
||
!empty($uplogin) && $uplogin !== 'delete' => $inf = User::getInfo($uplogin),
|
||
};
|
||
|
||
if (empty($inf) || $inf['login'] == 'delete' || $inf['login'] == 'DELETE') {
|
||
unset($inf);
|
||
} else {
|
||
if ($inf['info_delete'] > 1 && $inf['info_delete'] < time()) {
|
||
$inf['info_delete'] = 0;
|
||
Db::sql('update users set info_delete = 0 where id = ?', [$inf['id']]);
|
||
}
|
||
}
|
||
|
||
if (isset($_GET['restartmonster']) && $u->isAdmin()) { //что ты такое??
|
||
Db::sql('update stats set res_x = 0 where id = ?', [$inf['id']]);
|
||
$inf['res_x'] = 0;
|
||
}
|
||
|
||
if ($u->isAdmin() && isset($_GET['wipe']) && $u->newAct($_GET['sd4'])) {
|
||
Db::sql('update stats set wipe = 1 where id = ?', [$inf['id']]);
|
||
$uer = 'Сброс характеристик прошел успешно<br>';
|
||
}
|
||
|
||
if ($inf['room'] == 303 && $u->info['admin'] == 0) {
|
||
unset($inf);
|
||
}
|
||
|
||
if (!isset($inf['id'])) {
|
||
die('Ошибка. Персонаж не найден.');
|
||
}
|
||
|
||
$zodiac = new Zodiac($inf['bithday']);
|
||
|
||
function statInfo($s): string
|
||
{
|
||
global $st, $st2;
|
||
|
||
if (isset($st[$s])) {
|
||
$st[$s] = (int)$st[$s];
|
||
} else {
|
||
$st[$s] = 0;
|
||
}
|
||
|
||
if (isset($st2[$s])) {
|
||
$st2[$s] = (int)$st2[$s];
|
||
} else {
|
||
$st2[$s] = 0;
|
||
}
|
||
|
||
if ($st[$s] == $st2[$s]) {
|
||
return '<b>' . $st[$s] . '</b>';
|
||
} else {
|
||
$s1 = '+';
|
||
if ($st2[$s] > $st[$s]) {
|
||
$s1 = '-';
|
||
}
|
||
|
||
$colours = ['black', 'darkred', 'darkgreen', 'green'];
|
||
|
||
$si = 0;
|
||
if ($s1 == '-') {
|
||
$si = 2;
|
||
}
|
||
$t = $st[$s];
|
||
$j = $st[$s] - $st2[$s];
|
||
$t = $t - $j;
|
||
if ($j > 0) {
|
||
if ($t == 0) {
|
||
$t = 1;
|
||
}
|
||
$d = $j * 100 / $t;
|
||
if ($d < 0 && $t + $j >= 0) {
|
||
$d = 100;
|
||
}
|
||
if ($d < 33) {
|
||
$si = 2;
|
||
} elseif ($d > 100) {
|
||
$si = 3;
|
||
}
|
||
} elseif ($j < 0) {
|
||
$si = 1;
|
||
}
|
||
|
||
if ($st[$s] < 0 || $st[$s] <= round($st2[$s])) {
|
||
$si = 1;
|
||
}
|
||
|
||
return '<b style="color:' . $colours[$si] . '">' . $st[$s] . '</b> <small>(' . $st2[$s] . ' ' . $s1 . ' ' . abs($st[$s] - $st2[$s]) . ')</small>';
|
||
}
|
||
}
|
||
|
||
$room['name'] = $inf['room_name'];
|
||
|
||
$nopal = false;
|
||
|
||
if (!$u->isAdmin() && $inf['admin'] > 0) {
|
||
$nopal = true;
|
||
}
|
||
|
||
if ($inf['inTurnir'] > 0 && ($u->info['inTurnir'] == $inf['inTurnir'] || $u->isAdmin())) {
|
||
$bs = mysql_fetch_array(mysql_query('SELECT * FROM `bs_turnirs` WHERE `id` = "' . $inf['inTurnir'] . '" LIMIT 1'));
|
||
if (isset($bs['id']) && ($bs['users'] <= 2 || $bs['type_btl'] == 1)) {
|
||
$bs_rm = mysql_fetch_array(
|
||
mysql_query(
|
||
'SELECT `id`,`name` FROM `bs_map` WHERE `mid` = "' . $bs['type_map'] . '" AND `x` = "' . $inf['x'] . '" AND `y` = "' . $inf['y'] . '" LIMIT 1'
|
||
)
|
||
);
|
||
if (isset($bs_rm['id'])) {
|
||
$room['name'] .= ' - ' . $bs_rm['name'];
|
||
}
|
||
}
|
||
}
|
||
|
||
$st = [];
|
||
$st2 = [];
|
||
$st = $u->getStats($inf['id'], 1, 0, true);
|
||
$st2 = $st[1];
|
||
$st = $st[0];
|
||
|
||
$rgd = $u->regen($inf['id'], $st, 1);
|
||
$us = $u->getInfoPers($inf['id'], 1, $st);
|
||
|
||
if (isset($bs['id']) && $bs['type_btl'] == 2 && ($u->info['x'] != $inf['x'] || $u->info['y'] != $inf['y'])) {
|
||
$us[0] = '<div style="width:255px; height300px; text-align: center; padding: 200px 0;">Информация скрыта,<br>Вы в разных комнатах.</div>';
|
||
}
|
||
|
||
if ($inf['align'] == 9) {
|
||
$st['hpNow'] = $st['hpNow'] / ($st['hpAll'] / 100);
|
||
$st['hpAll'] = '100%';
|
||
$rgd[0] = '0.28';
|
||
}
|
||
|
||
?>
|
||
<!DOCTYPE html>
|
||
<html lang="ru">
|
||
<head>
|
||
<title>Информация о <?= $inf['login']; ?></title>
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=yes">
|
||
<script type="text/javascript" src="/js/jquery.js"></script>
|
||
<script type="text/javascript" src="/js/jquery.zclip.js"></script>
|
||
<script type="text/javascript" src="/js/jquery.cookie.js"></script>
|
||
<script type="text/javascript" src="/js/title.js"></script>
|
||
<script type="text/javascript" src="/js/hpregen.js"></script>
|
||
<link rel="stylesheet" href="<?= Config::img() ?>/css/main.css">
|
||
<link rel="stylesheet" href="/css/inf.css">
|
||
<style>
|
||
.pg_btn1 {
|
||
background-image: url(<?= Config::img() ?>/pg_btn_left.png);
|
||
}
|
||
|
||
.pg_btn2 {
|
||
background-image: url(<?= Config::img() ?>/pg_btn_right.png);
|
||
}
|
||
</style>
|
||
<script type="text/javascript">
|
||
var lafstReg = {};
|
||
|
||
function lookGift(e, id, nm, img, txt, from) {
|
||
if (from == 1) {
|
||
from = '<i>Невидимка</i>';
|
||
}
|
||
if (!e) {
|
||
e = window.event;
|
||
}
|
||
var body2 = document.body;
|
||
mX = e.x;
|
||
mY = e.y + (body2 && body2.scrollTop || 0);
|
||
var gf = document.getElementById('gi');
|
||
if (gf != undefined) {
|
||
gf.style.top = mY + 'px';
|
||
gf.style.left = mX + 'px';
|
||
if (from == '<i>Анонима</i>') {
|
||
from = '</a><i>Анонима</i><a>';
|
||
}
|
||
gf.innerHTML = `<b><span style="float:left;">${nm}</span> <span style="float:right;"> <a href="javascript:void(0);" onClick="closeGift();">X</a></span></b><br><div align="center" style="padding:5px;background-color:#dcdedc;"><img src="//img.new-combats.tech/i/items/${img}"></div>${txt}<div>Подарок от <a target="_blank" href="/info/${from}">${from}</a></div>`;
|
||
gf.innerHTML = `<small>${gf.innerHTML}</small>`;
|
||
gf.style.display = '';
|
||
}
|
||
}
|
||
|
||
function closeGift() {
|
||
var gf = document.getElementById('gi');
|
||
if (gf != undefined) {
|
||
gf.innerHTML = '';
|
||
gf.style.display = 'none';
|
||
}
|
||
}
|
||
|
||
function tstlgnthm() {
|
||
if (window.opener && (window.opener.textmsg != undefined || window.opener.parent.textmsg != undefined)) {
|
||
if (window.opener.textmsg != undefined) {
|
||
$('#lgnthm').html('<img onclick="window.opener.chat.addto(\'<?=$inf['login']?>\',\'private\');" style="cursor:pointer" title="Написать персонажу" src="//img.new-combats.tech/i/lock3.gif" width="20" height="15">' + $('#lgnthm').html());
|
||
return
|
||
}
|
||
$('#lgnthm').html('<img onclick="window.opener.parent.chat.addto(\'<?=$inf['login']?>\',\'private\');" style="cursor:pointer" title="Написать персонажу" src="//img.new-combats.tech/i/lock3.gif" width="20" height="15">' + $('#lgnthm').html());
|
||
}
|
||
}
|
||
</script>
|
||
</head>
|
||
<body style="padding-top:0; margin-top:7px; height:100%; background-color:#E2E0E1;">
|
||
<div id="ttl" class="ttl_css" style="display:none;z-index:1111;"></div>
|
||
<div id="gi" class="gifin" style="display:none;z-index:1110;"></div>
|
||
<?php
|
||
if (isset($uer)) {
|
||
echo '<div style="color: red;">' . $uer . '</div><br>';
|
||
} ?>
|
||
<div class="grid-container-main">
|
||
<div>
|
||
|
||
<div style="margin-left:11px; text-align: center;">
|
||
<?= $us ? $us[0] : '<img src="https://placehold.co/240x280?text=No%20Data" alt="nan">' ?>
|
||
</div>
|
||
<!-- pos2 -->
|
||
<div></div>
|
||
<div></div>
|
||
<script>
|
||
tstlgnthm();
|
||
lafstReg[<?= $inf['id']; ?>] = 1;
|
||
startHpRegen('top', <?= $inf['id'] . ',' . (0 + $st['hpNow']) . ',' . (0 + $st['hpAll']) . ',' . (0 + $st['mpNow']) . ',' . (0 + $st['mpAll']) . ',' . (time() - $inf['regHP']) . ',' . (time() - $inf['regMP']) . ',' . (0 + $rgd[0]) . ',' . (0 + $rgd[1]); ?>, 1);
|
||
</script>
|
||
<!-- pos1 -->
|
||
<?php
|
||
//Персонаж онлайн
|
||
if ($inf['battle']) {
|
||
$b = new \Model\BattleModel($inf['battle']);
|
||
$battleid = $b->battle->time_over == 0 ? $b->battle->id : false;
|
||
unset($b);
|
||
}
|
||
|
||
if ($inf['room'] != 303) {
|
||
if ($inf['online'] > time() - 520 && $inf['banned'] == 0 && $inf['invis'] != 1 && $inf['invis'] < time()) {
|
||
echo 'Персонаж сейчас находится в клубе.<br><b>"' . $room['name'] . '"</b>';
|
||
} else {
|
||
echo 'Персонаж не в клубе';
|
||
|
||
if ($inf['online'] == 0) {
|
||
$inf['online'] = $inf['timeREG'];
|
||
}
|
||
if (date('Y', $inf['online']) == date('Y')) {
|
||
echo ', но был тут:<br>' . date('d.m.Y H:i', $inf['online']) .
|
||
'<img title="Время сервера" alt="Время сервера" src="' . Config::img() . '/i/clok3_2.png">' .
|
||
'<br>(' . Conversion::secondsToTimeout(time() - $inf['online']) . ' назад)';
|
||
}
|
||
}
|
||
if ($inf['inUser'] > 0 && $inf['id'] != 12059) {
|
||
echo '<br>Персонаж вселился в <a target="_blank" href="/info/' . $inf['inUser'] . '">бота</a>';
|
||
}
|
||
if ($inf['battle'] > 0 && $battleid) {
|
||
echo '<br>Персонаж сейчас в <a target="_blank" href="/logs.php?log=' . $battleid . '">поединке</a>';
|
||
}
|
||
} else {
|
||
if ($inf['res_x'] - time() > 0) {
|
||
echo '<div style="padding-top:3px; text-align: center;">Появится через <b>' . Conversion::secondsToTimeout($inf['res_x'] - time()) . '</b></div>';
|
||
} else {
|
||
echo '<div style="padding-top:3px; text-align: center;">Появится в ближайшее время...<br></div>';
|
||
}
|
||
}
|
||
//Эффект админ
|
||
if ($u->isAdmin()) {
|
||
function effAdm($pl): string
|
||
{
|
||
if ($pl['v1'] != 'priem') {
|
||
$eff = Db::getRow('select img, actionTime from eff_main where id2 = ?', [$pl['id_eff']]);
|
||
$pl['img2'] = $eff['img'];
|
||
$pl['name'] .= "\r" . 'Действует еще ' . Conversion::secondsToTimeout($pl['timeUse'] - time() + $eff['actionTime']);
|
||
}
|
||
|
||
return '<img onDblClick="location.href=\'/info/' . $pl['uid'] . '&cancel_eff=' . $pl['id'] . '\'" style="padding:1px;" ' .
|
||
' title="' . $pl['name'] . '" src="' . Config::img() . '/i/eff/' . $pl['img2'] . '" width="40" height="25">';
|
||
}
|
||
|
||
if (isset($_GET['cancel_eff'])) {
|
||
Effects::removeByEffectId($inf['id'], (int)$_GET['cancel_eff']);
|
||
die('<script>top.location.href="/info/' . $inf['id'] . '"</script>');
|
||
}
|
||
|
||
$eff_adm = '';
|
||
foreach (Effects::getActive($inf['id']) as $effect) {
|
||
$eff_adm .= effAdm($effect);
|
||
}
|
||
|
||
if (!empty($eff_adm)) {
|
||
echo '<br><small style="display:block;text-align:center;">Эффекты на персонаже:<br>' . $eff_adm . '</small>';
|
||
}
|
||
?>
|
||
<br>
|
||
<script>
|
||
function mf_admin_statsfx() {
|
||
if ($('#mf_admin_stats').css('display') == 'none') {
|
||
$('#mf_admin_stats').css('display', '');
|
||
$('#mf_admin_statstxt').html('Скрыть');
|
||
return
|
||
}
|
||
$('#mf_admin_stats').css('display', 'none');
|
||
$('#mf_admin_statstxt').html('Показать');
|
||
|
||
}
|
||
</script>
|
||
<div id="mf_admin_stats" style="display:none;">
|
||
<div style="height:1px; width:240px; background-color:#999999; margin:3px; text-align: center;"></div>
|
||
<div style="padding:5px;">
|
||
<small>
|
||
<?php
|
||
|
||
foreach ($statnames->sysBonusNames as $stat) {
|
||
if (empty($st[$stat]) || empty($u->is[$stat])) {
|
||
continue;
|
||
}
|
||
if ($st[$stat] > 0) {
|
||
$st[$stat] = '+' . $st[$stat];
|
||
}
|
||
|
||
echo '• ' . $statnames->bonusNames[$stat] . ': ' . $st[$stat] . ' <br>';
|
||
}
|
||
?>
|
||
</small>
|
||
</div>
|
||
</div>
|
||
<div style="height:1px; width:240px; background-color:#999999; margin:3px; text-align: center;">
|
||
<div onClick="mf_admin_statsfx();"
|
||
style="border:1px solid #999999; cursor:pointer; background-color:#EAEAEA; width:150px; text-align: center; font-size: small;">
|
||
<span id="mf_admin_statstxt">Показать</span> модификаторы
|
||
</div>
|
||
</div>
|
||
<?php
|
||
}
|
||
?>
|
||
|
||
</div>
|
||
<div class="center">
|
||
|
||
<?php
|
||
if ($u->isAdmin()) {
|
||
$nodell = Db::getRow('select id, inUser from users where login = ? order by id limit 1', [$inf['login']]);
|
||
$sp = Db::getRows('select id from users where login = ? and id != ?', [$inf['login'], $inf['id']]);
|
||
$nolog = '';
|
||
foreach ($sp as $pl) {
|
||
if (isset($_GET['del_copy']) && $_GET['del_copy'] == $pl['id']) {
|
||
if ($nodell['inUser'] != $pl['id'] && $pl['id'] != $nodell['id']) {
|
||
Db::sql('update users set login = ? where id = ?', ['DELETE', $pl['id']]);
|
||
}
|
||
} else {
|
||
$nolog .= '<div>' . User::getLogin($pl['id']);
|
||
if ($nodell['inUser'] != $pl['id'] && $pl['id'] != $nodell['id']) {
|
||
$nolog .= ' (персонажа можно <a href="?' . $inf['id'] . '&del_copy=' . $pl['id'] . '">удалить</a>)';
|
||
}
|
||
if ($pl['id'] == $nodell['id']) {
|
||
$nolog .= ' (основной персонаж)';
|
||
}
|
||
$nolog .= '</div>';
|
||
}
|
||
}
|
||
|
||
if (!empty($nolog)) {
|
||
echo '<small><b>Копии персонажа:</b>' . $nolog . '</small>';
|
||
}
|
||
|
||
}
|
||
?>
|
||
<div style="padding:5px;">
|
||
Сила: <?= statInfo('s1'); ?><br>
|
||
Ловкость: <?= statInfo('s2'); ?><br>
|
||
Интуиция: <?= statInfo('s3'); ?><br>
|
||
Выносливость: <?= statInfo('s4'); ?><br>
|
||
Интеллект: <?= statInfo('s5'); ?><br>
|
||
Мудрость: <?= statInfo('s6'); ?><br>
|
||
<?php if ($inf['level'] > 9 || $st['s7'] != 0) { ?>
|
||
Духовность: <?= statInfo('s7'); ?><br>
|
||
<?php } ?>
|
||
Рейтинг сегодня: <b><?= $inf['repexp']; ?></b><br>
|
||
</div>
|
||
<div style="height:1px; background-color:#999999; margin:3px;"></div>
|
||
<div style="padding:5px;">
|
||
Уровень: <?= $inf['level']; ?><br>
|
||
<?php if ($inf['no_ip'] != 'trupojor') {
|
||
$inf['win'] = number_format($inf['win'], 0, ',', ' ');
|
||
$inf['lose'] = number_format($inf['lose'], 0, ',', ' ');
|
||
$inf['nich'] = number_format($inf['nich'], 0, ',', ' ');
|
||
?>
|
||
Побед:
|
||
<?= '<a title="Персонаж учавствует в рейтинге" href="/rating_pers/id' . $inf['id'] . '#' . $inf['id'] . '" target="_blank">' . $inf['win'] . '</a>'; ?><br>
|
||
Поражений: <?= $inf['lose'] ?><br>
|
||
Ничьих: <?= $inf['nich'] ?><br>
|
||
<?php }
|
||
$inf['mod_zvanie'] = htmlspecialchars($inf['mod_zvanie'] ?? '');
|
||
|
||
if ($inf['clan'] > 0) {
|
||
$pc = ClanInfo::getById($inf['clan']);
|
||
|
||
if (isset($pc['id'])) {
|
||
if ($inf['clan_prava'] == 'glava') {
|
||
$inf['mod_zvanie'] = '- <b style="color: teal;">Глава клана</b>';
|
||
} elseif (!empty($inf['mod_zvanie'])) {
|
||
$inf['mod_zvanie'] = '- ' . htmlspecialchars($inf['mod_zvanie'], null);
|
||
$inf['mod_zvanie'] = str_replace('<b>', '<b>', $inf['mod_zvanie']);
|
||
$inf['mod_zvanie'] = str_replace('</b>', '</b>', $inf['mod_zvanie']);
|
||
$inf['mod_zvanie'] = str_replace('<u>', '<u>', $inf['mod_zvanie']);
|
||
$inf['mod_zvanie'] = str_replace('</u>', '</u>', $inf['mod_zvanie']);
|
||
$inf['mod_zvanie'] = str_replace('<i>', '<i>', $inf['mod_zvanie']);
|
||
$inf['mod_zvanie'] = str_replace('</i>', '</i>', $inf['mod_zvanie']);
|
||
}
|
||
echo 'Клан: <a href="/clan/' . $pc['id'] . '" target="_blank">' . $pc['name'] . '</a> ' . $inf['mod_zvanie'] . '<br>';
|
||
} elseif ($u->isAdmin()) {
|
||
echo '<i style="color: dimgrey;">Подана заявка на регистрацию клана или ошибка в базе кланов.</i>';
|
||
}
|
||
}
|
||
|
||
$accountStatus = new class {
|
||
public static function print(bool $condition, string $type, string $color, string $status = ''): void
|
||
{
|
||
if (!$condition) {
|
||
return;
|
||
}
|
||
echo "<b style='color: $color;'>$type</b>";
|
||
if (!empty($status)) {
|
||
echo " - $status";
|
||
}
|
||
echo '<br>';
|
||
}
|
||
};
|
||
|
||
$accountStatus::print(!empty($inf['admin']), 'Администратор', 'green');
|
||
$accountStatus::print($inf['pass'] === 'saintlucia' && $u->isAdmin(), 'NPC', 'dimgray');
|
||
$accountStatus::print(
|
||
($inf['align'] > 1 && $inf['align'] < 2 || $inf['align'] > 3 && $inf['align'] < 4) && empty($inf['admin']),
|
||
'Модератор',
|
||
'green',
|
||
$inf['mod_zvanie']);
|
||
$accountStatus::print($inf['align'] === 50, 'Алхимик', 'orange', $inf['mod_zvanie']);
|
||
|
||
echo 'День рождения персонажа: ';
|
||
if (empty($inf['timereg'])) {
|
||
echo 'До начала времен...';
|
||
} else {
|
||
echo date('d.m.Y', $inf['timereg']);
|
||
}
|
||
echo '<br>';
|
||
|
||
$twinks = new Twinks($inf['id'], $inf['twink']);
|
||
$lastnames = new LastNames($inf['id']);
|
||
$ai = new Achievements($u);
|
||
$awards = new Awards($inf['id']);
|
||
$status = new \Inf\Status();
|
||
|
||
$achievements = '';
|
||
foreach ($ai->getTypes() as $type) {
|
||
$i = $ai->getInfo($inf['id']);
|
||
if (empty($i[$type])) {
|
||
continue;
|
||
}
|
||
$achievements .=
|
||
'<div class="dvfirs">' .
|
||
'<div class="dvsec">' . $i['name' . $type] . '</div>' .
|
||
'<div class="dvtre">Ранг <b>' . $i['klas' . $type] . '</b> : </div>' .
|
||
'<progress value="' . $i['klasP' . $type] . '" max="100" class="prog' . $i['klas' . $type] . '"> ' . $i['name' . $type] . ' </progress>' .
|
||
'</div>';
|
||
}
|
||
|
||
if ($inf['align'] == 50) {
|
||
$awards->addCustom('Официальный дилер', 'Имеет право вести коммерческую деятельность.', 'alchemy1.gif');
|
||
}
|
||
|
||
if ($inf['vip'] === 1) {
|
||
$awards->addCustom('За помощь в развитии проекта.', '', 'vip2.gif');
|
||
}
|
||
|
||
if (!empty($inf['marry'])) {
|
||
$partner = Db::getValue('select login from users where id = ?', [$inf['marry']]);
|
||
if ($partner) {
|
||
$awards->addCustom('Семейные узы', "В счастливом браке с <b>$partner</b>.", 'i/i_marry.gif');
|
||
}
|
||
}
|
||
|
||
//сам себя наебал, condition не заменяет isset, а вот ?? null это уже чисто костыль, который будет тут висеть пока не придёт ясность как формируется $st
|
||
$status->add($inf['jail'] > time(), 'В заточении', $inf['jail'], 'i/jail.gif');
|
||
$status->add(!empty($st['puti']), 'Не может передвигаться', $st['puti'] ?? null, 'i/items/chains.gif');
|
||
$status->add($inf['molch1'] > time(), 'Не может общаться в чате', $inf['molch1'], 'i/sleeps' . $inf['sex'] . '.gif');
|
||
$status->add($inf['molch2'] > time(), 'Не может общаться на форуме', $inf['molch2'], 'i/fsleeps' . $inf['sex'] . '.gif');
|
||
$status->add($inf['clan_delay'] > time(), 'Не может вступать в кланы', $inf['clan_delay']);
|
||
$status->add($inf['info_delete'] > time() || $inf['info_delete'] === 1, 'Профиль скрыт', $inf['info_delete'], 'stopinfo.png');
|
||
|
||
foreach (Effects::getAllInjuries($inf['id']) as $injury) {
|
||
$status->add(true, 'Травма: «<b>' . $injury['name'] . '</b>»', $injury['timeUse'] + $injury['timeAce'], 'i/jail.gif');
|
||
}
|
||
|
||
$twinks->print();
|
||
$lastnames->print();
|
||
?>
|
||
</div>
|
||
<div style="height:1px; background-color:#999999; margin: 3px 3px 7px;"></div>
|
||
<!-- значки -->
|
||
|
||
<?php
|
||
$awards->print();
|
||
$status->print();
|
||
|
||
if (!empty($achievements)) {
|
||
echo <<<HTML
|
||
<div style="padding-top:20px;">
|
||
<div style="padding-bottom:10px;">
|
||
<u>Достижения персонажа:</u>
|
||
</div>
|
||
<div style="float: left; width: 800px;">$achievements</div>
|
||
</div>
|
||
HTML;
|
||
}
|
||
|
||
if ($inf['banned'] > 0 || $inf['jail'] > time()) {
|
||
Delo::printPublicModerationStatus($inf['id']);
|
||
}
|
||
|
||
//подарки (это какой-то сферический пиздец в вакууме!)
|
||
if ($inf['info_delete'] < time() && $inf['info_delete'] != 1 || $u->isModerator()) {
|
||
$gs = ['', '', ''];
|
||
$i = 0;
|
||
$ij1 = 1;
|
||
$ij2 = 1;
|
||
|
||
$q1 = "select * from items_users left join items_main on items_main.id = items_users.item_id
|
||
where uid = ? and gift != '' order by items_users.id desc";
|
||
$presentsList1 = Db::getRows($q1, [$inf['id']]);
|
||
|
||
foreach ($presentsList1 as $pl) {
|
||
if (stristr($pl['data'], 'gift_id')) {
|
||
$po = Conversion::dataStringToArray($pl['data']);
|
||
$pl_gift = $po['gift_id'];
|
||
if ($pl_gift > 0) {
|
||
$pl_gift = Db::getRow('select name, img from users_gifts where id = ?', [$pl_gift]);
|
||
if ($pl_gift) {
|
||
//Именной подарок
|
||
$pl['name'] = $pl_gift['name'];
|
||
$pl['img'] = $pl_gift['img'];
|
||
}
|
||
}
|
||
}
|
||
//подарки
|
||
if ($pl['gift'] == 1) {
|
||
$pl['gift2'] = 'Невидимка';
|
||
} else {
|
||
$pl['gift2'] = $pl['gift'];
|
||
}
|
||
$gs[0] .= '<img src="' . Config::img() . '/i/items/' . $pl['img'] . '" style="margin:1px 1px 0 0;display:block;float:left;cursor:pointer;" ' .
|
||
' onClick="lookGift(event,0,\'' . $pl['name'] . '\',\'' . $pl['img'] . '\',\'' . $pl['gtxt1'] . '\',\'' . $pl['gift'] . '\');" ' .
|
||
' title="' . $pl['gtxt1'] . 'Подарок от ' . $pl['gift2'] . '" />';
|
||
$ij1++;
|
||
}
|
||
|
||
$q2 = "select * from items_users left join items_main on items_main.id = items_users.item_id
|
||
where uid = ? and gift != '' and inOdet = 0 and (type in (63,37) or data like '%|giftsee=2%') order by items_users.id desc";
|
||
$presentsList2 = Db::getRows($q2, [$inf['id']]);
|
||
|
||
foreach ($presentsList2 as $pl) {
|
||
if ($pl['gift'] == 1) {
|
||
$pl['gift2'] = 'Невидимка';
|
||
} else {
|
||
$pl['gift2'] = $pl['gift'];
|
||
}
|
||
$gs[1] .= '<img src="' . Config::img() . '/i/items/' . $pl['img'] . '" style="margin:1px 1px 0 0;display:block;float:left;cursor:pointer;" ' .
|
||
' onClick="lookGift(event,0,\'' . $pl['name'] . '\',\'' . $pl['img'] . '\',\'' . $pl['gtxt1'] . '\',\'' . $pl['gift'] . '\');" ' .
|
||
' title="' . $pl['gtxt1'] . 'Подарок от ' . $pl['gift2'] . '" />';
|
||
$ij2++;
|
||
}
|
||
|
||
if (!empty($gs[0]) || !empty($gs[1])) {
|
||
echo '<br><br><table style="max-width:1260px; width:800px;"><tr><td>' .
|
||
'<div style="padding-top:20px; padding-bottom:2px;"><u>Подарки:</u></div><br>' . $gs[0] .
|
||
'</td></tr>' .
|
||
'<tr><td style="padding-top:7px;">' .
|
||
$gs[1] .
|
||
'</td></tr></table>';
|
||
|
||
$q3 = "select count(items_users.id) from items_users left join items_main on items_main.id = items_users.item_id
|
||
where (type in (28,63,38,64,37) or data like '%|giftsee=1' or data like '%|giftsee=2%') and uid = ? and gift != '' and inOdet = 0";
|
||
$ij4 = Db::getValue($q3, [$inf['id']]);
|
||
|
||
if ($ij1 + $ij2 + 1 < $ij4) {
|
||
if (!isset($_GET['maxgift'])) {
|
||
echo '<small><a href="/info/' . $inf['id'] . '&maxgift=1">Нажмите сюда, чтобы увидеть все подарки...</a></small>';
|
||
} else {
|
||
echo '<small><a href="/info/' . $inf['id'] . '">Нажмите сюда, чтобы скрыть подарки</a></small>';
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
if ($inf['align'] == '9' && $u->isAdmin()) {
|
||
if (isset($_GET['emonster'])) {
|
||
$monster = new Monster($inf['id']);
|
||
|
||
?>
|
||
<b style="color:red">Параметры монстра:</b><br>
|
||
<form method="post" action="/info/<?= $inf['id'] ?>&emonster">
|
||
<table style="padding-left:10px;" width="100%" border="0" cellspacing="0" cellpadding="0">
|
||
<tr>
|
||
<td>Место появления (id комнаты):
|
||
<input type="text" name="bot_sroom" id="bot_sroom" value="<?= $monster->info['start_room'] ?>">
|
||
<input value="Обнулить ожидание" type="button" onclick="location.href='/info/<?= $inf['id'] ?>&emonster&restartmonster'"/>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Время ожидания после поражения бота:
|
||
<input name="bot_trs" id="bot_trs" value="<?= $monster->info['time_restart'] ?>" type="text"> мин.
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Исчезнет после своей победы:
|
||
<select name="bot_winback" id="bot_winback">
|
||
<option value="0">Нет</option>
|
||
<option <?php if ($monster->info['win_back'] == 1) {
|
||
echo 'selected';
|
||
} ?> value="1">Да
|
||
</option>
|
||
</select></td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<div align="left"
|
||
style="height:1px; width:300px; background-color:#999999; margin:3px;"></div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Появляется,
|
||
ДН
|
||
<select name="bot_sday" id="bot_sday">
|
||
<option value="-1">• День недели</option>
|
||
<option <?php if ($monster->info['start_day'] == 1) {
|
||
echo 'selected';
|
||
} ?> value="1">Понедельник
|
||
</option>
|
||
<option <?php if ($monster->info['start_day'] == 2) {
|
||
echo 'selected';
|
||
} ?> value="2">Вторник
|
||
</option>
|
||
<option <?php if ($monster->info['start_day'] == 3) {
|
||
echo 'selected';
|
||
} ?> value="3">Среда
|
||
</option>
|
||
<option <?php if ($monster->info['start_day'] == 4) {
|
||
echo 'selected';
|
||
} ?> value="4">Четверг
|
||
</option>
|
||
<option <?php if ($monster->info['start_day'] == 5) {
|
||
echo 'selected';
|
||
} ?> value="5">Пятница
|
||
</option>
|
||
<option <?php if ($monster->info['start_day'] == 6) {
|
||
echo 'selected';
|
||
} ?> value="6">Суббота
|
||
</option>
|
||
<option <?php if ($monster->info['start_day'] == 7) {
|
||
echo 'selected';
|
||
} ?> value="7">Воскресенье
|
||
</option>
|
||
</select>
|
||
Д
|
||
|
||
<select name="bot_sdd" id="bot_sdd">
|
||
<option value="-1">• День</option>
|
||
<?php $i = 0;
|
||
while ($i < 31) {
|
||
$i++; ?>
|
||
<option <?php if ($monster->info['start_dd'] == $i) {
|
||
echo 'selected';
|
||
} ?> value="<?= $i ?>">
|
||
<?= $i ?>
|
||
</option>
|
||
<?php } ?>
|
||
</select>
|
||
М
|
||
<select name="bot_smm" id="bot_smm">
|
||
<option value="-1">• Месяц</option>
|
||
<?php $i = 0;
|
||
while ($i < 12) {
|
||
$i++; ?>
|
||
<option <?php if ($monster->info['start_mm'] == $i) {
|
||
echo 'selected';
|
||
} ?> value="<?= $i ?>"><?= $i ?></option>
|
||
<?php } ?>
|
||
</select>
|
||
Ч
|
||
<select name="bot_shh" id="bot_shh">
|
||
<option value="-1">• Час</option>
|
||
<?php $i = -1;
|
||
while ($i < 23) {
|
||
$i++; ?>
|
||
<option <?php if ($monster->info['start_hh'] == $i) {
|
||
echo 'selected';
|
||
} ?> value="<?= $i ?>"><?= $i ?></option>
|
||
<?php } ?>
|
||
</select>
|
||
Мин
|
||
<select name="bot_smin" id="bot_smin">
|
||
<option value="-1">• Мин</option>
|
||
<?php $i = -1;
|
||
while ($i < 58) {
|
||
$i++; ?>
|
||
<option <?php if ($monster->info['start_min'] == $i) {
|
||
echo 'selected';
|
||
} ?> value="<?= $i ?>"><?= $i ?></option>
|
||
<?php } ?>
|
||
</select>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Исчезает, ДН
|
||
<select name="bot_bday" id="bot_bday">
|
||
<option value="-1">• День недели</option>
|
||
<option <?php if ($monster->info['back_day'] == 1) {
|
||
echo 'selected';
|
||
} ?> value="1">Понедельник
|
||
</option>
|
||
<option <?php if ($monster->info['back_day'] == 2) {
|
||
echo 'selected';
|
||
} ?> value="2">Вторник
|
||
</option>
|
||
<option <?php if ($monster->info['back_day'] == 3) {
|
||
echo 'selected';
|
||
} ?> value="3">Среда
|
||
</option>
|
||
<option <?php if ($monster->info['back_day'] == 4) {
|
||
echo 'selected';
|
||
} ?> value="4">Четверг
|
||
</option>
|
||
<option <?php if ($monster->info['back_day'] == 5) {
|
||
echo 'selected';
|
||
} ?> value="5">Пятница
|
||
</option>
|
||
<option <?php if ($monster->info['back_day'] == 6) {
|
||
echo 'selected';
|
||
} ?> value="6">Суббота
|
||
</option>
|
||
<option <?php if ($monster->info['back_day'] == 7) {
|
||
echo 'selected';
|
||
} ?> value="7">Воскресенье
|
||
</option>
|
||
</select>
|
||
Д
|
||
|
||
<select name="bot_bdd" id="bot_bdd">
|
||
<option value="-1">• День</option>
|
||
<?php $i = 0;
|
||
while ($i < 31) {
|
||
$i++; ?>
|
||
<option <?php if ($monster->info['back_dd'] == $i) {
|
||
echo 'selected';
|
||
} ?> value="<?= $i ?>">
|
||
<?= $i ?>
|
||
</option>
|
||
<?php } ?>
|
||
</select>
|
||
М
|
||
<select name="bot_bmm" id="bot_bmm">
|
||
<option value="-1">• Месяц</option>
|
||
<?php $i = 0;
|
||
while ($i < 12) {
|
||
$i++; ?>
|
||
<option <?php if ($monster->info['back_mm'] == $i) {
|
||
echo 'selected';
|
||
} ?> value="<?= $i ?>"><?= $i ?></option>
|
||
<?php } ?>
|
||
</select>
|
||
Ч
|
||
<select name="bot_bhh" id="bot_bhh">
|
||
<option value="-1">• Час</option>
|
||
<?php $i = -1;
|
||
while ($i < 23) {
|
||
$i++; ?>
|
||
<option <?php if ($monster->info['back_hh'] == $i) {
|
||
echo 'selected';
|
||
} ?> value="<?= $i ?>"><?= $i ?></option>
|
||
<?php } ?>
|
||
</select>
|
||
Мин
|
||
<select name="bot_bmin" id="bot_bmin">
|
||
<option value="-1">• Мин</option>
|
||
<?php $i = -1;
|
||
while ($i < 58) {
|
||
$i++; ?>
|
||
<option <?php if ($monster->info['back_min'] == $i) {
|
||
echo 'selected';
|
||
} ?> value="<?= $i ?>"><?= $i ?></option>
|
||
<?php } ?>
|
||
</select></td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<div align="left"
|
||
style="height:1px; width:300px; background-color:#999999; margin:3px;"></div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Текст появления (Логин бота <b>{b}</b>, Логины игроков <b>{u}</b>):</td>
|
||
</tr>
|
||
<tr>
|
||
<td><input value="<?= $monster->info['start_text'] ?>" name="bot_stext"
|
||
type="text" id="bot_stext" size="100" maxlength="250"></td>
|
||
</tr>
|
||
<tr>
|
||
<td>Текст исчезновения:</td>
|
||
</tr>
|
||
<tr>
|
||
<td><input value="<?= $monster->info['back_text'] ?>" name="bot_btext" type="text"
|
||
id="bot_btext" size="100" maxlength="250"></td>
|
||
</tr>
|
||
<tr>
|
||
<td>Текст победы игрока:</td>
|
||
</tr>
|
||
<tr>
|
||
<td><input value="<?= $monster->info['win_text'] ?>" name="bot_wintext"
|
||
type="text" id="bot_wintext" size="100" maxlength="250"></td>
|
||
</tr>
|
||
<tr>
|
||
<td>Текст поражения игрока:</td>
|
||
</tr>
|
||
<tr>
|
||
<td><input value="<?= $monster->info['lose_text'] ?>" name="bot_losetext"
|
||
type="text" id="bot_losetext" size="100" maxlength="250"></td>
|
||
</tr>
|
||
<tr>
|
||
<td>Текст ничьей:</td>
|
||
</tr>
|
||
<tr>
|
||
<td><input value="<?= $monster->info['nich_text'] ?>" name="bot_nichtext"
|
||
type="text" id="bot_nichtext" size="100" maxlength="250"></td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<div align="left"
|
||
style="height:1px; width:300px; background-color:#999999; margin:3px;"></div>
|
||
<b>Награда (победа игрока):</b></td>
|
||
</tr>
|
||
<tr>
|
||
<td>Кр.:</td>
|
||
</tr>
|
||
<tr>
|
||
<td><input value="<?= $monster->info['win_money1'] ?>" name="bot_winmoney1"
|
||
type="text" id="bot_winmoney1" size="100" maxlength="17"></td>
|
||
</tr>
|
||
<tr>
|
||
<td>Екр.:</td>
|
||
</tr>
|
||
<tr>
|
||
<td><input value="<?= $monster->info['win_money2'] ?>" name="bot_winmoney2"
|
||
type="text" id="bot_winmoney2" size="100" maxlength="10"></td>
|
||
</tr>
|
||
<tr>
|
||
<td>Опыт (За 100% НР монстра):</td>
|
||
</tr>
|
||
<tr>
|
||
<td><input value="<?= $monster->info['win_exp'] ?>" name="bot_winexp" type="text"
|
||
id="bot_winexp" size="100" maxlength="17"></td>
|
||
</tr>
|
||
<tr>
|
||
<td>Предметы (id@kolvo@data, ...):</td>
|
||
</tr>
|
||
<tr>
|
||
<td><input value="<?= $monster->info['win_itm'] ?>" name="bot_winitm" type="text"
|
||
id="bot_winitm" size="100" maxlength="500"></td>
|
||
</tr>
|
||
<tr>
|
||
<td>Эффект:</td>
|
||
</tr>
|
||
<tr>
|
||
<td><input value="<?= $monster->info['win_eff'] ?>" name="bot_wineff" type="text"
|
||
id="bot_wineff" size="100" maxlength="500"></td>
|
||
</tr>
|
||
<tr>
|
||
<td>Подвиги:</td>
|
||
</tr>
|
||
<tr>
|
||
<td><input value="<?= $monster->info['win_ico'] ?>" name="bot_winico" type="text"
|
||
id="bot_winico" size="100" maxlength="500"></td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<div style="height:1px; width:300px; background-color:#999999; margin:3px;"></div>
|
||
<b>Награда (поражение игрока):</b></td>
|
||
</tr>
|
||
<tr>
|
||
<td>Кр.:</td>
|
||
</tr>
|
||
<tr>
|
||
<td><input value="<?= $monster->info['lose_money1'] ?>" name="bot_losemoney1"
|
||
type="text" id="bot_losemoney1" size="100" maxlength="10"></td>
|
||
</tr>
|
||
<tr>
|
||
<td>Екр.:</td>
|
||
</tr>
|
||
<tr>
|
||
<td><input value="<?= $monster->info['lose_money2'] ?>" name="bot_losemoney2"
|
||
type="text" id="bot_losemoney2" size="100" maxlength="10"></td>
|
||
</tr>
|
||
<tr>
|
||
<td>Опыт:</td>
|
||
</tr>
|
||
<tr>
|
||
<td><input value="<?= $monster->info['lose_exp'] ?>" name="bot_loseexp"
|
||
type="text" id="bot_loseexp" size="100" maxlength="17"></td>
|
||
</tr>
|
||
<tr>
|
||
<td>Предметы:</td>
|
||
</tr>
|
||
<tr>
|
||
<td><input value="<?= $monster->info['lose_itm'] ?>" name="bot_loseitm"
|
||
type="text" id="bot_loseitm" size="100" maxlength="500"></td>
|
||
</tr>
|
||
<tr>
|
||
<td>Эффект:</td>
|
||
</tr>
|
||
<tr>
|
||
<td><input value="<?= $monster->info['lose_eff'] ?>" name="bot_loseeff"
|
||
type="text" id="bot_loseeff" size="100" maxlength="500"></td>
|
||
</tr>
|
||
<tr>
|
||
<td>Подвиги:</td>
|
||
</tr>
|
||
<tr>
|
||
<td><input value="<?= $monster->info['lose_ico'] ?>" name="bot_loseico"
|
||
type="text" id="bot_loseico" size="100" maxlength="500"></td>
|
||
</tr>
|
||
</table>
|
||
<div style="padding-left:120px;">
|
||
<input type="submit" value="Сохранить"/>
|
||
</div>
|
||
<br><br>
|
||
</form>
|
||
<div style="height:1px; width:300px; background-color:#999999; margin:3px; text-align: center;">
|
||
<div onClick="location.href='/info/<?= $inf['id'] ?>'"
|
||
style="border:1px solid #999999; cursor:pointer; background-color:#EAEAEA; width:150px; text-align: center; font-size: small">
|
||
Скрыть
|
||
</div>
|
||
</div>
|
||
<?php
|
||
} else {
|
||
?>
|
||
<div style="height:1px; width:300px; background-color:#999999; margin:3px; text-align: center;">
|
||
<div onClick="location.href='/info/<?= $inf['id'] ?>&emonster'"
|
||
style="border:1px solid #999999; cursor:pointer; background-color:#EAEAEA; width:150px; text-align: center; font-size: small;">
|
||
Настройка монстра
|
||
</div>
|
||
</div>
|
||
<?php
|
||
}
|
||
}
|
||
//темные делишки :D
|
||
if ($inf['align'] != 9 && $u->isModerator() && !$nopal) {
|
||
$m = [];
|
||
$mults = Db::getRows('select * from mults where (uid = ? or uid2 = ?) and uid != 0 and uid2 != 0', [$inf['id'], $inf['id']]);
|
||
foreach ($mults as $mult) {
|
||
$usr = $inf['id'] === $mult['uid'] ? $mult['uid2'] : $mult['uid'];
|
||
if (empty($usr) || $usr === $inf['id']) {
|
||
continue;
|
||
}
|
||
|
||
$m[] = User::getLogin($usr);
|
||
}
|
||
|
||
echo '<div style="color:#828282; margin-top: 20px;">За игроком замечены следующие темные делишки:<br><small><span class=dsc>';
|
||
if (!isset($_GET['mod_inf'])) {
|
||
echo '<a href="/info/' . $inf['id'] . '&mod_inf">Показать личное дело</a>';
|
||
} else {
|
||
//Личное дело персонажа
|
||
foreach (Delo::getAllByUserId($inf['id']) as $logstr) {
|
||
echo date('d.m.Y H:i:s', $logstr['time']) . ' ' . $logstr['text'] . '<br>';
|
||
}
|
||
echo '<a href="/info/' . $inf['id'] . '">Скрыть личное дело</a>';
|
||
}
|
||
echo '</small><br>';
|
||
|
||
//Информация для паладинов\тарманов\ангелов
|
||
|
||
if ((int)$inf['host_reg'] >= 1) {
|
||
$inf['ref'] = User::getLogin((int)$inf['host_reg']);
|
||
} else {
|
||
$inf['ref'] = '--';
|
||
}
|
||
if (!isset($inf['ipReg'])) {
|
||
$inf['ipReg'] = '--';
|
||
}
|
||
|
||
echo '<br><span style="color:red; text-decoration: underline; font-weight: bold;">Секретно!</span><br>';
|
||
echo 'День рождения: ' . $inf['bithday'] . '<br>';
|
||
echo date('Последний вход: d.m.Y H:i', $inf['online']) . '<br>';
|
||
echo '<br>';
|
||
echo 'Персонажа пригласили: ' . $inf['ref'] . '<br>' .
|
||
'IP при регистрации: ' . $inf['ipReg'] . '<br>';
|
||
|
||
echo 'Текущий IP: ' . $inf['ip'] . '<br>Последние входы:<br>';
|
||
$auth = Db::getRows('select ip, time from logs_auth where uid = ? and type = 1 order by id desc', [$inf['id']]);
|
||
foreach ($auth as $a) {
|
||
$date = date(': d.m.Y H:i', $a['time']);
|
||
echo "{$a['ip']}<small><b>$date</b></small><br>";
|
||
}
|
||
|
||
if (!empty($m)) {
|
||
echo 'Другие ники этого бойца: ' . implode(', ', $m) . '<br>';
|
||
}
|
||
|
||
$refusers = [];
|
||
$invitedByUser = Db::getRows('select ip, ipreg, online, timereg from users where host_reg = ? order by timereg desc', [$inf['id']]);
|
||
foreach ($invitedByUser as $refuser) {
|
||
$refusers[] = date('Дата регистрации: d.m.Y H:i', $refuser['timereg']) .
|
||
DIRECTORY_SEPARATOR .
|
||
date('Был тут: d.m.Y H:i ', $refuser['online']) .
|
||
User::getLogin($inf['id']) .
|
||
"<small>({$refuser['ip']}, {$refuser['ipreg']})</small>";
|
||
}
|
||
|
||
if (!empty($refusers)) {
|
||
echo '<hr><b>Рефералы бойца:</b><br>' . implode('<br>', $refusers) . '<hr>';
|
||
}
|
||
|
||
if ($u->isAdmin()) {
|
||
$mls = Db::getValue('select count(*) from users_rbk where email = ?', [$inf['mail']]) > 0;
|
||
$online = Db::getRow('select time_all, time_today from online where uid = ?', [$inf['id']]);
|
||
|
||
echo '<div style="color: darkred; margin: 5px 0;">';
|
||
echo 'Комната: ' . $inf['room'] . '<br>';
|
||
echo 'E-mail: ' . $inf['mail'];
|
||
if ($mls) {
|
||
echo ' (рассылка)';
|
||
}
|
||
echo ' & ' . $inf['send'] . '<br>';
|
||
echo "<br><button onclick='location.href=\"/info/{$inf['id']}&wipe&sd4={$u->info['nextAct']}\"'>Сбросить характеристики</button><br>";
|
||
if (isset($online['time_all'], $online['time_today'])) {
|
||
echo 'Время в онлайне (всего): ' . Conversion::secondsToTimeout($online['time_all']) .
|
||
'<br>Время в онлайне (сегодня): ' . Conversion::secondsToTimeout($online['time_today']) . '<br>';
|
||
}
|
||
echo '</div>';
|
||
}
|
||
|
||
$donatedEkr = Db::getValue('select sum(ekr) from pay_operation where uid = ? and good > 1', [$inf['id']]) ?: 0;
|
||
|
||
echo "Опыт: {$inf['exp']} <br>" .
|
||
"Нераспределённые статы: {$inf['ability']} <br>" .
|
||
"Кредиты: {$inf['money']}<br>" .
|
||
"ЕвроКредиты: {$inf['money2']}<br>" .
|
||
"<br><span class='donatedEkr'>Куплено: $donatedEkr екр.</span>";
|
||
|
||
echo '</div>';
|
||
}
|
||
?>
|
||
|
||
</div>
|
||
|
||
<div>
|
||
|
||
<img title="<?= $zodiac->getName() ?>" alt="<?= $zodiac->getName() ?>" style="margin-bottom: 25px; padding:5px;" src='<?= $zodiac->getImageLink() ?>'><br>
|
||
<a href='/news' target='_blank'>
|
||
<img style="padding:5px;" src='<?= Config::img() ?>/i/flag_gray.gif'>
|
||
</a>
|
||
|
||
</div>
|
||
<div class="bottom">
|
||
|
||
<?php if ($inf['info_delete'] == 0 || $u->isModerator()): ?>
|
||
<div style="line-height:11pt;">
|
||
<hr style="border-color:#999999;">
|
||
<h3 style="color:#8f0000">Анкетные данные</h3>
|
||
<?php if (!empty($inf['name'])): ?>
|
||
<b style="color:#444">Имя:</b> <?= $inf['name']; ?><br>
|
||
<?php endif; ?>
|
||
<b style="color:#444">Пол:</b>
|
||
<?= $inf['sex'] == 0 ? 'Мужской' : 'Женский' ?><br>
|
||
<?php if (!empty($inf['hobby'])): ?>
|
||
<b style="color:#444">Увлечения / хобби:</b><br>
|
||
<?= str_replace("\n", '<br>', $inf['hobby']) ?>
|
||
<?php endif; ?>
|
||
</div>
|
||
<?php endif; ?>
|
||
|
||
</div>
|
||
</div>
|
||
</body>
|
||
</html>
|