View file VK_dlja_DS_wmzo_ru/user/tape/inc/avatar.php

File size: 3.08Kb
<?
/*
* $name описание действий объекта 
*/
if ($type == 'avatar' && $post['avtor'] != $user['id'])
{
	if ($post['avatar'])
	$name = 'сменил' . ($avtor['pol'] == 1 ? null : "а") . ' фото на своей странице';
	else
	$name = 'установил' . ($avtor['pol'] == 1 ? null : "а") . ' фото на своей странице';	
}

/*
* Вывод блока с содержимым 
*/
if ($type == 'avatar')
{
	$foto = mysql_fetch_assoc(mysql_query("SELECT * FROM `gallery_foto` WHERE `id` = '".$post['id_file']."' LIMIT 1"));
	$avatar = mysql_fetch_assoc(mysql_query("SELECT * FROM `gallery_foto` WHERE `id` = '".$post['avatar']."' LIMIT 1"));
	$gallery = mysql_fetch_assoc(mysql_query("SELECT * FROM `gallery` WHERE `id` = '".$foto['id_gallery']."' LIMIT 1"));
	$gallery2 = mysql_fetch_assoc(mysql_query("SELECT * FROM `gallery` WHERE `id` = '".$avatar['id_gallery']."' LIMIT 1"));


?>
<div class="notification notification_withActions Row Row_style_withBorder" style="min-height: 50px;">    
    
<a class="notification__fillLink" href="/foto/<?= $foto['id_user']?>/<?= $foto['id_gallery']?>/<?= $foto['id']?>/" aria-label="Перейти к уведомлению"></a>

<div class="notification__left">
<a class="notification__avatar" href="/info.php?id=<?= $avtor['id']?>">
<div class="notification__avatarPhoto"> <?= avatar($avtor['id'])?> </div>
<div class="notification__avatarIcon Icon Icon_notify_mini_hhf"></div>
</a>
</div>

<div class="notification__center">

<div class="notification__row notification__row_name_header">
<b><a href="/info.php?id=<?= $avtor['id']?>" class="mem_link" mention=""><?= $avtor['nick']?></a></b>
<a href="user.settings.php?id=<?= $avtor['id']?>" class="mem_link" mention="">[!]</a>
 <?= $name?> 
</div>

<div class="notification__row notification__row_name_footer">
<span class="<?= ($post['read'] == 0 ? 'off' : 'time')?>"><?= vremja($post['time'])?></span> 
</div>

</div>
<?

if (!$post['avatar'])
{

?>
<div class="notification__right">
<?
if ($avatar['id'] && !$foto['id']){
?>
<a class="notification__media" href="/foto/<?= $foto['id_user']?>/<?= $foto['id_gallery']?>/<?= $foto['id']?>/" style="background-image: url('/foto/foto50/<?= $post['avatar']?>.jpg');" aria-hidden="true"></a>  
<?
}
elseif (!$avatar['id'] && $foto['id']){
?>
<a class="notification__media" href="/foto/<?= $foto['id_user']?>/<?= $foto['id_gallery']?>/<?= $foto['id']?>/" style="background-image: url('/foto/foto50/<?= $post['id_file']?>.jpg');" aria-hidden="true"></a>  
<?
}
else{
?>
<a class="notification__media" style="background-image: url('/style/user/no_photo.png');" aria-hidden="true"> </a> 
<?
}
?>
</div>
<?

}
else{

?>
<div class="notification__right">
<?
if ($foto['id']){
?>
<a class="notification__media" href="/foto/<?= $foto['id_user']?>/<?= $foto['id_gallery']?>/<?= $foto['id']?>/" style="background-image: url('/foto/foto50/<?= $post['id_file']?>.jpg');" aria-hidden="true"></a>  
<?
}
else{
?>
<a class="notification__media" style="background-image: url('/style/user/no_photo.png');" aria-hidden="true"> </a> 
<?
}
?>
</div>
<?

}




?>
</div>
<?

}
?>