File size: 2.68Kb
<?
$post_wall = mysql_fetch_assoc(query("SELECT * FROM `user_wall` WHERE `id` = '" . $post['id_object'] . "' LIMIT 1"));
if ($post_wall['id']) {
?>
<div class="notification notification_withActions Row Row_style_withBorder">
<a class="notification__fillLink" href="/wall<?= $post_wall['id_ank']?>_<?= $post_wall['id']?>" aria-label="Перейти к уведомлению"></a>
<div class="notification__left">
<a class="notification__avatar" href="/id<?= $avtor['id']?>"><?= avka50($avtor['id'], 'notification__avatarPhoto')?>
<div class="notification__avatarIcon Icon Icon_notify_mini_wall"></div>
</a>
</div>
<div class="notification__center">
<div class="notification__row notification__row_name_header">
<b><a href="/id<?= $avtor['id']?>" class="mem_link" mention="" mention_id="/id<?= $avtor['id']?>"><?= $avtor['nick']?></a></b>
</div>
<a href="/wall<?= $post_wall['id_ank']?>_<?= $post_wall['id']?>"><?= output_text(short_text($post_wall['text'], 5))?></a>
<?
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `user_wall_files` WHERE `id_ank` = '".$post_wall['id_ank']."' AND `id_post` = '".$post_wall['id']."'"), 0) > 0)
{
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `user_wall_files` WHERE `id_ank` = '".$post_wall['id_ank']."' AND `id_post` = '".$post_wall['id']."' AND `type` = '1'"), 0) > 0)
{
?>
<div class="notification__row notification__row_name_attachments">
<?
$q_f = mysql_query("SELECT * FROM `user_wall_files` WHERE `id_ank` = '".$post_wall['id_ank']."' AND `id_post` = '".$post_wall['id']."' AND `type` = '1' ORDER BY `time` DESC LIMIT 1");
while ($post_f = mysql_fetch_array($q_f))
{
$file = mysql_fetch_assoc(mysql_query("SELECT `id`,`type` FROM `user_wall_files` WHERE `id` = '".$post_f['id']."' LIMIT 1"));
?>
<a class="notification__attachment " href="/wall<?= $post['id_user']?>_<?= $post_wall['id']?>?act=photo&pic=<?= $file['id']?>" style="background-image: url('/files/wall/files/others/<?= $file['id']?>.jpg')">
</a>
<?
}
?>
</div>
<?
}
}
?>
<div class="notification__row notification__row_name_footer">
<?= vremja($post['time'])?> написал<?= ($avtor['pol'] == 1 ? '' : 'а')?> на Вашей стене
</div>
</div>
<div class="notification__body">
<div id="show_menu<?= $post['id']?>" class="notification__actionsBubble">
<a class="notification__action" href="/notifi?high=<?= $post['id']?>"> Скрыть уведомление</a>
</div>
<div class="notification__actions">
<div class="notification__actionsTrigger" onclick="show_menu(<?= $post['id']?>)" aria-hidden="true"></div>
</div>
</div>
</div>
<?
}
else{
query("DELETE FROM `notifi` WHERE `id_user` = '$user[id]' AND `id` = '$post[id]' LIMIT 1");
}
?>