File size: 1.57Kb
<?
/*
* $name описание действий объекта
*/
if ($type == 'album' && $post['avtor'] != $user['id'])
{
$name = 'новые фото в альбоме';
}
/*
* Вывод блока с содержимым
*/
if ($type == 'album')
{
$gallery = mysql_fetch_assoc(mysql_query("SELECT * FROM `gallery` WHERE `id` = '".$post['id_file']."' LIMIT 1"));
if ($post['count'] > 5)
{
$kol = '5';
$kol2 = $post['count'] - 5;
}
else
{
$kol = $post['count'];
}
if ($gallery['id']){
echo '<table class="menu">';
echo '<td class="block_avatar">';
echo ''.avatar($avtor['id']).'<span class="avatar_icon">'.online($avtor['id']).'</span>';
echo '</td>';
echo '<td class="block_content">';
echo ''.user::nick($avtor['id']).'';
echo '<span class="time">'.$s1 . vremja($post['time']) . $s2.'</span>';
echo '<div class="msg_text">'.$name.' » <a href="/modules/photo/' . $avtor['id'] . '/' . $gallery['id'] . '/">' . text($gallery['name']) . '</a> «</br>';
$as = mysql_query("SELECT * FROM `gallery_foto` WHERE `id_gallery` = '$gallery[id]' ORDER BY `id` DESC LIMIT $kol");
while ($xx = mysql_fetch_assoc($as)){
echo '<a href="/modules/photo/' . $gallery['id_user'] . '/' . $gallery['id'] . '/' . $xx['id'] . '/"><img style="width: 100px; height:100px; margin: 3px; border-radius: 4px;" src="/modules/photo/foto128/' . $xx['id'] . '.' . $xx['ras'] . '" alt="*"/></a>';
}
if (isset($kol2))echo 'и еще ' . $kol2 . ' фото';
}
else
{
echo '<div class="menu">Альбом удален</div>';
}
echo '</td>';
echo '</table>';
}
?>