Вход Регистрация
Файл: public_html/element_profile_user.php
Строк: 130
<?php
require_once './element_options/element_options.php';
require_once 
'./element_function/element_function_rating.php';
require_once 
'./element_function/element_function_item.php';
    if (!
$user) { header('Location: /'); exit; }
    
$title 'Персонаж';
    if (
readcache('element_user_mesto'.$user['lost_id']) != $titlewritecache('element_user_mesto'.$user['lost_id'], $title);
    
    if (!
$id OR $id == $user['lost_id']) {
        
$wear_item users_wear_item($user['lost_id']);
        
$shoot_item users_shoot_item($user['lost_id']);
    
        
$title 'Мой персонаж';
        require_once 
'./element_include/element_head.php';
        require_once 
'./element_include/element_header_user_true.php';
        require_once 
'./element_include/element_profile_user_true.php';
        require_once 
'./element_include/element_foot_user_true.php';
    } else {
        
$profile_user cache_user($id);
    
            if (!
$profile_user) {
                
$title 'Персонаж не найден';
                
$error1 '<span class="small">Выбранный Вами персонаж не существует, либо был удален, если вы считаете это ошибкой, обратитесь пожалуйста в <a class="small yellow" href="/support">техническую поддержку</a></span>';
                require_once 
'element_error_page.php';
                exit;
            }
$list mysql_query("SELECT `push` FROM `users_contact` WHERE `user`='{$user['lost_id']}' AND `friend`='{$id}' LIMIT 1");
            if (
mysql_num_rows($list))
            {
                
$list mysql_result($list0);
            }

            if (
$_GET['go'] == 'contact' && $list != 'contact')
            {
                if (
$list == 'ignore')
                {
                    
mysql_query("UPDATE `users_contact` SET `push`='contact' WHERE `user`='{$user['lost_id']}' AND `friend`='{$id}' LIMIT 1");
                }
                else
                {
                    
mysql_query("INSERT INTO `users_contact` (`user`, `friend`, `push`) VALUES ('{$user['lost_id']}', '{$id}', 'contact')");
                }
                
                
header("Location: ?id=".$id);
                exit;
            }
            else if (
$_GET['go'] == 'ignore' && $list != 'ignore')
            {
                if (
$list == 'contact')
                {
                    
mysql_query("UPDATE `users_contact` SET `push`='ignore' WHERE `user`='{$user['lost_id']}' AND `friend`='{$id}' LIMIT 1");
                }
                else
                {
                    
mysql_query("INSERT INTO `users_contact` (`user`, `friend`, `push`) VALUES ('{$user['lost_id']}', '{$id}', 'ignore')");
                }
                
                
header("Location: ?id=".$id);
                exit;
            }
        
$nex_level1 = (element_settings_game('lost_max_level') > $profile_user['lost_level']) ? ($profile_user['lost_level'] + 1) : $profile_user['lost_level'];
        
$cache_level_nex1 readcache('element_level_exp'.$nex_level1);
            if (empty(
$cache_level_nex1)) {
            
$cache_level_nex1 mysql_fetch_array(mysql_query("SELECT `lost_exp` FROM `element_level` WHERE `lost_level` = '$nex_level' LIMIT 1"));
            
writecache('element_level_exp'.$nex_level$cache_level_nex1);
            }
        
$wear_item users_wear_item($profile_user['lost_id']);
        
        
$priglashenie readcache('element_v_gorod_user'.$id);
        
$create_level element_settings_game('lost_town_create_lvl');
        
$profile_exp explode(' '$profile_user['lost_exp']);
        
$title 'Персонаж "'.$profile_user['lost_login'].'"';
        require_once 
'./element_include/element_head.php';
        require_once 
'./element_include/element_header_user_true.php';
        
            if (
$go == 'gorod' AND $user['lost_town'] > AND $profile_user['lost_level'] >= $create_level) {
            if (
$town_other[0] < AND $town_other[0] >= AND $profile_user['lost_town'] == AND $profile_user['lost_race'] == $user_town['lost_race'] AND empty($priglashenie)) {
                
$priglashenie = array('user_id_kto' => $user['lost_id'], 'lost_town' => $user['lost_town']);
                
writecache('element_v_gorod_user'.$id$priglashenie);
                
                echo 
'<div class="nf2 small p5 mb5 small cntr lngreen mlra">';
                echo 
'Приглашение в город успешно отправлено';
                echo 
'</div>';
            }
            }
            
        if (
$profile_user['lost_town'] > 0) {
            
$user_town cache_town($profile_user['lost_town']);
        }
            
        
$user_altar SetAltar($profile_user['lost_town_altar'], $profile_user['lost_town_altar_time'], $profile_user['lost_town']);
        if (
$user_altar['update'] == true$profile_user SetParams($profile_user000true);
        
        if (
$user['lost_town'] > 0) {
            
$user_town cache_town($user['lost_town']);
            
$town_other explode(':'$user['lost_town_other']);
        }
        
        require_once 
'./element_include/element_profile_user_false.php';
        require_once 
'./element_include/element_foot_user_true.php';
    }
?>
Онлайн: 1
Реклама