'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',
'status' => 'includes/profile',
'password' => 'includes/profile',
'reset' => 'includes/profile',
'settings' => 'includes/profile',
'friends' => 'includes/profile',
'stat' => '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');
echo '
' . ($user['id'] != $user_id ? $lng_profile['user_profile'] : $lng_profile['my_profile']) . '
';
//Tugulgan kun
if ($user['dayb'] == date('j', time()) && $user['monthb'] == date('n', time())) {
echo '';
}
///anketa to`ldirilmagan
if ($user['id'] == $user_id)
if (empty($user['yearofbirth']) || empty($user['imname']) || empty($user['live']) || empty($user['about']) || empty($user['skype']))
{
echo 'Sizda anketa to`ldirilmagan! Yanada ko`proq do`stlar topish uchun to`ldirishni maslahat beramiz!
';
echo '
To`ldirish | Ko`rish ';
}
//oxiri
echo '";
echo 'Statistika
';
////////////////////////////////////////////////////////////////////////
require'status/add.php';
echo 'Anketa
';
$myguests = mysql_result(mysql_query("SELECT COUNT(*) FROM `my_guests` WHERE `my_id` = '" . $user['id'] . "'"), 0);
$count_podareno= mysql_result(mysql_query("SELECT COUNT(*) FROM `podarok` where `user` = '".$user['id']."'"), 0);
$count_poluceno= mysql_result(mysql_query("SELECT COUNT(*) FROM `podarok` where `komu` = ' ".$user['id']." ' AND `skrit`='0' "), 0);
$total_photo = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_album_files` WHERE `user_id` = '" . $user['id'] . "'"), 0);
$friend = mysql_result(mysql_query("SELECT COUNT(*) FROM `friend` WHERE `user` = '" . $user['id'] . "'"), 0);
$user_id_friends=$user['id'];
$user_id_friends=$user_id;
$query = mysql_query("SELECT * FROM `friend` WHERE `user` = '".$user_id_friends."' ");
if(@mysql_num_rows($query) != 0)
{
$friends_online=0;
while ( $row = mysql_fetch_array ( $query ) )
{
$friend_id=$row['friend'];
$friend_me = mysql_fetch_assoc(mysql_query("SELECT * FROM `users` WHERE `id` = '" .$friend_id. "' "));
if( time() < $friend_me['lastdate'] + 300)
$friends_online=$friends_online+1;
}
}
if ($user['id'] == $user_id) {
echo '';
$total_friends = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_contact` WHERE `user_id`='{$user['id']}' AND `type`='2' AND `friends`='1'"), 0);
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
}
else
{
echo '';
$total_friends = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_contact` WHERE `user_id`='{$user['id']}' AND `type`='2' AND `friends`='1'"), 0);
echo '';
echo '';
echo '';
echo '';
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 = 'Do’stlar qatoriga qo’shish';
}
} else {
$friend = 'Do’stlikni bekor qilish';
}
echo '';
}
if (functions::is_contact($user['id']) != 2) {
if (!functions::is_contact($user['id'])) {
echo '';
} else {
echo '';
}
}
if (functions::is_contact($user['id']) != 2) {
echo '';
} else {
echo '';
}
echo '';
}
$bancount = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_ban_users` WHERE `user_id` = '" . $user['id'] . "'"), 0);
if ($bancount)
echo '';
if ($user['id'] != $user_id && $rights > $user['rights'])
{
echo '';
}
}
//mehmon boshi
if ($user['id'] != $user_id){
$g = mysql_result(mysql_query("SELECT * FROM `my_guests` WHERE `my_id` = '" . $user['id'] . "' AND `guest_id` = '" . $user_id . "' LIMIT 1;"), 0);
if (!empty($g)) {
@mysql_query("UPDATE `my_guests` SET `time` = '" . $realtime . "', `type` = '0' WHERE `my_id` = '" . $user['id'] . "' AND `guest_id` = '" . $user_id . "';");
} else {
@mysql_query("INSERT INTO `my_guests` SET
`my_id` = '" . $user['id'] . "',
`time` = '" . $realtime . "',
`guest_id` = '" . $user_id . "',
`type` = '0';");
}
}
echo '';
require_once('../incfiles/end.php');
?>