View file sdark.mobi/shadow/index.php

File size: 6.47Kb
<?php
require_once '../core/system.php';

if(!isset($user['id'])) header('Location: /');

if (isset($_GET['id']) && mysql_result(mysql_query("SELECT COUNT(id) FROM `user` WHERE `id` = '".intval($_GET['id'])."'"),0) == true){
$ank = mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id`  = '".intval($_GET['id'])."'"));

} else {
	
$_SESSION['err'] = "Тень не найдена";
header('Location: /');
exit();

}

$header = 'Тень '.$ank['nick'].', '.$ank['level'].' ур.';
require_once H.'core/head.php';



if($user['id'] == $ank['id']){
?>
<div class='foot'>
<table  width='100%' border='0' cellpadding='0' cellspacing='0' style='padding-top: 5px;'>
<tbody>
<tr>
<td width='45%'>
<a class='big-but' style='box-shadow:  0px 0px 40px 1px #939393;' href='/shadow/equipment?id=<?=$ank['id']?>'>
<div class='imgwrap'>
<img src='/images/icon/equip.png'>
</div> 
Экипировка
</a>
</td>

<td width='45%'>
<a class='big-but' style='box-shadow:  0px 0px 40px 1px #939393;' href='/shadow/settings'>
<div class='imgwrap'>
<img src='/images/icon/set.png'>
</div> 

Настройки
</a>
</div>
</td>

<?php

}
else
{
	echo'
	<div class="head">
	<a class="mini-fight" style="box-shadow:  0px 0px 30px 1px #fff;" href="/shadow/equipment?id='.$ank['id'].'">
	<img src="/images/icon/equip.png">
	Экипировка
	</a>
	</div>
	</div>';
}

?>
</tbody>
</table>
</div>
</div>

<?php


$hls = floor($ank['max_health']/10);
echo"
<div class='line'></div>
<div class='head'>
<center>
<font color='98A2AB'>Статистика </font>
</center>
<br/>
<img src='/images/icon/fight.png'> Всего убийств: <font color='CDCDCD'>0</font>
<br/>
<img src='/images/icon/dead.png'> Поражения: <font color='CDCDCD'>0</font>
<br/>
<div class='empty2'></div>
<div class='empty2'></div>
<div class='empty2'></div>
<img src='/images/icon/dost.png'> Очки доблести: <font color='CDCDCD'>0</font>
<br/>
<img src='/images/icon/exp.png'> Достойные победы: <font color='CDCDCD'>0</font>

</div>

<div class='line'></div>
<div class='head'>
<center>
<font color='98A2AB'>Параметры </font>
<br/>
<div class='empty2'></div>
</center>
<img src='/images/icon/stat/hp.png'> Здоровье: <font color='CDC9C9'>".$hls."</font> 
</br>
<img src='/images/icon/stat/sila.png'> Сила: <font color='CDC9C9'>".$ank['sila']."</font> 
</br>
<img src='/images/icon/stat/prot.png' > Защита: <font color='CDC9C9'>".$ank['zashit']."</font> 
</br>
<img src='/images/icon/stat/all.png'> Сумма: <font color='CDC9C9'>".$ank['param']." 
</font>
</div>
</div>

";

?>
</div>
<div class="line"></div>
<div class="foot menuList">
<div class="empty2"></div>
<center>
<font color="98A2AB"> Умения
</br>
<div class="empty2"></div>
</center>
</div>
<div class='foot'>
<table  width='100%' border='0' cellpadding='0' cellspacing='0' style='padding-top: 5px;'>
<tbody>
<tr>
<?
$req = mysql_query("SELECT `id`,`lvl` FROM `umen` WHERE `usr` = '".$ank['id']."' and `img`='whack'");
$umen = mysql_fetch_array($req);
$avto = mysql_num_rows($req);
if($avto > 0){
	
echo"<td width='24%'>
<a class='big-but' href=\"/shadow/umen?id=".$umen['id']."\" style='box-shadow:  0px 0px 30px 1px #939393;'>
<div class='imgwrap'><img src='/images/umen/1.png' height='35' width='35'>
</div>
<span>
<div class='level2'>
".$umen['lvl']."
</div>
</span>
</a>
</td>
</div>"; 

} else {
	
	echo"<td width='24%'>
	<div class='big-but'>
	<div class='imgwrap'>
	<img src='/images/umen/1.png' height='35' width='35'></div>
	<div class='empty'></div>
	</td>
	</div>"; 
	
}

$req = mysql_query("SELECT `id`,`lvl` FROM `umen` WHERE `usr` = '".$ank['id']."' and `img`='healing'");
$umen = mysql_fetch_array($req);
$avto = mysql_num_rows($req);
if($avto > 0){
	
echo"<td width='24%'>
<a class='big-but' href=\"/shadow/umen?id=".$umen['id']."\" style='box-shadow:  0px 0px 30px 1px #939393;'>
<div class='imgwrap'>
<img src='/images/umen/2.png' height='35' width='35'>
</div>
<span>
<div class='level2'>
".$umen['lvl']."
</div>
</span>
</a>
</td>
</div>"; 

} else {
	
	echo"<td width='24%'>
	<div class='big-but'>
	<div class='imgwrap'>
	<img src='/images/umen/2.png' height='35' width='35'>
	</div>
	<div class='empty'></div>
	</td>
	</div>"; 
	
}

$req = mysql_query("SELECT `id`,`lvl` FROM `umen` WHERE `usr` = '".$ank['id']."' and `img`='gift_of_the_Gods'");
$umen = mysql_fetch_array($req);
$avto = mysql_num_rows($req);
if($avto > 0){
	
	echo"<td width='24%'>
	<a class='big-but' href=\"/shadow/umen?id=".$umen['id']."\" style='box-shadow:  0px 0px 30px 1px #939393;'>
	<div class='imgwrap'>
	<img src='/images/umen/3.png' height='35' width='35'>
	</div>
	<span><div class='level2'>".$umen['lvl']."
	</div>
	</span>
	</a>
	</td>
	</div>"; 
	
} else {
	
	echo"<td width='24%'>
	<div class='big-but'>
	<div class='imgwrap'>
	<img src='/images/umen/3.png' height='35' width='35'>
	</div>
	<div class='empty'></div>
	</td>
	</div>"; 
	
}

$req = mysql_query("SELECT `id`,`lvl` FROM `umen` WHERE `usr` = '".$ank['id']."' and `img`='gift_of_the_Gods'");
$umen = mysql_fetch_array($req);
$avto = mysql_num_rows($req);
if($avto > 0){
	
	echo"<td width='24%'>
	<a class='big-but' href=\"/shadow/umen?id=".$umen['id']."\" style='box-shadow:  0px 0px 30px 1px #939393;'>
	<div class='imgwrap'>
	<img src='/images/umen/4.png' height='35' width='35'>
	</div>
	<span><div class='level2'>".$umen['lvl']."
	</div>
	</span>
	</a>
	</td>
	</div><tr>"; 
	
} else {
	
	echo"<td width='24%'>
	<div class='big-but'>
	<div class='imgwrap'>
	<img src='/images/umen/4.png' height='35' width='35'>
	</div>
	<div class='empty'></div>
	</td>
	</div><tr>"; 
	
}


echo'</div>
</td>
</tbody>
</table>
</div>
</div>';

if($ank['level'] < 105){
	
$exp2 = trim($level[$ank['level']+1]);
$proc = round(100/($exp2/($ank['exp'])));
$uda = $ank['level']+1;
echo"<div class='line'></div>
<div class='head'>
<div class='empty'></div>
<center>
<font color='98A2AB'>Опыт </font>
<br/>
<div class='empty2'></div>
</center>
<div class='exp'>
<div class='violet' style='width:".round(100/($exp2/($ank['exp'])))."%'></div>
</div>
<div class='empty2'></div>
<div class='empty2'></div>
<center>
<font color='#CDC9C9'>До ".$uda." уровня: ".$proc."% (".$ank['exp']." / ".$exp2.")
<br/>
<div class='empty2'></div>
</div>
</center> ";

}


if($user['prava'] > 3){
	
	echo "<div class='line'></div>
	<div class='head'>
	
	<div class='mini-fight center' style='box-shadow:  0px 0px 15px 1px #939393;'>
	<a href='/user/".$ank['id']."/'>
	<img src='/images/icon/r.png'>
	Вернуться назад
	</a>
	</div>
	</div>";

} 

require_once H.'core/foot.php';
?>