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

File size: 2.52Kb
<?
/*
* $name описание действий объекта 
*/
if ($type == 'obmen' && $post['avtor'] != $user['id'])
{
	$name = 'новые файлы в папке';
}

/*
* Вывод блока с содержимым 
*/
if ($type == 'obmen')
{
	$dir = mysql_fetch_assoc(mysql_query("SELECT * FROM `user_files` WHERE `id` = '" . $post['id_file'] . "' LIMIT 1"));
	
	if ($post['count'] > 5)
	{
		$kol = '5';
		$kol2 = $post['count'] - 5;
	}
	else
	{
		$kol = $post['count'];
		$kol2 = null;
	}

?>
<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($dir['name'])?></span>»
</div>

<div class="feedback_content feedback_attachments clear_fix">
<?
		
	
	
	$files = mysql_query("SELECT * FROM `obmennik_files` WHERE `my_dir` = '$dir[id]' ORDER BY `id` DESC LIMIT $kol");
	
	while ($file = mysql_fetch_assoc($files))
	{
		if ($file['id'])
		{
			$ras = $file['ras'];
			
			if (is_file(H.'style/themes/' . $set['set_them'] . '/loads/14/' . $ras . '.png')) // Иконка файла
				echo '<img src="/style/themes/' . $set['set_them'] . '/loads/14/' . $ras . '.png" alt="*" /> ';
			else 
				echo '<img src="/style/themes/' . $set['set_them'] . '/loads/14/file.png" alt="*" /> ';

		echo '<a href="/user/personalfiles/' . $file['id_user'] . '/' . $dir['id'] . '/?id_file=' . $file['id'] . '&amp;page=1"><b>' . text($file['name']) . '</b>.' . $ras . '</a> (' . size_file($file['size']) . ')<br />';
		}
		else
		{
			echo 'Файл уже удален =(';
		}
	}
?>  
</div>

<div class="notification__row notification__row_name_footer"><span class="<?= ($post['read'] == 0 ? 'off' : 'time')?>"><?= vremja($post['time'])?></span> </div>

</div>

</div>
<?
}
?>