Файл: pesn_voini/peseni_vojni/instalscript/engine/user/index.php
Строк: 108
<?
require_once($_SERVER['DOCUMENT_ROOT']."/instalscript/engine/_inc/sys.php");
$r = mt_rand(1000,9999);
$id = number($_GET['id']);
$users= fch("SELECT * FROM `users` WHERE `id` = ? LIMIT 1", array($id));
if(!$users){
header('location:/profile/'.$uid.'/?'.$r);
exit();
}
if(isset($_GET['spell'])){
$title = "Способности";
}
else{
$title = $users['login'];
}
head($title,$uid);
//
echo logs();
//
//
//
if(isset($_GET['info']) && $user['adm'] >= 1){
//
//
if($user['adm'] >= 1){
echo "
<center>Управление игроком:</center><div class = 'hr'></div>
<div class = 'message'><a href = '/ban/?id=".$id."'>Забанить</a></div>
<div class = 'message'><a href = '/ban/".$id."/user'>История банов</a></div>
<div class = 'message'><a href = '/ip/".$id."/user'>Проверить IP</a></div>
";
if($user['adm'] == 3){
echo "
<div class = 'message'><a href ='/ref/".$id."/user'>Рефералы</a></div>
<div class = 'message'><a href = '/create/bonus/?id=".$id."'>Выдать бонус</a></div>
<div class = 'message'><a href ='/view/".$id."/mail/1'>Прочесть почту</a></div>
<div class = 'message'><a href = '/update/".$id."/'>Редактировать</a></div>
";
}
echo "<div class = 'message'><a href = '/panel'>Панель управления</a></div><div class = 'hr'></div><div class = 'message'><a href = '?'>Вернуться назад</a></div>";
}
//
//
foot($uid);
exit();
}
//
//
//
if(isset($_GET['spell'])){
require_once($_SERVER['DOCUMENT_ROOT']."/instalscript/engine/user/spell.php");
}
else{
if($users['time_on'] > time() - 86400){$status_online = "Посл. вход: Сегодня";}
else
if($users['time_on'] < time() - 86400){$status_online = "Посл. вход: ".clock($users['time_on'])."";}
if($users['sex'] == 'm'){$sex = 'Пол: Мужской';}else{$sex = 'Пол: Женский';}
if($users['class'] == 'warrior'){$race = 'Воин';}
if($users['class'] == 'mage'){$race = 'Маг';}
if($users['class'] == 'monk'){$race = 'Монах';}
//
if($users['mess'] == 0)$param = '';
//if($users['mess'] == 1)$param = '<font color="lime">+100</font>';
if($users['mess'] == 2 && $users['mess_time'] > time())$param = '<font color="lime">+250</font>';
echo "
<table>
";
echo "
<td class = 'rht blck'>
<div class = 'items-list'>
";
for($i = 1;$i < 5;$i++){
$it = fch("SELECT * FROM `inv` WHERE `id_user` = ? AND `type` = ? AND `yes` = ? ", array($users['id'],$i,"1"));
if($it == false){
$img = "/instalscript/images/items/empty/".$i.".jpg";
}
else{
$img = "/instalscript/images/items/class/icons/".$users['class']."/".$it['set']."/".$it['type'].".jpg";
}
echo "
<div class = 'items-icons'>
<a class = 'items-link' href = '/item/?id=".$users['id']."&view=".$it['id']."'>
<span class = 'items-icons-view' style = 'background-image:url(".$img.")'></span>
</a>
</div>
<br>
";
}
echo"
</div>
</td>
";
echo "
<td class = 'cntr'>
<img class = '' src = '/instalscript/images/user/race/".($users['side'] == '0' ? "alliance" : "horde")."/".$users['race']."/".$users['sex'].".png' width='180' height='200'>
<div class = 'class ".$users['class']."'></div>
</td>";
echo "
<td class = 'lft blck'>
<div class = 'items-list'>
";
for($i = 5;$i < 9;$i++){
$it = fch("SELECT * FROM `inv` WHERE `id_user` = ? AND `type` = ? AND `yes` = ? ", array($users['id'],$i,"1"));
if($it == false){
$img = "/instalscript/images/items/empty/".$i.".jpg";
}
else{
$img = "/instalscript/images/items/class/icons/".$users['class']."/".$it['set']."/".$it['type'].".jpg";
}
echo "
<div class = 'items-icons'>
<a class = 'items-link' href = '/item/?id=".$users['id']."&view=".$it['id']."'>
<span class = 'items-icons-view' style = 'background-image:url(".$img.")'></span>
</a>
</div>
<br>
";
}
echo"
</div>
</td>
";
echo "</table>";
/* echo "
<div class = 'cntr'>
<img class = 'w50' src = '/instalscript/images/user/race/".($users['side'] == '0' ? "alliance" : "horde")."/".$users['race']."/".$users['sex'].".png'>
<div class = 'class ".$users['class']."'></div>
<div>
";
*/
/////////// Вывод способностей
echo "
<div class = 'spell-view cntr'>
";
$spell_q = $BaseConnect->query("SELECT * FROM `spell` WHERE `class` = '".user($users['id'],'class')."' ");
while($spell = $spell_q->fetch(PDO::FETCH_ASSOC)){
echo "
<div class = 'spell-icons'>
<a title = '".$spell['name']."' class = 'spell-link' href = '/profile/".$users['id']."/?spell=".$spell['id']."'>
<span class = 'spell' style = 'background-image:url(".$spell['img'].")'></span>
</a>
<span class = 'spell-user-lvl' >".uSpell($users['id'],$spell['id'],'level')."</span>
</div>
";
}
echo "
</div>
";
echo "
<div class='message'>
<img src = '/instalscript/main/img/user/class/_".$users['class'].".png' width='16' height='16'> ".$users['login'].", ".$users['level']." ур<br>
Сторона: ".($users['side'] == '0' ? "Альянс" : "Орда")."<br>
Класс: ".$race."<br>
".$sex."<br>
".$status_online."<br>
".($id == $uid ? "Опыт: ".$users['exp']." / ".$user_level[$users['level']]."<br>" : "")."
</div>
";
echo "
<div class='message'><img class = 'money' src = '/instalscript/images/user/stat/power.png'> Атака: ".$users['power']." ".$param."<br>
<img class = 'money' src = '/instalscript/images/user/stat/block.png'> Защита: ".$users['block']." ".$param."<br>
<img class = 'money' src = '/instalscript/images/user/stat/hp.png'> Здоровье: ".$users['health']." ".$param."";
if($id == $uid){
echo "
<br><img class = 'money' src = '/instalscript/images/user/stat/energy.png' width='14' height='14'> Мана: ".$users['energy']." / ".$users['energy_max']."<br>
<img class = 'money' src = '/instalscript/images/user/stat/money-gold.gif'> Золото: ".$users['gold']."<br>
<img class = 'money' src = '/instalscript/images/user/stat/money-silver.gif'> Серебро: ".$users['silver']."
";
}
if($users['premium'] == 2 && $users['premium_time'] > time())echo '<br><font color="#ff8000">Премиум-аккаунт</font> - '.timer($users['premium_time']).'';
if($users['mess'] == 2 && $users['mess_time'] > time())echo '<br><font color="#05CCFF">Герой противостояния</font> - '.timer($users['mess_time']).'';
echo '</div>';
echo '<div class="message"><a href="/item/?id='.$id.'">Снаряжение</a></div>';
if($id == $uid){
if($user['ref_check'] >= 1){
$color = '<font color="lime">(+)</font>';
}
else{
$color = '';
}
echo '<div class="message">
<a href="/contacts/">Почта</a></div>
<div class="message"><a href="/ref/">Пригласи друга '.$color.'</a></div>
';
}else{
echo '
<div class="message"><a href="/mail/'.$id.'/user">Написать сообщение</a></div>
';
}
if($user['adm'] >= 1)echo "<div class = 'hr'></div><div class = 'message'><a href = '?info'>Управление игроком</a></div><div class = 'message'><a href = '/panel'>Панель управления</a></div>";
}
foot($uid);
?>