File size: 2.02Kb
<?
/*
* $name описание действий объекта
*/
if ($type == 'notes' && $post['avtor'] != $user['id']) // дневники
{
$name = 'создал' . ($avtor['pol'] == 1 ? null : "а") . ' новый дневник';
}
/*
* Вывод блока с содержимым
*/
if ($type == 'notes')
{
$notes = mysql_fetch_assoc(mysql_query("SELECT * FROM `notes` WHERE `id` = '" . $post['id_file'] . "' LIMIT 1"));
if ($notes['id'])
{
$_msg = text($notes['msg']);
if (iconv_strlen($_msg, 'UTF-8') > 30)
{
$_msg= iconv_substr($_msg, 0, 27, 'UTF-8');
$_msg = $_msg.'...';
}
?>
<div class="notification notification_withActions Row Row_style_withBorder" style="min-height: 50px;">
<a class="notification__fillLink" href="/plugins/notes/list.php?id=<?= $notes['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_ffy"></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 ? "" : "а") . __(' новый дневник')?>
«<span style="color: #42648b;font-weight: bold;"><?= text($notes['name'])?></span>»
</div>
<div class="feedback_content"><?= $_msg?></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="nav2">';
echo "Дневник уже удален =( $s1 " . vremja($post['time']) . " $s2</div>";
query("DELETE FROM `tape` WHERE `id_user` = '$user[id]' AND `id` = '$post[id]' LIMIT 1");
}
}
?>