2018-01-28 16:40:49 +00:00
< ? php
session_start ();
include ( " config.php " );
include ( " functions.php " );
2018-01-29 18:03:28 +00:00
$login = urldecode ( filter_input ( INPUT_SERVER , 'QUERY_STRING' ));
2018-01-29 16:54:23 +00:00
$uid = isset ( $_SESSION [ 'uid' ]) ? $_SESSION [ 'uid' ] : NULL ;
2018-02-15 23:43:18 +00:00
$user = db :: c () -> query ( ' SELECT `id` , `login` , `married` , `win` , `medals` , 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-01-29 16:41:54 +00:00
WHERE `login` = " ?s " ' , $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
2018-01-29 16:18:56 +00:00
if ( empty ( $user [ 'id' ])) {
2018-01-28 16:40:49 +00:00
?>
< html >
< head >
2018-01-29 16:18:56 +00:00
< meta charset = utf - 8 " />
2018-01-28 16:40:49 +00:00
< 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 >
< ?
exit ();
}
2018-01-29 16:18:56 +00:00
?>
2018-01-28 16:40:49 +00:00
< html >
< head >
2018-03-04 02:13:54 +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-03-04 02:13:54 +00:00
< BODY bgColor = #e2e0e0 onload="<?=topsethp()?>">
2018-01-28 16:40:49 +00:00
< TABLE cellPadding = 0 cellSpacing = 0 width = 100 % border = 0 >
< TBODY >
< TR >
< TD align = left vAlign = top width = " 250 " >
< ? = showinf_pers ( $user [ 'id' ], 1 );
2018-01-29 16:18:56 +00:00
if ( ! empty ( $user [ 'married' ])) echo '<a href="inf.php?login=' . $user [ 'married' ] . '" target=_blank><img src="i/married.gif" class="tooltip" title="В браке с ' . $user [ 'married' ] . '"></a>' ;
2018-01-29 16:41:54 +00:00
$medals = explode ( " ; " , $user [ 'medals' ]);
2018-01-28 16:40:49 +00:00
for ( $i = 0 ; $i < count ( $medals ); $i ++ ) {
switch ( $medals [ $i ]) {
case " 009 " :
echo ' <img src="i/009.gif" title="Последний победитель Башни Смерти!" width=30> ' ;
break ;
case " beta_test " :
echo ' <img src="i/Beta_test.gif" title="З а помощь в бета-тесте" width=32 height=50> ' ;
break ;
}
}
if ( $user [ 'win' ] >= 20000 ) echo '<img src="i/016.gif" title="20000 Побед!">' ;
if ( $user [ 'win' ] >= 50000 ) echo '<img src="i/015.gif" title="50000 Побед!">' ;
if ( $user [ 'win' ] >= 100000 ) echo '<img src="i/014.gif" title="100000 Побед!">' ;
?>
</ TD >
< td valign = " top " width = " 100 " >
< div style = " margin: auto; width: 100px; text-align: center; " >
2018-01-29 16:18:56 +00:00
< img align = " right " src = " i/<?=star_sign(substr( $user['borndate'] , 3, 2), substr( $user['borndate'] , 0, 2));?>.gif " width = " 100 " />
< ? php
2018-01-29 16:41:54 +00:00
if (( int ) $user [ 'align' ] == 1 ) echo " <img src='/i/znaki/inf_pal.png'> " ;
if (( int ) $user [ 'admin' ] == 1 ) echo " <img src='/i/znaki/ud.png'> " ;
2018-01-29 16:18:56 +00:00
?>
2018-01-28 16:40:49 +00:00
</ div >
</ td >
</ TR >
</ TBODY >
</ TABLE >
< 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-03-04 00:47:49 +00:00
< p style = " font-family: Consolas,monospace; " >< ? = nl2br ( $user [ 'info' ]) ?> </p><hr>
2018-01-28 16:40:49 +00:00
< div id = " Content " >
< fieldset >< legend > Подарки </ legend >
2018-01-29 16:18:56 +00:00
🎁 Граждане - товарищи , подарков пока не завезли . Работаем над функционалом .
<!-- -->< ? php
// while ($row = mysql_fetch_array($data)) {
// $why_gift = mysql_fetch_assoc(mysql_query("SELECT `id` FROM `users` WHERE `login` = '" . mysql_real_escape_string($row['present']) . "' LIMIT 1"));
// echo '<a href="inf.php?' . $why_gift['id'] . '"><img src="i/sh/' . $row['img'] . '" class=\'tooltip\' border="0" title="<b>' . $row['name'] . '</b><br />Подарил: <b>' . $row['present'] . '</b><br /><b class=\'txt\'>' . $row['letter'] . '</b>" /></a> ';
// $i++;
// }
// if (isset($_GET['chest'])) {
// $chest = $_GET['chest'] + 15;
// } else {
// $chest = 15;
// }
// $data = mysql_query("SELECT * FROM `inventory` WHERE `owner` = '" . $user['id'] . "' AND (`name` LIKE '%Сундук%') AND `present` != '' AND `cost` > 24 ORDER BY `id` DESC LIMIT $chest");
// $cnt = mysql_query("SELECT `id` FROM `inventory` WHERE `owner` = '" . $user['id'] . "' AND (`name` LIKE '%Сундук%') AND `present` != '' AND `cost` > 24");
// if (mysql_num_rows($data)) {
// echo '<br />Сундуки : <br />';
// $i = 0;
// } elseif ($chest > 15 && $i >= mysql_num_rows($cnt)) {
// echo '<br /><b>Сундуков больше нет ...</b><br />';
// }
// if ($i < mysql_num_rows($cnt)) echo '<br /><a href=\'?' . $user['id'] . '&chest=' . $chest . '\'>Показать еще Сундуки</a><br />';
//
// ###Start Особые подарки###
// if (isset($_GET['uniqs'])) {
// $uniqs = $_GET['uniqs'] + 15;
// } else {
// $uniqs = 15;
// }
// $datas = mysql_query("SELECT * FROM `inventory` WHERE `owner` = '" . $user['id'] . "' AND (`name` LIKE '%Сувенир%' OR `name` LIKE '%Подарок%' OR `name` LIKE '%Валентинка%' OR `name` LIKE '%Открытка%' OR `name` LIKE 'Ель%' OR `name` LIKE '%Медаль%' OR `name` LIKE '%Статуэтка%'OR `name` LIKE '%Уник%') AND `present` != '' AND `cost` > 24 ORDER BY `id` DESC LIMIT $uniqs");
// $cnt = mysql_query("SELECT `id` FROM `inventory` WHERE `owner` = '" . $user['id'] . "' AND (`name` LIKE '%Сувенир%' OR `name` LIKE '%Подарок%' OR `name` LIKE '%Валентинка%' OR `name` LIKE '%Открытка%' OR `name` LIKE 'Ель%' OR `name` LIKE '%Медаль%' OR `name` LIKE '%Статуэтка%'OR `name` LIKE '%Уник%') AND `present` != '' AND `cost` > 24");
// if (mysql_num_rows($datas)) echo '<br /><br />Уникальные подарки : <br />';
// $i = 0;
// while ($row = mysql_fetch_array($datas)) {
// $why_gift = mysql_fetch_assoc(mysql_query("SELECT `id` FROM `users` WHERE `login` = '" . mysql_real_escape_string($row['present']) . "' LIMIT 1"));
// echo '<a href="inf.php?' . $why_gift['id'] . '"><img src="i/sh/' . $row['img'] . '" border="0" class=\'tooltip\' title="<b>' . $row['name'] . '</b><br />Подарил: <b>' . $row['present'] . '</b><br /><b class=\'txt\'>' . $row['letter'] . '</b>" /></a> ';
// $i++;
// }
// if ($i < mysql_num_rows($cnt)) {
// echo '<br /><a href=\'?' . $user['id'] . '&uniqs=' . $uniqs . '\'>Показать еще Уникальные подарки</a><br />';
// } elseif ($uniqs > 15 && $i >= mysql_num_rows($cnt)) {
// echo '<br /><b>Уникальных подарков больше нет ...</b><br />';
// }
// ###End Особые подарки###
//
// if (isset($_GET['gifts'])) {
// $gifts = $_GET['gifts'] + 15;
// } else {
// $gifts = 15;
// }
// $data = mysql_query("SELECT * FROM `inventory` WHERE `owner` = '" . $user['id'] . "' AND (`name` LIKE '%Сувенир%' OR `name` LIKE '%Подарок%' OR `name` LIKE '%Валентинка%' OR `name` LIKE '%Открытка%' OR `name` LIKE 'Ель%' OR `name` LIKE '%Медаль%' OR `name` LIKE '%Статуэтка%'OR `name` LIKE '%Статуэтка%') AND `present` != '' AND `cost` < 24 ORDER BY `id` DESC LIMIT $gifts");
// $cnt = mysql_query("SELECT `id` FROM `inventory` WHERE `owner` = '" . $user['id'] . "' AND (`name` LIKE '%Сувенир%' OR `name` LIKE '%Подарок%' OR `name` LIKE '%Валентинка%' OR `name` LIKE '%Открытка%' OR `name` LIKE 'Ель%' OR `name` LIKE '%Медаль%' OR `name` LIKE '%Статуэтка%'OR `name` LIKE '%Статуэтка%') AND `present` != '' AND `cost` < 24");
// if (mysql_num_rows($data)) echo '<br /><br />Сувениры : <br />';
// $i = 0;
// while ($row = mysql_fetch_array($data)) {
// $why_gift = mysql_fetch_assoc(mysql_query("SELECT `id` FROM `users` WHERE `login` = '" . mysql_real_escape_string($row['present']) . "' LIMIT 1"));
// echo '<a href="inf.php?' . $why_gift['id'] . '"><img src="i/sh/' . $row['img'] . '" border="0" class=\'tooltip\' title="<b>' . $row['name'] . '</b><br />Подарил: <b>' . $row['present'] . '</b><br /><b class=\'txt\'>' . $row['letter'] . '</b>" /></a>';
// $i++;
// }
// if ($i < mysql_num_rows($cnt)) {
// echo '<br /><a href=\'?' . $user['id'] . '&gifts=' . $gifts . '\'>Показать еще Сувениры</a><br />';
// } elseif ($gifts > 15 && $i >= mysql_num_rows($cnt)) {
// echo '<br /><b>Сувениров больше нет ...</b><br />';
// }
//
// ?>
2018-01-28 16:40:49 +00:00
</ fieldset >
< fieldset style = " width: 250px; height: 75px; " >< legend > Лицензии </ legend >
2018-01-29 16:18:56 +00:00
< ? php
2018-01-28 16:40:49 +00:00
if ( $user [ 'prof2' ] == 21 ) echo ' <img src="i/prof21.png" class="tooltip" title="<b>Лицензия наемника</b>" /> ' ;
if ( $user [ 'prof2' ] == 22 ) echo ' <img src="i/prof22.png" class="tooltip" title="<b>Лицензия лекаря</b>" /> ' ;
if ( $user [ 'prof1' ] == 1 ) echo ' <img src="i/prof1.png" class="tooltip" title="<b>Лицензия кузнеца</b>" /> ' ;
if ( $user [ 'prof1' ] == 2 ) echo ' <img src="i/prof1.png" class="tooltip" title="<b>Лицензия наставника</b>" /> ' ;
?>
</ fieldset >
</ div >
2018-01-29 16:18:56 +00:00
< ? php
2018-01-28 16:40:49 +00:00
# Секретыный раздел
$okld = 0 ;
$okdop = 0 ;
# Если я любой паладин, и смотрю не админа, или я сам админ.
if (((( int ) $own [ 'align' ] == 1 ) AND ( ! $user [ 'admin' ])) OR ( ! empty ( $own [ 'admin' ]))) $okld = 1 ;
# Если я любой паладин выше 1.2, и смотрю не админа, или я сам админ.
if (((( int ) $own [ 'align' ] == 1 ) AND ( ! $user [ 'admin' ]) AND ( $own [ 'align' ] > 1.2 )) OR ( ! empty ( $own [ 'admin' ]))) $okdop = 1 ;
if ( $okld == 1 ) {
echo " <H4>Личное дело</H4> " ;
2018-02-16 00:17:47 +00:00
$ld = db :: c () -> query ( 'SELECT * FROM `lichka` WHERE `pers` = ?i ORDER BY `id` ASC' , $user [ 'id' ]);
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
}
}
if ( $okdop == 1 ) {
echo " <H4>Возможные мульты</H4> " ;
2018-02-16 00:18:57 +00:00
$iplog = db :: c () -> query ( 'SELECT idperslater FROM delo_multi WHERE idpersnow = ?i GROUP BY idperslater ASC' , $user [ 'id' ]);
2018-03-03 22:54:41 +00:00
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-01-28 16:40:49 +00:00
echo " <H4>Банк</H4> " ;
echo "
< table class = 'adm' >
< TR >
< th > № </ th >
< th > Кредитов .</ th >
< th > ЕвроКредитов .</ th >
</ tr >
" ;
2018-02-16 00:17:47 +00:00
while ( $row_user_bank = $user_bank -> fetch_assoc ()) {
2018-01-28 16:40:49 +00:00
echo "
< tr >
2018-03-04 01:01:12 +00:00
< td > " . $row_user_bank['id'] . " </ td >
2018-02-16 00:17:47 +00:00
< td > " . $row_user_bank['cr'] . " </ td >
< td > " . $row_user_bank['ekr'] . " </ td >
2018-03-04 01:03:51 +00:00
</ tr > " ;
2018-01-28 16:40:49 +00:00
}
2018-03-04 01:03:51 +00:00
echo " </table><br> " ;
2018-01-28 16:40:49 +00:00
}
2018-01-29 16:18:56 +00:00
//TODO Вынести управляющие элементы во внешнюю админку, подальше от прецедентов. А то были случаи.
2018-03-04 01:01:12 +00:00
if ( isset ( $_POST [ 'del' ])) {
2018-01-29 16:18:56 +00:00
$itemdel = db :: c () -> query ( 'SELECT `type`,`dressed` FROM `inventory` WHERE `id`=?i' , $del ) -> fetch_assoc ();
if ( $itemdel [ 'dressed' ] == 1 ) {
dropitem ( $itemdel [ 'type' ]);
if ( $itemdel [ 'type' ] == 5 ) {
2018-01-28 16:40:49 +00:00
dropitem ( 6 );
dropitem ( 7 );
}
}
2018-01-29 16:18:56 +00:00
db :: c () -> query ( 'DELETE FROM `inventory` WHERE `id` = ?i' , $del );
2018-01-28 16:40:49 +00:00
}
echo " <br><H4><u>Вещи в инвентаре:</u></H4> " ;
echo " <table class='adm'>
< tr >
< th > ID </ th >
< th > Название </ th >
2018-01-29 16:18:56 +00:00
< th > Количество </ th >
2018-01-28 16:40:49 +00:00
< th > Картинка </ th >
2018-03-04 01:01:12 +00:00
< th ></ th >
2018-01-28 16:40:49 +00:00
</ tr >
" ;
2018-02-16 00:17:47 +00:00
$inv = db :: c () -> query ( 'SELECT `id`,`name`,`koll`,`img` FROM `inventory` WHERE `owner` = ?i ORDER BY `id` DESC' , $user [ 'id' ]);
while ( $row_inv = $inv -> fetch_assoc ()) {
2018-01-28 16:40:49 +00:00
echo "
2018-03-04 01:01:12 +00:00
2018-01-28 16:40:49 +00:00
< tr >
2018-02-16 00:17:47 +00:00
< td > { $row_inv [ 'id' ]} </ td >
< td > { $row_inv [ 'name' ]} </ td >
< td > { $row_inv [ 'koll' ]} </ td >
< td >< img src = 'i/sh/{$row_inv[' img ']}' ></ td >
2018-03-04 01:01:12 +00:00
< td >< form method = 'post' >< input name = 'del' type = 'hidden' value = '{$row_inv[' id ']}' >
< input name = 'ok' type = 'submit' value = 'Удалить' ></ form ></ td >
2018-01-28 16:40:49 +00:00
</ tr >
2018-03-04 01:01:12 +00:00
2018-01-28 16:40:49 +00:00
" ;
}
2018-01-29 16:18:56 +00:00
echo " <th colspan='6'><form method='post'><input name='undress_char' type='submit' value='Стриптиз'></form></th></table> " ;
2018-03-04 01:01:12 +00:00
if ( isset ( $_POST [ 'undress_char' ])) undressall ( $user [ 'id' ]);
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 >