2018-01-28 16:40:49 +00:00
|
|
|
|
<?php
|
|
|
|
|
session_start();
|
2018-12-12 22:43:58 +00:00
|
|
|
|
require_once 'functions.php';
|
2018-01-28 16:40:49 +00:00
|
|
|
|
|
2018-12-11 16:23:21 +00:00
|
|
|
|
$login = urldecode(filter_input(INPUT_SERVER, 'QUERY_STRING'));
|
|
|
|
|
$uid = isset($_SESSION['uid']) ? $_SESSION['uid'] : NULL;
|
|
|
|
|
$user = db::c()->query('SELECT `id`,`login`,`married`,`win`,borndate,`align`,`admin`,`realname`,`info`,`prof1`,`prof2`,`email`,`ip`,`exp`,`stats`,`money`,`room`,`doblest`
|
2018-01-29 16:18:56 +00:00
|
|
|
|
FROM `users`
|
2018-12-11 16:23:21 +00:00
|
|
|
|
WHERE `login` = "?s" OR `id` = "?s"', $login, $login)->fetch_assoc();
|
2018-01-29 16:54:23 +00:00
|
|
|
|
$own = db::c()->query('SELECT `align`,`admin` FROM `users` WHERE `id` = "?s"', $uid)->fetch_assoc();
|
2018-01-28 16:40:49 +00:00
|
|
|
|
|
2019-01-16 01:22:09 +00:00
|
|
|
|
$presents = db::c()->query('SELECT `img`,`present` FROM `inventory` WHERE type = 200 AND `present`<>"?s" AND `owner` = ?i', '', $user['id']);
|
2019-01-28 14:53:11 +00:00
|
|
|
|
$presents_new = db::c()->query('SELECT img, sender FROM `users_presents` WHERE owner = ?i',$user['id']);
|
2018-12-11 16:23:21 +00:00
|
|
|
|
|
|
|
|
|
if (empty($user['id'])): ?>
|
2018-01-28 16:40:49 +00:00
|
|
|
|
<html>
|
2019-01-16 01:22:09 +00:00
|
|
|
|
<head>
|
|
|
|
|
<meta charset="utf-8">
|
|
|
|
|
<title>Ошибка</title></head>
|
2018-01-29 16:18:56 +00:00
|
|
|
|
<body style="color: #666; background-color: #d5d5d5; text-align: center; font-family: Consolas,monospace;">
|
2018-01-29 16:41:54 +00:00
|
|
|
|
Ошибка: персонаж<?= ($login ? " <em>" . $login . "</em>" : ""); ?> не найден...
|
2018-01-29 16:18:56 +00:00
|
|
|
|
<p><a style="color: #99f" href="javascript:window.history.go(-1);">←назад</a></p>
|
2018-01-28 16:40:49 +00:00
|
|
|
|
</body>
|
|
|
|
|
</html>
|
2018-12-11 16:23:21 +00:00
|
|
|
|
<? exit(); endif; ?>
|
2018-01-28 16:40:49 +00:00
|
|
|
|
|
|
|
|
|
<html>
|
|
|
|
|
<head>
|
2018-12-11 16:23:21 +00:00
|
|
|
|
<title>Информация о <?= $user['login'] ?></title>
|
2018-01-29 16:18:56 +00:00
|
|
|
|
<meta charset=UTF-8"/>
|
|
|
|
|
<link href="css/main.css" rel="stylesheet">
|
|
|
|
|
<link href="css/tooltip.css" rel="stylesheet">
|
2018-01-28 16:40:49 +00:00
|
|
|
|
</head>
|
2018-12-11 16:23:21 +00:00
|
|
|
|
<BODY onload="<?= topsethp() ?>">
|
2019-01-16 01:22:09 +00:00
|
|
|
|
<?php if ($user['admin'] == 1 AND $own['admin'] != 1 AND file_exists('customuserdata/' . $user['id'])) die(file_get_contents('customuserdata/' . $user['id'])); ?>
|
2018-12-11 16:23:21 +00:00
|
|
|
|
<table width=100%>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="width: 250px; vertical-align: top;">
|
2018-12-27 17:44:29 +00:00
|
|
|
|
<?= showinf_pers($user['id']);
|
2018-01-28 16:40:49 +00:00
|
|
|
|
|
2018-12-11 16:23:21 +00:00
|
|
|
|
if (!empty($user['married']))
|
|
|
|
|
echo '<br><a href="inf.php?' . $user['married'] . '" target=_blank><img src="i/married.gif" class="tooltip" title="В браке с ' . $user['married'] . '"></a>';
|
2018-01-28 16:40:49 +00:00
|
|
|
|
?>
|
|
|
|
|
</td>
|
2018-12-11 16:23:21 +00:00
|
|
|
|
<td style="vertical-align: top; width: 100px; text-align: center;">
|
2018-12-13 18:07:59 +00:00
|
|
|
|
<img src="i/zodiac/<?= star_sign(substr($user['borndate'], 3, 2), substr($user['borndate'], 0, 2)); ?>.png">
|
2018-12-11 16:23:21 +00:00
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
2018-01-28 16:40:49 +00:00
|
|
|
|
<hr>
|
|
|
|
|
<!-- Нижняя часть -->
|
2018-01-29 16:18:56 +00:00
|
|
|
|
<?php
|
|
|
|
|
$effect = db::c()->query('SELECT `time` FROM `effects` WHERE `owner` = ?i AND `type` = ?i ', $user['id'], 5)->fetch_assoc();
|
2018-03-06 23:38:51 +00:00
|
|
|
|
if ($effect['time'] AND ($own['admin'] != 1)) die('<h3>Персонаж обезличен!</h3>');
|
2018-01-28 16:40:49 +00:00
|
|
|
|
if (!empty($user['realname'])) echo "Имя: " . $user['realname'] . "<br>";
|
|
|
|
|
?>
|
2018-12-11 16:23:21 +00:00
|
|
|
|
<p style="font-family: Consolas,monospace;"><?= nl2br($user['info']) ?></p>
|
|
|
|
|
<hr>
|
2019-01-28 14:53:11 +00:00
|
|
|
|
<?php if ($presents->getNumRows()): ?>
|
2018-12-11 17:40:12 +00:00
|
|
|
|
<div>
|
2018-12-11 16:23:21 +00:00
|
|
|
|
<legend>Подарки</legend>
|
|
|
|
|
<?php
|
2019-01-28 14:53:11 +00:00
|
|
|
|
while ($row = $presents->fetch_assoc())
|
|
|
|
|
echo "<img src=i/sh/{$row['img']} class='tooltip' title='Подарок от {$row['present']}'>";
|
2018-12-11 16:39:06 +00:00
|
|
|
|
?>
|
2018-12-11 17:40:12 +00:00
|
|
|
|
</div>
|
2019-01-28 14:53:11 +00:00
|
|
|
|
<?php endif; ?>
|
|
|
|
|
<?php if ($presents_new->getNumRows()): ?>
|
|
|
|
|
<div>
|
|
|
|
|
<legend>Подарки+</legend>
|
|
|
|
|
<?php
|
|
|
|
|
while ($row = $presents_new->fetch_assoc())
|
|
|
|
|
if (empty($row['sender'])) $sender = 'Анонимный подарок';
|
|
|
|
|
else $sender = 'Подарок от ' . $row['sender'];
|
|
|
|
|
echo "<img src=i/presents/{$row['img']} class='tooltip' title='Подарок от {$sender}'>";
|
|
|
|
|
?>
|
|
|
|
|
</div>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
<?php if (!empty($user['prof1']) OR !empty($user['prof2'])): ?>
|
2018-12-11 17:40:12 +00:00
|
|
|
|
<div>
|
2018-12-11 16:23:21 +00:00
|
|
|
|
<legend>Лицензии</legend>
|
|
|
|
|
<?php
|
2019-01-28 14:53:11 +00:00
|
|
|
|
if ($user['prof2'] == 21) echo ' <img src="i/prof21.png" class="tooltip" title="Лицензия наемника"> ';
|
|
|
|
|
if ($user['prof2'] == 22) echo ' <img src="i/prof22.png" class="tooltip" title="Лицензия лекаря"> ';
|
|
|
|
|
if ($user['prof1'] == 1) echo ' <img src="i/prof1.png" class="tooltip" title="Лицензия кузнеца"> ';
|
2018-12-11 16:23:21 +00:00
|
|
|
|
?>
|
2018-12-11 17:40:12 +00:00
|
|
|
|
</div>
|
2019-01-28 14:53:11 +00:00
|
|
|
|
<?php endif; ?>
|
2018-01-28 16:40:49 +00:00
|
|
|
|
|
2018-01-29 16:18:56 +00:00
|
|
|
|
<?php
|
2019-01-28 14:53:11 +00:00
|
|
|
|
# Секретный раздел
|
2019-01-18 12:25:27 +00:00
|
|
|
|
$showModeratorInfo = false;
|
2018-01-28 16:40:49 +00:00
|
|
|
|
|
|
|
|
|
# Если я любой паладин, и смотрю не админа, или я сам админ.
|
2019-01-18 12:25:27 +00:00
|
|
|
|
if ((($own['align'] == 1) AND (!$user['admin'])) OR (!empty($own['admin']))) $showModeratorInfo = true;
|
2018-01-28 16:40:49 +00:00
|
|
|
|
|
2019-01-18 12:25:27 +00:00
|
|
|
|
if ($showModeratorInfo == 1) {
|
2018-02-16 00:17:47 +00:00
|
|
|
|
$ld = db::c()->query('SELECT * FROM `lichka` WHERE `pers` = ?i ORDER BY `id` ASC', $user['id']);
|
2019-01-18 12:25:27 +00:00
|
|
|
|
$iplog = db::c()->query('SELECT idperslater FROM delo_multi WHERE idpersnow = ?i GROUP BY idperslater ASC', $user['id']);
|
|
|
|
|
|
|
|
|
|
echo "<H4>Личное дело</H4>";
|
2018-02-16 00:17:47 +00:00
|
|
|
|
while ($row_ld = $ld->fetch_assoc()) {
|
|
|
|
|
$dat = date("d.m.Y H:i", $row_ld['date']);
|
|
|
|
|
echo "<code>$dat {$row_ld['text']} </code><br />";
|
2018-01-28 16:40:49 +00:00
|
|
|
|
}
|
|
|
|
|
|
2018-12-11 16:23:21 +00:00
|
|
|
|
if ($iplog->getNumRows()) {
|
|
|
|
|
echo "<H4>Возможные мульты</H4>";
|
|
|
|
|
while ($row_iplog = $iplog->fetch_assoc()) echo nick::id($row_iplog['idperslater'])->full() . " ";
|
|
|
|
|
}
|
2018-01-28 16:40:49 +00:00
|
|
|
|
|
|
|
|
|
echo "<H4>Дополнительные сведения</H4>";
|
|
|
|
|
if (!empty($user['id'])) echo "ID: " . $user['id'] . "<br>";
|
2018-01-29 16:18:56 +00:00
|
|
|
|
if (!empty($user['email'])) echo "E-mail: " . $user['email'] . "<br>";
|
2018-01-28 16:40:49 +00:00
|
|
|
|
if (!empty($user['borndate'])) echo "День рождения: " . $user['borndate'] . "<br>";
|
|
|
|
|
if (!empty($user['ip'])) echo "IP при регистрации: " . $user['ip'] . "<br>";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($own['admin'] == 1) {
|
|
|
|
|
if (!empty($user['exp'])) echo "Oпыт: " . $user['exp'] . "<br>";
|
|
|
|
|
if (!empty($user['stats'])) echo "Число неиспользованных UP-ов: " . $user['stats'] . "<br>";
|
|
|
|
|
if (!empty($user['money'])) echo "Кредитов: " . $user['money'] . "<br>";
|
|
|
|
|
if (!empty($user['room'])) echo "Комната: " . $user['room'] . "<br>";
|
|
|
|
|
if (!empty($user['reputation'])) echo "Всего Репутации: " . $user['reputation'] . "<br>";
|
|
|
|
|
if (!empty($user['doblest'])) echo "Репутации: " . $user['doblest'] . "<br>";
|
|
|
|
|
|
2018-03-09 18:43:30 +00:00
|
|
|
|
if ($user_bank = db::c()->query('SELECT `id`,`cr`,`ekr` FROM `bank` WHERE `id` = ?i', $user['id'])) {
|
2018-12-11 16:23:21 +00:00
|
|
|
|
echo "<H4>Банковские счета</H4>";
|
|
|
|
|
while ($row_user_bank = $user_bank->fetch_assoc())
|
2018-12-11 16:43:24 +00:00
|
|
|
|
echo "№ " . $row_user_bank['id'] . ": " . $row_user_bank['cr'] . " кр, " . $row_user_bank['ekr'] . " екр.";
|
2018-01-28 16:40:49 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
?>
|
2018-01-29 16:18:56 +00:00
|
|
|
|
|
|
|
|
|
<script src="js/jquery-1.7.2.min.js"></script>
|
|
|
|
|
<script src="js/showthing.js"></script>
|
|
|
|
|
<script src="js/tooltip.js"></script>
|
|
|
|
|
<script>
|
|
|
|
|
$(function () {
|
|
|
|
|
$(".tooltip").tipTip({maxWidth: "auto", edgeOffset: 0, fadeIn: 300, fadeOut: 500});
|
|
|
|
|
});
|
|
|
|
|
</script>
|
2018-01-28 16:40:49 +00:00
|
|
|
|
</body>
|
|
|
|
|
</html>
|