Файл: user/profil/save.php
Строк: 124
<?
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']);
$ank=get_user($ank['id']);
if(!$ank){
header("Location: /index.php?".SID);
exit;
}
# Заголовок
$set['title']=''.user::nick($ank['id'],0).' сохраненки';
include_once '../../sys/inc/thead.php';
title();
aut();
echo '<table class="block3" cellpadding="0" cellspacing="0">';
echo '<td style="width:110px;">';
# Аватар
echo avatar_profil($ank['id'], true, 640, false);
# Сделать подарок
if (isset($user) && $ank['id']!=$user['id']){
echo '<span style="position: absolute; margin: 60px -20px 0;"><a href="/user/gift/categories.php?id='.$ank[id].'"><img width="20" src="/img/go_gift.png"></a></span>';
}
echo '</td>';
echo '<td>';
if ($ank['verified'] == 1) $verified = ' <img style="margin: -1px 5px;" src="/img/verified.png" title="Подтверждённая страница" alt="Подтверждённая страница"> ';
echo '<b>'.user::nick($ank['id']).'</b> '.$verified.'';
# Редактирование профиля
echo '<a class="profil_edit" href="/user/edit/">Редактировать профиль</a>';
echo '</td>';
echo '</table>';
# Информация о аккаунте
echo '<div class="block3">';
# Имя
if ($ank['ank_name']!=NULL){
echo '<b>'.$ank[ank_name].'</b> ';
}else{
# No
}
# Фамилия
if ($ank['ank_fam']!=NULL){
echo '<b>'.$ank[ank_fam].'</b>';
}else{
# No
}
echo '</br>';
# О себе
if ($ank['ank_o_sebe']!=NULL){
echo ''.output_text($ank['ank_o_sebe']).'';
}else{
# No
}
echo '</div>';
# Панель
# Счетчики
$count_friends = mysql_result(mysql_query("SELECT COUNT(*) FROM `frends` WHERE `user` = '$ank[id]' AND `i` = '1'"), 0);
$count_photo = mysql_result(mysql_query("SELECT COUNT(*) FROM `gallery_foto` WHERE `id_user` = '$ank[id]'"),0);
$count_gifts = mysql_result(mysql_query("SELECT COUNT(id) FROM `gifts_user` WHERE `id_user` = '$ank[id]' AND `status` = '1'"),0);
echo '<table style="text-align:center;" class="block_profil_panel" cellpadding="0" cellspacing="0">';
echo '<td><a href="/modules/photo/'.$ank[id].'/"><span class="profil_panel_count">'.$count_photo.'</span></br>публикаций</a></td>';
echo '<td><a href="/user/friends/?id=' . $ank['id'] . '"><span class="profil_panel_count">'.$count_friends.'</span></br>друзей</a></td>';
echo '<td><a href="/user/gift/index.php?id='.$ank[id].'"><span class="profil_panel_count">'.$count_gifts.'</span></br>подарков</a></td>';
echo '</table>';
echo '<table style="text-align:center;" class="block_profil_panel" cellpadding="0" cellspacing="0">';
echo '<td><a href="/id'.$ank[id].'"><img src="/img/plist.png"></a></td>';
echo '<td><a href="/user/profil/save.php?id='.$ank[id].'"><img src="/img/fav_list.png"></a></td>';
echo '<td><a href="/user/profil/gift.php?id='.$ank[id].'"><img src="/img/glist.png"></a></td>';
echo '</table>';
# Вывод сохраненых фото
$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';
?>