File size: 2.98Kb
<?
/*
* $name описание действий объекта
*/
if ($type=='avatar' && $post['avtor'] != $user['id']) // аватар
{
if ($post['avatar'])
$name = 'обновил' . ($avtor['pol'] == 1 ? null : "а") . ' аватарку';
else
$name = 'установил' . ($avtor['pol'] == 1 ? null : "а") . ' аватарку';
}
/*
* Вывод блока с содержимым
*/
if ($type == 'avatar')
{
$foto = mysql_fetch_assoc(mysql_query("SELECT * FROM `gallery_foto` WHERE `id` = '".$post['id_file']."' LIMIT 1"));
$avatar = mysql_fetch_assoc(mysql_query("SELECT * FROM `gallery_foto` WHERE `id` = '".$post['avatar']."' LIMIT 1"));
$gallery = mysql_fetch_assoc(mysql_query("SELECT * FROM `gallery` WHERE `id` = '".$foto['id_gallery']."' LIMIT 1"));
$gallery2 = mysql_fetch_assoc(mysql_query("SELECT * FROM `gallery` WHERE `id` = '".$avatar['id_gallery']."' LIMIT 1"));
$comm = mysql_result(mysql_query("SELECT COUNT(*) FROM `gallery_komm` WHERE `id_foto` = '$foto[id]'"),0);
?>
<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"> <?= $name?> </span>
<div class="grey small cl"><?= $s1 . vremja($post['time']) . $s2?></div>
<div class="list_item font0">
<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">
<?
if (!$post['avatar'])
{
if ($avatar['id']){
?>
<a class="tdn gview_link" href="/foto/<?= $avtor['id']?>/<?= $gallery2['id']?>/<?= $avatar['id']?>/" >
<div class="inl_bl relative">
<img src="/foto/foto128/<?= $post['avatar']?>.<?= $post['ras']?>" alt="" class="preview s81_80">
</div>
</a>
<?
}
else{
?>
<div class="inl_bl relative">
<img style="height: 80px; width: 80px;border: 1px solid #c5d3e1;" src="/user/tape/ico/no_photo.png" alt="" class="preview s81_80">
</div>
<?
}
}
else{
if ($foto['id']){
?>
<a class="tdn gview_link" href="/foto/<?= $avtor['id']?>/<?= $gallery['id']?>/<?= $foto['id']?>/" >
<div class="inl_bl relative">
<img src="/foto/foto128/<?= $post['id_file']?>.<?= $post['ras']?>" alt="" class="preview s81_80">
</div>
</a>
<?
}
else{
?>
<div class="inl_bl relative">
<img style="height: 80px; width: 80px;border: 1px solid #c5d3e1;" src="/user/tape/ico/no_photo.png" alt="" class="preview s81_80">
</div>
<?
}
}
?>
</span> </span>
</div> </div>
</div>
</div></div>
<?
if ($foto['id']){
?>
<a class="right" href="/foto/<?= $avtor['id']?>/<?= $gallery['id']?>/<?= $foto['id']?>/">
<img src="/user/tape/ico/comm_ico.png" alt=""/> <span class="grey"><?= $comm?></span></a>
<?
}
?>
</div>
<?
}
?>