File size: 2.25Kb
<?
if ($type == 'album')
{
$gallery = mysql_fetch_assoc(mysql_query("SELECT * FROM `gallery` WHERE `id` = '".$post['id_file']."' LIMIT 1"));
if ($post['count'] > 4)
{
$kol = '4';
$kol2 = $post['count'] - 4;
}
else
{
$kol = $post['count'];
$kol2 = null;
}
if ($gallery['id'])
{
$as = mysql_query("SELECT * FROM `gallery_foto` WHERE `id_gallery` = '$gallery[id]' ORDER BY `id` DESC LIMIT $kol");
?>
<div class="block oh <?= $dop_div?>">
<div class="grey no-borders">
<a class="right" href="?del=<?= $post['id']?>"><img class="m p16" src="/user/tape/ico/cross_light.png" alt=""></a>
<div>
<?= group($avtor['id'])?>
<a href="/user/tape/subscr/?uid=<?= $avtor['id']?>" class="mysite-link"><b class="nick"><?= $avtor['nick']?></b></a>
<?= medal($avtor['id'])?> <?= online($avtor['id'])?>
<span class="grey"> добавил<?= ($avtor['pol'] == 1 ? '' : 'а')?> <?= $post['count']?> фото в папку </span>
<a href="/foto/<?= $avtor['id']?>/<?= $gallery['id']?>/" class="arrow_link break-word"> «<span><?= text($gallery['name'])?></span>»</a>
</div>
<div class="grey small cl"><?= $s1 . vremja($post['time']) . $s2?></div>
<div class="list_item font0">
<?
while ($xx = mysql_fetch_assoc($as))
{
?>
<div class=" tiled_item tiled_item-80 S800">
<div class="tiled_inner t_center relative">
<span class="relative" style="display: inline-block;max-width: 100%; padding:5px;">
<span class="inl_bl">
<a class="tdn gview_link" href="/foto/<?= $gallery['id_user']?>/<?= $gallery['id']?>/<?= $xx['id']?>/" >
<div class="inl_bl relative">
<img src="/foto/foto128/<?= $xx['id']?>.<?= $xx['ras']?>" alt="" class="preview s81_80">
</div>
</a>
</span> </span>
</div> </div>
<?
}
?>
</div>
</div></div>
<?
if (isset($kol2)){
?>
<a href="/foto/<?= $avtor['id']?>/<?= $gallery['id']?>/" class="link -full is_final ">
<span><!-- --><img src="/user/tape/ico/down.png" alt="" class="m">
<!-- --><span class="m grey">Посмотреть ещё <?= $kol2?> фото</span><!-- -->
</span>
</a>
<?
}
}
else
{
?>
<b class="grey">Фотоальбом удален.</b>
<?
query("DELETE FROM `tape` WHERE `id_user` = '$user[id]' AND `id` = '$post[id]' LIMIT 1");
}
}
?>