Файл: infa.php
Строк: 240
<?php
include 'inc/mysql.php';
include 'inc/check.php';
include ("inc/gzip.php");
if(isset($_SESSION['auth']) && $_SESSION['auth']==1 && isset($_GET['id'])){
include 'inc/shapka.php';
if (intval($_GET['id'])==$account['id']){
header("Location: /personaj.php");
exit;
}
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `account` WHERE `id`='".intval($_GET['id'])."'"),0)){
$acc=mysql_fetch_assoc(mysql_query("SELECT * FROM `account` WHERE `id`='".intval($_GET['id'])."'"));
}else{
header('Location: index.php?');
exit;
}
$podvals = mysql_fetch_array(mysql_query("SELECT * FROM `podval` WHERE `id`='$acc[id]'"));
if($acc['status']=="gm"){
$nik = gradient(''.$acc[login].'','00FF00', '00CC00');
echo"<img src='pic/main/$acc[sex].png' alt='*'/> $nik (";
if($acc[status]=="gm"){echo"<b><font color=lime>Администратор</b></font>, ";}
echo"<img src='/pic/main/up.png' alt='*'/> $acc[lvl],";
}else{
if($acc['status']=="moder"){
$nik = gradient(''.$acc[login].'','0066CC', 'AB82FF');
echo"<img src='pic/main/$acc[sex].png' alt='*'/> $nik (";
if($acc[status]=="moder"){echo"<b><font color=DeepSkyBlue>Модератор</b></font>, ";}
echo"<img src='/pic/main/up.png' alt='*'/> $acc[lvl],";
}else{
if($acc['status']=="bot"){
$nik = gradient(''.$acc[login].'','FFCC00', 'FF9933');
echo"<img src='pic/main/$acc[sex].png' alt='*'/> $nik (";
if($acc[status]=="bot"){echo"<b><font color=gold>Системный робот</b></font>, ";}
echo"<img src='/pic/main/up.png' alt='*'/> $acc[lvl],";
}else{
echo"<img src='pic/main/$acc[sex].png' alt='*'/> $acc[login] (";
echo"<img src='/pic/main/up.png' alt='*'/> $acc[lvl],";
}}
}
if($acc[sex]=="man"){
echo" <img width='16' height='16' src='pic/main/mans.png' alt='*'> Парень,";}else{
echo" <img width='16' height='16' src='pic/main/womans.png' alt='*'> Девушка,";}
$d = time()-7000;
if($acc[last_active]<$d){echo"<font color=red> Off</font>)";}else{
echo"<font color=lime> On</font>)";}
$d = time()-$acc['datareg'];
echo'<br><img src="pic/main/timereg.png" alt="*"/> В игре: '.sec2day($d).'';
if(!empty($acc[banda])){
$req = mysql_query("SELECT * FROM `banda` WHERE `nick` = '$acc[banda]' LIMIT 1");
$clan = mysql_fetch_array($req);
echo'<br><img src="/pic/main/banda1.png" alt="*"/>'; echo" Банда: <a href="banda_info.php?id=$clan[id]">$clan[name]</a>";
}
$req = mysql_query("SELECT * FROM `banda` WHERE `nick` = '$acc[id]' ");
$avto=mysql_num_rows($req);
if($avto==1){
echo ", <font color=#32CD32>Лидер</font>";
}else{
if($acc[banda]>0){
echo ", <font color=#32CD32>Член банды</font>";
}}
if($acc[banda]>0){
echo "<br><img src='/pic/main/exits.png' alt='*'/> Дней в банде: $acc[banda_den]";
}
$req = mysql_query("SELECT * FROM `block` WHERE `usr`='$acc[id]' and `ban_time`>'$time' and `tip` = '1' ");
////////////////////////////
$avto=mysql_num_rows($req);
if($avto>=1){
While($mag = mysql_fetch_array($req))
{
$req = mysql_query("SELECT * FROM `account` WHERE `id` = '$mag[nick]'");
$pic = mysql_fetch_array($req);
echo"<hr><img src='pic/main/!.png' alt='*'/> На персонажа наложена молчанка!";
echo"<br><img src='pic/main/ms.png' alt='*'/> Модератором: $pic[login]<br>";
echo"<img src='pic/main/malava.png' alt='*'/> Причина: <i>$mag[text].</i><hr>";
}
}
$req = mysql_query("SELECT * FROM `block` WHERE `usr`='$acc[id]' and `ban_time`>'$time' and `tip` = '2' ");
////////////////////////////
$avto=mysql_num_rows($req);
if($avto>=1){
While($mag = mysql_fetch_array($req))
{
$req = mysql_query("SELECT * FROM `account` WHERE `id` = '$mag[nick]'");
$pic = mysql_fetch_array($req);
echo"<hr><img src='pic/main/!.png' alt='*'/> Персонаж заблокирован!";
echo"<br><img src='pic/main/ms.png' alt='*'/> Модератором: $pic[login]<br>";
echo"<img src='pic/main/malava.png' alt='*'/> Причина: <i>$mag[text]</i><hr>";
}
}
if(!empty($acc[status_pers])){
$text = $acc[status_pers];
$text = strip_tags($text);
$text = smiles($text);
echo"<div id='active'><div class='dialog_window'>$text</div></div>";
}
if($acc[sex]=="man"){
echo"<br><img src='pic/avatar/man.png'/>";}
if($acc[sex]=="woman"){
echo"<br><img src='pic/avatar/woman.png'/>";}
$d = time()-$acc['datareg'];
$nows=$acc[hp];
$maxs=$acc[hpall];
$widths = round(100/($maxs/$nows));
echo'<div class="status_style status_big" style="margin-bottom:1px; background-color:#B22222; box-shadow: 0px 0px 5px 0.1px rgba(0, 0, 0, 0.3);">
<div class="status_in status_big"><img src='pic/main/hp.png'> Здоровье: '.$nows.'/'.$maxs.' </div>
<div class="status_style status_big" style="width:'.$widths.'%; background-color:#FF4500;"></div>
</div>';
$now=$acc[mp];
$max=$acc[mpall];
$widths = round(100/($max/$now));
echo'<div class="status_style status_big" style="margin-bottom:1px; background-color:#D2691E; box-shadow: 0px 0px 5px 0.1px rgba(0, 0, 0, 0.3);">
<div class="status_in status_big"><img src='pic/main/mp.png'> Энергия: '.$now.'/'.$max.' </div>
<div class="status_style status_big" style="width:'.$widths.'%; background-color:#FFD700;"></div>
</div>';
include ("inc/exp_infa.php");
echo'<div class="status_style status_big" style="background-color:#666475;width:100%;">
<div class="status_in status_big"><img src="pic/main/progress.gif"/> Прогресс: '.$exp.'%</div>
<div class="status_style status_big" style="width:'.$exp.'%; background-color:#DCC6EC;"></div>
</div>';
if (isset($_GET['add'])){
$_GET['add']=intval($_GET['add']);
if ($_GET['add']!=$account['id']){
if (!mysql_result(mysql_query("SELECT COUNT(*) FROM `friends` WHERE `friend`='".$_GET['add']."' AND `user`='".$account['id']."'"),0)){
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `account` WHERE `id`='".$_GET['add']."'"),0)){
mysql_query("INSERT INTO `friends`(`user`,`friend`)VALUES('".$account['id']."','".mysql_real_escape_string($_GET['add'])."')");
echo "<img src="pic/main/!.png"> Персонаж <b>$acc[login]</b> добавлен в ваш список друзей.";
}
}
}
}
if (isset($_GET['adds'])){
$_GET['adds']=intval($_GET['adds']);
if ($_GET['adds']!=$account['id']){
if (!mysql_result(mysql_query("SELECT COUNT(*) FROM `ignor` WHERE `ignor`='".$_GET['adds']."' AND `user`='".$account['id']."'"),0)){
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `account` WHERE `id`='".$_GET['adds']."'"),0)){
mysql_query("INSERT INTO `ignor`(`user`,`ignor`)VALUES('".$account['id']."','".mysql_real_escape_string($_GET['adds'])."')");
echo "<img src="pic/main/!.png"> Персонаж <b>$acc[login]</b> добавлен в игнор лист.";
}
}
}
}
if($account[status]=="gm"){
echo'<div class="ssl">';
echo"<a href="adminka.php?mod=5&id=$acc[id]">  <img src="pic/main/nou.png"> <font color=LightCoral>Дать молчанку</a></font></div>";
echo'<div class="ssl">';
echo"<a href="adminka.php?mod=22&id=$acc[id]">  <img src="pic/main/oke.png"> <font color=LightCoral>Редактировать</a></font></div>";
}
if($account[status]=="moder"){
echo'<div class="ssl">';
echo"<a href="moderka.php?mod=1&id=$acc[id]">  <img src="pic/main/nou.png"> <font color=LightCoral>Дать молчанку</a></font></div>";
}
echo'<div class="ssl">';
echo"<a href="statictika_infa.php?id=$acc[id]">  <img src="pic/main/about.png"> Информация персонажа</a></div>";
$req = mysql_query("SELECT * FROM `anketa` WHERE `user` = '$acc[id]' ");
$avto=mysql_num_rows($req);
if($avto==1){
echo'<div class="ssl">';
echo"<a href='/anketa_info.php?id=$acc[id]'>  <img src="pic/main/ankete.png"> Анкета персонажа</a></div>";
}
echo'<div class="ssl">';
echo"<a href='/podarok_infa.php?id=$acc[id]'>  <img src="pic/main/gifts.png"> Подарки персонажа</a></div>";
echo'<div class="ssl">';
echo"<a href='/mails.php?act=mesg&user=$acc[id]'>  <img src="pic/main/mail.png"> Написать сообщение</a></div>";
if (!mysql_result(mysql_query("SELECT COUNT(*) FROM `friends` WHERE `user`='".$account['id']."' AND `friend`='".$acc['id']."'"),0)){
echo'<div class="ssl">';
echo"<a href='/infa.php?id=$acc[id]&add=$acc[id]'>  <img src="pic/main/dr.png"> Добавить в друзья</a></div>";
}
if (!mysql_result(mysql_query("SELECT COUNT(*) FROM `ignor` WHERE `user`='".$account['id']."' AND `ignor`='".$acc['id']."'"),0)){
echo'<div class="ssl">';
echo"<a href='/infa.php?id=$acc[id]&adds=$acc[id]'>  <img src="pic/main/ingrs.png"> Добавить в игнор</a></div>";
}
}else{
header ("Location: index.php"); exit;
}
include 'inc/nogi.php';
?>