File size: 2.43Kb
<?
/*
* $name описание действий объекта
*/
if ($type == 'album' && $post['avtor'] != $user['id'])
{
$name = 'новые фото в альбоме';
}
/*
* Вывод блока с содержимым
*/
if ($type == 'album')
{
$gallery = mysql_fetch_assoc(mysql_query("SELECT * FROM `gallery` WHERE `id` = '".$post['id_file']."' LIMIT 1"));
if ($post['count'] > 4)
{
$kol = '4';
$kol2 = $post['count'] - 4;
}
else
{
$kol = $post['count'];
$kol2 = null;
}
if ($gallery['id'])
{
$as = mysql_query("SELECT * FROM `gallery_foto` WHERE `id_gallery` = '$gallery[id]' ORDER BY `id` DESC LIMIT $kol");
?>
<div class="notification notification_withActions Row Row_style_withBorder">
<a class="notification__fillLink" href="/foto/<?= $avtor['id']?>/<?= $gallery['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_qyar"></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>
<?= __('добавил') . ($avtor['pol'] == 1 ? "" : "а")?> <?= $post['count']?> <?= (' фото в альбом')?>
«<span style="color: #42648b;font-weight: bold;"><?= text($gallery['name'])?></span>»
</div>
<div class="feedback_content feedback_attachments clear_fix">
<?
while ($xx = mysql_fetch_assoc($as))
{
if (isset($xx) && $xx['id'] > 0)
{
?>
<a href="/foto/<?= $gallery['id_user']?>/<?= $gallery['id']?>/<?= $xx['id']?>/" class="notification__mediato" style="background-image: url('/foto/foto50/<?= $xx['id']?>.jpg')"></a>
<?
}
else {
?>
<span class="notification__mediato" style="background-image: url('/style/user/no_photo.png');border: 1px solid #c5d3e1;"></span>
<?
}
}
?>
</div>
<div class="notification__row notification__row_name_footer"><span class="<?= ($post['read'] == 0 ? 'off' : 'time')?>"><?= vremja($post['time'])?></span> </div>
</div>
</div>
<?
}
else
{
echo '<div class="nav1">Альбом удален =(</div>';
query("DELETE FROM `tape` WHERE `id_user` = '$user[id]' AND `id` = '$post[id]' LIMIT 1");
}
}
?>