Файл: LinkUser/LinkUsersProfile.php
Строк: 135
<?php
/**
* @author MyStyle
* @copyright 2013
*/
if(isset($_GET['UserLinkProfile'])&& num($_GET['UserLinkProfile'])!=NULL && mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_user` WHERE `id` = '".num($_GET['UserLinkProfile'])."' LIMIT 1"),0)!=0){
$userq = mysql_fetch_array(mysql_query("SELECT * FROM `mystyle_user` WHERE `id` = '".num($_GET['UserLinkProfile'])."'"));
$user_vs=mysql_fetch_array(mysql_query("SELECT * FROM `mystyle_mypet` WHERE `user` = '".num($_GET['UserLinkProfile'])."'"));
$user_v1 = mysql_fetch_array(mysql_query("SELECT * FROM `mystyle_game1` WHERE `user` = '".num($_GET['UserLinkProfile'])."'"));
$user_v2 = mysql_fetch_array(mysql_query("SELECT * FROM `mystyle_game2` WHERE `user` = '".num($_GET['UserLinkProfile'])."'"));
$user_v3 = mysql_fetch_array(mysql_query("SELECT * FROM `mystyle_game3` WHERE `user` = '".num($_GET['UserLinkProfile'])."'"));
$user_v4 = mysql_fetch_array(mysql_query("SELECT * FROM `mystyle_game4` WHERE `user` = '".num($_GET['UserLinkProfile'])."'"));
if(isset($_GET['friend']))
{
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_friends` WHERE `user` = '$user[id]' AND `ank` = '$userq[id]'"),0)==0)
{
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_blacklist` WHERE `user` = '$user[id]' AND `ank` = '$userq[id]'"),0)!=0)mysql_query("DELETE FROM `mystyle_blacklist` WHERE `user` = '$user[id]' AND `ank` = '$userq[id]'");
mysql_query("INSERT INTO `mystyle_friends` SET `user` = '$user[id]', `ank` = '$userq[id]'");
}
else mysql_query("DELETE FROM `mystyle_friends` WHERE `user` = '$user[id]' AND `ank` = '$userq[id]'");
echo mysql_error();
}
elseif(isset($_GET['blacklist']))
{
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_blacklist` WHERE `user` = '$user[id]' AND `ank` = '$userq[id]'"),0)==0)
{
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_friends` WHERE `user` = '$user[id]' AND `ank` = '$userq[id]'"),0)!=0)mysql_query("DELETE FROM `mystyle_friends` WHERE `user` = '$usetr[id]' AND `ank` = '$userq[id]'");
mysql_query("INSERT INTO `mystyle_blacklist` SET `user` = '$user[id]', `ank` = '$userq[id]'");
}
else mysql_query("DELETE FROM `mystyle_blacklist` WHERE `user` = '$user[id]' AND `ank` = '$userq[id]'");
echo mysql_error();
}
echo '<div>';
echo '<div class="body" style="text-align: center;">
<div>
<img style="max-width:120px;" alt="o" src="'.$userq['pitomec'].'"/>
</div>
<div>';
if($user_vs['v1']){
echo '<img style="max-width:40px;" alt="o" src="images/items/'.$user_vs['v1'].'.png"/>';
}else{
echo '<img style="max-width:40px;" alt="o" src="images/items/empty.png"/>';
}
if($user_vs['v2']){
echo '<img style="max-width:40px;" alt="o" src="images/items/'.$user_vs['v2'].'.png"/>';
}else{
echo '<img style="max-width:40px;" alt="o" src="images/items/empty.png"/>';
}
if($user_vs['v3']){
echo '<img style="max-width:40px;" alt="o" src="images/items/'.$user_vs['v3'].'.png"/>';
}else{
echo '<img style="max-width:40px;" alt="o" src="images/items/empty.png"/>';
}
if($user_vs['v4']){
echo '<img style="max-width:40px;" alt="o" src="images/items/'.$user_vs['v4'].'.png"/>';
}else{
echo '<img style="max-width:40px;" alt="o" src="images/items/empty.png"/>';
}
if($user_vs['v5']){
echo '<img style="max-width:40px;" alt="o" src="images/items/'.$user_vs['v5'].'.png"/>';
}else{
echo '<img style="max-width:40px;" alt="o" src="images/items/empty.png"/>';
}
if($user_vs['v6']){
echo '<img style="max-width:40px;" alt="o" src="images/items/'.$user_vs['v6'].'.png"/>';
}else{
echo '<img style="max-width:40px;" alt="o" src="images/items/empty.png"/>';
}
echo '</div>
</div>
';
echo '<div>
<span>
<div class="panel">
<div>
</div>';
echo '<span class="big">'.$userq['nick'].'</span>';
if($userq['admin'] == 1)echo '<span class="fr">Администратор</span>';
if($userq['admin'] == 2)echo '<span class="fr">Модер</span>';
if($userq['admin'] == 3)echo '<span class="fr">VIP</span>';
echo '
<div><img width="16" height="16" src="images/icons/level.png" alt="уровень" title="уровень"/>
Уровень: <span class="level fr">'.$userq['level'].'</span>
<div style="clear: both;"></div>
</div>
';
echo '<div>
<img src="images/icons/beauty.png" width="16" height="16" alt="o"/>
Крутость: <span class="beauty fr">'.rat($userq['id']).'</span>
<div style="clear: both;"></div>
</div>
';
echo '<div><img src="images/icons/faith.png" width="16" height="16" alt="o"/>
Авторитет: <span class="faith fr">'.$userq['faith'].'</span>
<div style="clear: both;"></div></div>';
echo '<div>
<img src="/images/icons/level.png" width="16" height="16" alt="o"/>
Опыта всего: <span class="fr">'.rating($userq['rating']).'</span>
<div style="clear: both;"></div>
</div>';
echo '<div><img src="images/icons/like.png" width="16" height="16" alt="o"/>
Уважения: <span class="like fr">'.$userq['like'].'</span>
<div style="clear: both;"></div></div>';
$snow1 = mysql_fetch_array(mysql_query("SELECT * FROM `mystyle_snow` WHERE `user` = '".$userq['id']."'"));
if($userq['bone_exp']){
echo '<div>
<img src="/images/icons/sweets.png" width="16" height="16" alt="o"/>
Препараты: <span class="fr">+'.$userq['bone_exp'].'% ('.time_left($userq['bone_time']-$time).')</span>
<div style="clear: both;"></div>
</div>
';
}
if($snow1['col'] == 1)$name = 'Финал';
if($snow1['col'] == 2)$name = 'Выборочный финал';
if($snow1['col'] == 3)$name = 'Начало';
if($snow1['col'] == 0)$name = 'Начало нового старта';
echo '<div>
<img src="images/icons/competition.png" width="16" height="16" alt="o"/>
Действия: <span class="fr">Драка с охранником, '.$name.'</span>
<div style="clear: both;"></div>
</div>';
echo '<div><img src="images/icons/calendar.png" width="16" height="16" alt="o"/>
Отбывает уже: <span class="fr bold">'.time_left($userq['time']).'</span><div style="clear: both;"></div></div>';
echo '</div></span></div>';
echo '<div><ul><li><a class="btn" href="?LinkUhod"><img width="24" height="24" src="images/icons/dog.png" alt="уход"/> Наколки</a></li>';
echo '<li><a class="btn" href="?presents='.$userq['id'].'&do"><img width="24" height="24" src="images/icons/mypresent.png" alt="подарки"/> Подарки</a></li>';
echo '<li><a class="btn" href="?mail&new_msg='.$userq['id'].'"><img width="24" height="24" src="images/icons/mymail.png" alt="Отправить маляву"/> Отправить маляву</a></li>';
if($userq['id']!=$user['id'])echo "<li><a class="btn" href='?User&UserLinkProfile=$userq[id]&friend'><img width="24" height="24" src="/images/icons/shirtt.png" alt="Добавить в кореша"/> <span>".(mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_friends` WHERE `user` = '$user[id]' AND `ank` = '$userq[id]' LIMIT 1"),0)==0?"Добавить в кореша":"Убрать из корешей")."</span></a></li>";
echo '</ul></div>';
echo '</div>';
}else{
}
?>