'includes/profile', 'ban' => 'includes/profile', 'edit' => 'includes/profile', 'images' => 'includes/profile', 'info' => 'includes/profile', 'ip' => 'includes/profile', 'guestbook' => 'includes/profile', 'karma' => 'includes/profile', 'office' => 'includes/profile', 'password' => 'includes/profile', 'reset' => 'includes/profile', 'settings' => 'includes/profile', 'stat' => 'includes/profile', 'friends' => 'includes/profile' ); $path = !empty($array[$act]) ? $array[$act] . '/' : ''; if (array_key_exists($act, $array) && file_exists($path . $act . '.php')) { require_once($path . $act . '.php'); } else { /* ----------------------------------------------------------------- Анкета пользователя ----------------------------------------------------------------- */ $headmod = 'profile,' . $user['id']; $textl = $lng['profile'] . ': ' . htmlspecialchars($user['name']); require('../incfiles/head.php'); //Уведомление о дне рожденья if ($user['dayb'] == date('j', time()) && $user['monthb'] == date('n', time())) { echo '
' . $lng['birthday'] . '!!!
'; } // Информация о юзере $arg = array( 'lastvisit' => 1, 'iphist' => 1, 'header' => '' ); if ($user['id'] != core::$user_id) { $arg['footer'] = '' . core::$lng['where'] . ': ' . functions::display_place($user['id'], $user['place']); } core::$user_set['avatar'] = 0; echo '
' . functions::display_user($user, $arg) . '
'; // Если юзер ожидает подтверждения регистрации, выводим напоминание if ($rights >= 7 && !$user['preg'] && empty($user['regadm'])) { echo '
' . $lng_profile['awaiting_registration'] . '
'; } // Меню анкеты $menu = array(); if ($user['id'] == $user_id || $rights == 9 || ($rights == 7 && $rights > $user['rights'])) { $menu[] = '
' . $lng['edit'] . '
'; } if ($user['id'] != $user_id && $rights >= 7 && $rights > $user['rights']) { $menu[] = '' . $lng['delete'] . ''; } if ($user['id'] != $user_id && $rights > $user['rights']) { $menu[] = '' . $lng['ban_do'] . ''; } if (!empty($menu)) { echo '
' . functions::display_menu($menu) . '
'; } echo '' . '
' . '' . '' . '' . '' . '' . '' . '
' . 'Анкета ID:' . $user['id'] . '' . '' . '' . $lng['statistics'] . '' . '' . '' . $lng_profile['activity'] . '' . '
' . '
'; if (file_exists('../files/users/photo/'.$user['id'].'.jpg')) { $anhbia = '/files/users/photo/'.$user['id'].'.jpg'; }else{ if (file_exists(('../files/users/photo/' . $user['id'] . '.png'))) { $anhbia = '/files/users/photo/'.$user['id'].'.png'; } else { $anhbia = '/images/nofoto.jpg'; } } if (file_exists(('../files/users/avatar/' . $user['id'] . '.png'))) { $ava = '/files/users/avatar/'.$user['id'].'.png'; } else { $ava = '/images/empty.png'; } $lgab = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '".$user['id']."' LIMIT 1")); echo '
'; if($user_id == $user['id']) { echo '
' . $lng_profile['upload'] . ' фото' . $link . '
'; } // Карма if ($set_karma['on']) { $karma = $user['karma_plus'] - $user['karma_minus']; if ($karma > 0) { $images = ($user['karma_minus'] ? ceil($user['karma_plus'] / $user['karma_minus']) : $user['karma_plus']) > 10 ? '2' : '1'; echo '
'; } else if ($karma < 0) { $images = ($user['karma_plus'] ? ceil($user['karma_minus'] / $user['karma_plus']) : $user['karma_minus']) > 10 ? '-2' : '-1'; echo '
'; } else { $images = 0; echo '
'; } echo '
' . '
' . '' . functions::image('karma2.png') . ' ' . $user['karma_plus'] . '' . '' . functions::image('karma1.png') . ' ' . $user['karma_minus'] . ''; if ($user['id'] != $user_id) { if (!$datauser['karma_off'] && (!$user['rights'] || ($user['rights'] && !$set_karma['adm'])) && $user['ip'] != $datauser['ip']) { $sum = mysql_result(mysql_query("SELECT SUM(`points`) FROM `karma_users` WHERE `user_id` = '$user_id' AND `time` >= '" . $datauser['karma_time'] . "'"), 0); $count = mysql_result(mysql_query("SELECT COUNT(*) FROM `karma_users` WHERE `user_id` = '$user_id' AND `karma_user` = '" . $user['id'] . "' AND `time` > '" . (time() - 86400) . "'"), 0); if (!$ban && $datauser['postforum'] >= $set_karma['forum'] && $datauser['total_on_site'] >= $set_karma['karma_time'] && ($set_karma['karma_points'] - $sum) > 0 && !$count) { echo '
'; } } } else { $total_karma = mysql_result(mysql_query("SELECT COUNT(*) FROM `karma_users` WHERE `karma_user` = '$user_id' AND `time` > " . (time() - 86400)), 0); if ($total_karma > 0) { echo '
(' . $total_karma . ')'; } } echo '
'; } // Меню выбора $total_photo = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_album_files` WHERE `user_id` = '" . $user['id'] . "'"), 0); $bancount = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_ban_users` WHERE `user_id` = '" . $user['id'] . "'"), 0); if ($bancount) { echo '
 ' . $lng['infringements'] . ' (' . $bancount . ')
'; } $total_friends = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_contact` WHERE `user_id`='{$user['id']}' AND `type`='2' AND `friends`='1'"), 0); echo '' . '' . '' . '' . '

'; if ($user['id'] != $user_id) { echo '

'; echo '

' . '
' . '' . '' . '' . '' . '' . '' . '' . '' . '' . '' . '' . '' . '
'; // Контакты if (!functions::is_ignor($user['id']) && functions::is_contact($user['id']) != 2) { if (!functions::is_friend($user['id'])) { $fr_in = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_contact` WHERE `type`='2' AND `from_id`='$user_id' AND `user_id`='{$user['id']}'"), 0); $fr_out = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_contact` WHERE `type`='2' AND `user_id`='$user_id' AND `from_id`='{$user['id']}'"), 0); if ($fr_in == 1) { $friend = ' ' . $lng_profile['confirm_friendship'] . '' . '' . ' ' . $lng_profile['decline_friendship'] . ''; } else if ($fr_out == 1) { '' . $friend = ' ' . $lng_profile['canceled_demand_friend'] . ''; } else { '' . $friend = ' ' . $lng_profile['in_friend'] . ''; } } else { '' . $friend = ' ' . $lng_profile['remov_friend'] . ''; } echo '' . $friend . ''; } ''; if (functions::is_contact($user['id']) != 2) { if (!functions::is_contact($user['id'])) { ' ' . $lng_profile['add_contacts'] . ''; } else { ''; ' ' . $lng_profile['delete_contacts'] . ''; } } ''; if (functions::is_contact($user['id']) != 2) { ' ' . $lng_profile['add_ignor'] . ''; } else { ''; ' ' . $lng_profile['delete_ignor'] . ''; } '
' . '
'; echo '

'; if (!functions::is_ignor($user['id']) && functions::is_contact($user['id']) != 2 && empty($ban['1']) && empty($ban['3'])) { echo '

'; } echo '
'; } } require_once('../incfiles/end.php');