Файл: user/fav/index.php
Строк: 53
<?
include_once '../../sys/inc/start.php';
include_once '../../sys/inc/compress.php';
include_once '../../sys/inc/sess.php';
include_once '../../sys/inc/home.php';
include_once '../../sys/inc/settings.php';
include_once '../../sys/inc/db_connect.php';
include_once '../../sys/inc/ipua.php';
include_once '../../sys/inc/fnc.php';
include_once '../../sys/inc/user.php';
if (isset($user))$ank['id'] = $user['id'];
if (isset($_GET['id']))$ank['id'] = intval($_GET['id']);
if ($ank['id'] == 0){
header("Location: /index.php?" . SID);exit;
}
$ank = get_user($ank['id']);
if( !$ank ){
header("Location: /index.php?" . SID);
exit;
}
# Заголовок
$set['title'] = 'Сохраненки ' . $ank['nick'];
include_once '../../sys/inc/thead.php';
title();
err();
aut();
$k_post=mysql_result(mysql_query("SELECT COUNT(id_object) FROM `bookmarks` 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'];
$q=mysql_query("SELECT * FROM `bookmarks` WHERE `id_user`='$ank[id]' ORDER BY `time` DESC LIMIT $start,$set[p_str]");
echo '<div class="album">';
while($post=mysql_fetch_assoc($q)){
if($post['type']=='foto'){
$foto=mysql_fetch_assoc(mysql_query("SELECT * FROM `gallery_foto` WHERE `id`='$post[id_object]' LIMIT 1"));
echo '<a class="flowap-album_item" href="/modules/photo/'.$foto['id_user'].'/'.$foto['id_gallery'].'/'.$foto['id'].'/">';
echo '<div class="flowap-album_thumb_wrap">';
echo '<div class="flowap-album_thumb flowap-album-fill">';
echo '<img class="flowap-album_thumb_img" src="/modules/photo/foto/'.$foto['id'].'jpg">';
echo '</div>';
echo '</div>';
echo '</a>';
}
}
echo '</div>';
include_once '../../sys/inc/tfoot.php';
?>