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

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

/*
* Вывод блока с содержимым 
*/
if ($type == 'them')
{
	$them = mysql_fetch_assoc(mysql_query("SELECT * FROM `forum_t` WHERE `id` = '" . $post['id_file'] . "' LIMIT 1"));
	$razdel = mysql_fetch_assoc(mysql_query("SELECT * FROM `forum_r` WHERE `id` = '$them[id_razdel]' LIMIT 1"));
	$forum = mysql_fetch_assoc(mysql_query("SELECT * FROM `forum_f` WHERE `id` = '$razdel[id_forum]' LIMIT 1"));
	
	if ($them['id'])
	{

$_msg = text($them['text']);
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="/forum/<?= $forum['id']?>/<?= $razdel['id']?>/<?= $them['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_fff"></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($them['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");
	}
}
?>