Файл: info.php
Строк: 201
<?php
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['user'])) {
if (isset($user) AND $_GET['user'] == null) {
$mylink = $user['mylink'];
} else {
$mylink = my_esc($_GET['user']);
}
if (count::query('user', " `mylink` = '" . $mylink . "'") != 0) {
$link = mysql_fetch_array(query("SELECT `id`,`mylink` FROM `user` WHERE `mylink` = '" . $mylink . "' LIMIT 1"));
$ank['id'] = $link['id'];
} else {
$ank['id'] = $user['id'];
exit(header('Location: /err.php?err=404'));
}
}
if (isset($_GET['id'])) {
$ank['id'] = intval($_GET['id']);
}
$ank = get_user($ank['id']);
#для сео META данные
$meta_keywords = mb_substr($ank['status_ank'], 0, 160);
$set['meta_keywords'] = meta_out_keywords($meta_keywords);
$ank['_ank_city'] = $ank['ank_city'] != null ? ',' . $ank['ank_city'] : null;
$ank['_mylink'] = $ank['mylink'] != null ? ',' . $ank['mylink'] : null;
$ank['_ank_family'] = $ank['ank_family'] != null ? ',' . $ank['ank_family'] : null;
$ank['_ank_name'] = $ank['ank_name'] != null ? ',' . $ank['ank_name'] : null;
$ank['_ank_countr'] = $ank['ank_countr'] != null ? ',' . $ank['ank_countr'] : null;
$ank['_ank_icq'] = $ank['ank_icq'] != null ? ',' . $ank['ank_icq'] : null;
$ank['_ank_mail'] = $ank['ank_mail'] != null && $ank['set_show_mail'] != 0 ? ',' . $ank['ank_mail'] : null;
$ank['_ank_skype'] = $ank['ank_skype'] != null ? ',' . $ank['ank_skype'] : null;
$set['meta_description'] = meta_out_description($ank['nick'] . '' . $ank['_mylink'] . '' . $ank['_ank_city'] . '' . $ank['_ank_family'] . '' . $ank['_ank_name'] . '' . $ank['_ank_countr'] . '' . $ank['_ank_icq'] . '' . $ank['_ank_mail'] . '' . $ank['_ank_skype']);
#подключаем языковой пакет
lang::start('profile');
#system
if ($ank['id'] == 0 or $ank['id'] < 0) {
if ($set['system_ank'] == 1) {
exit(header('Location: /'));
}
$set['title'] = nick($ank['id'], null, 0, 1) . ' - ' . lang('Профиль');
include_once 'sys/inc/thead.php';
title();
aut();
echo "<span class='status'> " . lang($ank['group_name']) . "</span><br />";
if ($ank['ank_o_sebe'] != NULL) {
echo lang('О себе') . ": $ank[ank_o_sebe]";
}
include_once 'sys/inc/tfoot.php';
exit;
}
#--------------system----------------------------#
if (!$ank) {
exit(header('Location: /'));
}
$set['title'] = nick($ank['id'], null, 0, 1) . ' - ' . lang('Профиль');
include_once 'sys/inc/thead.php';
title();
aut();
$menu = query("SELECT * FROM `info_menu` ORDER BY `pos` ASC");
if ($menu == null) {
msg(lang('Разделы еще не созданы'));
} else {
while ($post = mysql_fetch_assoc($menu)) {
#если раздел
if ($post['type'] == 'razd') {
echo "<div class='list-group-item'> <span class='fa fa-th-large'></span> " . output_text($post['name']);
}
#файл
if ($post['file'] != NULL and is_file(H . 'sys/info/' . $post['file']) and $post['type'] == 'inc') {
include_once (H . 'sys/info/' . $post['file']);
}
#закрывающие дивы
if ($post['type'] == 'razd') {
echo "</div>";
}
}
}
include_once H . 'sys/inc/tfoot.php';