File size: 4.78Kb
<?
if (!isset($user) && !isset($_GET['id_user'])){
header("Location: /foto/?".SID);
exit;
}
if (isset($user)){
$ank['id'] = $user['id'];
}
if (isset($_GET['id_user'])){
$ank['id'] = intval($_GET['id_user']);
}
// Автор альбома
$ank = get_user($ank['id']);
if (!$ank){header("Location: /foto/?".SID);exit;}
// Если вы в бане
if (isset($user) && mysql_result(mysql_query("SELECT COUNT(*) FROM `ban` WHERE `razdel` = 'foto' AND `id_user` = '$user[id]' AND (`time` > '$time' OR `view` = '0' OR `navsegda` = '1')"), 0)!=0)
{
header('Location: /ban.php?'.SID);
exit;
}
// заголовок страницы
$set['title'] = 'Фото : ' . $ank['nick'];
include_once H.'sys/inc/thead.php';
title();
aut();
err();
?>
<link rel="stylesheet" href="/foto/style/style-foto.css" type="text/css" />
<div class="foto_head_bg">
<div class="lc_br wbg font0 relative oh" id="header_path">
<a href="/" style="font-size:0;"> <img src="/foto/style/ico/home.png" alt=""> </a>
<span class="lc_brw">
<img src="/foto/style/ico/sep.png" alt="" class="lc_br_sep"> <a href="/info.php?id=<?= $ank['id']?>"><?= $ank['nick']?></a>
</span>
<span class="lc_brw">
<img src="/foto/style/ico/sep.png" alt="" class="lc_br_sep"> <a href="/foto/<?= $ank['id']?>/">Фото</a>
</span>
</div>
<?
// Подключаем приватность стр.
include H.'sys/add/user.privace.php';
if (isset($user) && $ank['id'] == $user['id']){
?>
<div class="wrapper">
<table class="table__wrap table__links"> <tbody><tr>
<td class="table__cell" width="50%">
<a href="/foto/<?= $user['id']?>/?act=create" class="link -full blue ">
<span><!-- --><img src="/foto/style/ico/dir_create.png" alt="" class="m"> <!-- --><span class="m">Создать папку</span><!-- --></span>
</a>
</td>
<td class="table__cell table__cell_last" width="50%">
<a href="/foto/<?= $user['id']?>/?act=upload" class="link -full blue ">
<span><!-- --><img src="/foto/style/ico/upload_blue.png" alt="" class="m"> <!-- --><span class="m"> Добавить файл</span><!-- --></span>
</a>
</td>
</tr> </tbody></table>
</div>
<?
}
?>
<div class="tabs_block oh">
<a href="/foto/<?= $ank['id']?>/" class="tab_item left"> Папки </a>
<div class="tab_item left tab_active black"> Все файлы </div>
<a href="/foto/collections/<?= $ank['id']?>/" class="tab_item left"> Коллекции </a>
</div>
<?
// Количество фоток которых выводим на одну страницу
$set['p_str'] = '20';
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `gallery_foto` WHERE `id_user` = '$ank[id]'"),0);
$k_page = k_page($k_post,$set['p_str']);
$page = page($k_page);
$start = $set['p_str']*$page-$set['p_str'];
if ($k_post == 0)
{
?>
<div class="wrapper"> <div class="block grey"> Список пуст. </div> </div>
<?
}
else{
?>
<div class="wrapper">
<div id="sz_gallery_loader" data-type="user" class="wbg oh tiles_block tiles_wrapper">
<?
$q = mysql_query("SELECT * FROM `gallery_foto` WHERE `id_user` = '$ank[id]' ORDER BY `time` DESC LIMIT $start, $set[p_str]");
while ($post = mysql_fetch_assoc($q))
{
$comm = mysql_result(mysql_query("SELECT COUNT(*) FROM `gallery_komm` WHERE `id_foto` = '$post[id]'"),0);
$gallery = mysql_fetch_assoc(mysql_query("SELECT * FROM `gallery` WHERE `id` = '$post[id_gallery]' LIMIT 1"));
?>
<div class=" tiled_item tiled_item-200" style="padding-top: 5px;">
<div class="tiled_inner t_center relative">
<span class="relative" style="display: inline-block;max-width: 100%; width: 100%;overflow: hidden;">
<div class="inl_bl22">
<a class="tdn" href="/foto/<?= $ank['id']?>/<?= $post['id_gallery']?>/<?= $post['id']?>/">
<img src="/foto/foto640/<?= $post['id']?>.<?= $post['ras']?>" class="preview preview99 s201_200">
<?
if ($post['metka'] == 1){
?>
<img src="/foto/style/ico/adult.png" class="p16 f_18p" alt="">
<?
}
?>
</a>
</div>
</span>
<div class="tile_descr">
<div class="pl_photo_image_info oh">
<span class="tf grey">
<?
if($post['count'] > 0){
?>
<span class="inl_bl"> <img src="/foto/style/ico/eye.png" alt="" class="m"> <span class="m"><?= $post['count']?></span> </span>
<?
}
if($comm > 0){
?>
<span class="t-padd_left"> <img src="/foto/style/ico/com.png" class="m" alt=""> <span class="m"><?= $comm?></span> </span>
<?
}
?>
</span>
</div> </div>
</div>
</div>
<?
}
?>
</div>
</div>
<?
}
// Вывод страниц
if ($k_page > 1)str('?', $k_page, $page);
?>
<a href="/foto/<?= $ank['id']?>/" class="link darkblue return full_link"> <img src="/foto/style/ico/arr_back.png" alt="" class="ico_arrow-back"> Назад </a>
<div style="height: 1px;"></div>
</div>
<?
include_once '../sys/inc/tfoot.php';
exit;
?>