File size: 3.49Kb
<?
/*
* $name описание действий объекта
*/
if ($type == 'status_like' && $post['avtor'] != $user['id']) // статус like
{
$name = 'считает классным статус ';
}
else if ($type=='status_like' && $post['avtor'] == $user['id'])
{
$name = 'считает классным ваш статус';
}
else if ($type=='status' && $post['avtor'] != $user['id'])
{
$name = 'установил' . ($avtor['pol'] == 1 ? null : "а") . ' новый статус';
}
/*
* Вывод блока с содержимым
*/
if ($type == 'status_like' || $type == 'status')
{
$status = mysql_fetch_assoc(mysql_query("SELECT * FROM `status` WHERE `id` = '" . $post['id_file'] . "' LIMIT 1"));
$otkogo = get_user($post['ot_kogo']);
if ($status['id'])
{
?>
<div class="notification notification_withActions Row Row_style_withBorder">
<a class="notification__fillLink" href="/user/status/komm.php?id=<?= $status['id']?>" aria-label="Перейти к уведомлению"></a>
<div class="notification__left">
<?
if ($post['ot_kogo'] && $type != 'status')
{
?>
<a class="notification__avatar" href="/info.php?id=<?= $otkogo['id']?>">
<div class="notification__avatarPhoto"> <?= avatar($otkogo['id'])?> </div>
<div class="notification__avatarIcon Icon Icon_notify_mini_wgsqr"></div>
<?
}
else {
?>
<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_qerqr"></div>
<?
}
?>
</a>
</div>
<div class="notification__center">
<div class="notification__row notification__row_name_header">
<?
if ($post['ot_kogo'])
{
?>
<b><a href="/info.php?id=<?= $otkogo['id']?>" class="mem_link" mention=""><?= $otkogo['nick']?></a></b>
<a href="user.settings.php?id=<?= $otkogo['id']?>" class="mem_link" mention="">[!]</a>
<?
}
else {
?>
<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?>
<?
if ($type != 'status'){
?>
<b><a href="/info.php?id=<?= $avtor['id']?>" class="mem_link" mention=""><?= $avtor['nick']?></a></b>
<?
}
?>
</div>
<div class="feedback_content"><?=output_text($status['msg'])?></div>
<div class="feedback_content feedback_attachments clear_fix">
<?
$l = mysql_result(mysql_query("SELECT COUNT(*) FROM `status_like` WHERE `id_status` = '$status[id]'"),0);
if (isset($user) && $user['id'] != $avtor['id'])
{
if ($user['id']!=$avtor['id'] && mysql_result(mysql_query("SELECT COUNT(*) FROM `status_like` WHERE `id_status` = '$status[id]' AND `id_user` = '$user[id]' LIMIT 1"),0)==0){
echo ' <a href="?likestatus=' . $status['id'] . '&page=$page"><span class="like_button_icon"></span> Класс</a> • ';
$like = $l;
}else{
echo ' <span class="like_button_icon"></span> Вы и ';
$like = $l - 1;
}
}
else
{
echo ' <span class="like_button_icon"></span> ';
$like = $l;
}
echo '<a href="/user/status/like.php?id=' . $status['id'] . '">' . $like . ' чел.</a>';
?>
</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">';
echo 'Статус уже удален =(</div>';
query("DELETE FROM `tape` WHERE `id_user` = '$user[id]' AND `id` = '$post[id]' LIMIT 1");
}
}
?>