Вход Регистрация
Файл: public_html/element_options/element_options.php
Строк: 163
<?php
    error_reporting
(4);
    
ignore_user_abort(true);
    
define('element_war''');
    
ob_start();
    
//exit('404 not found');

define('APP_VK_ID''4635938');
define('APP_VK_REDIRECT''http://wwar2.ru/auth-vk.php');
define('APP_VK_SECRET''mNvb0DXEns5CZNh3QB4z');

$go = (isset($_GET['go'])) ? addslashes(htmlspecialchars($_GET['go'])) : false;
$id = (isset($_GET['id']) AND is_numeric($_GET['id'])) ? (int)$_GET['id'] : false;
$name_race = array('Нет стихии','Стихия огня','Стихия воды','Стихия воздуха','Стихия земли''Чужие');

    require_once 
'./element_options/element_database.php';

    require_once 
'./element_function/element_function_standart.php';

    
// Если "сервер" игры отключен, не пускаем никого кроме администрации!
    
if (element_settings_game('lost_servers') == AND $user['lost_privilege'] != 3) require_once './element_include/element_game_stop.php';

    if (
$user) {
        
// Подключаем пользовательские функции
        
require_once './element_function/element_function_users.php';
        
//$user['lost_privilege'] = 3;
        // 0 - личный, 1 - личный глобальный опыт, 2 - городской опыт
        
$lost_exp explode(' '$user['lost_exp']);

        
// Записываем в массив онлайна пользователя, если его там нет, либо обновляем если запись устарела.
        
$online online_users($user['lost_id'], $lost_exp[1]);
        
file_put_contents(__DIR__.'/../online.txt'sizeof($online));
        
        
// Если персонаж в блоке, подключаем страницу блокировки
        
if (!empty($user['lost_block_info']) AND $user['lost_login'] != 'Apeccc') require_once './element_include/element_profile_block.php';

        
// Если пользователь не выбрал стихии, делаем переадресацию на страницу выбора
        
if ($user['lost_race'] == AND !isset($starting_on)) { header('Location: /start'); exit; }

        
// Регистрация / Посл. вход / Почта / Бан / Ник / Стихия / Пол / Автобой:миссии
        
$lost_other explode(' '$user['lost_other']);

        if (
$user['lost_town'] > 0) {
            
$user_town cache_town($user['lost_town']);
            
$town_other explode(':'$user['lost_town_other']);
        }

        
// Кэш приглашения в город
        
$user_prig_gorod readcache('element_v_gorod_user'.$user['lost_id']);

        
$get_cristall = (isset($_GET['cristall']) AND is_numeric($_GET['cristall'])) ? (int)$_GET['cristall'] : 0;
        
$get_expoint = (isset($_GET['expoint']) AND is_numeric($_GET['expoint'])) ? (int)$_GET['expoint'] : 0;
        
$get_gold = (isset($_GET['gold']) AND is_numeric($_GET['gold'])) ? (int)$_GET['gold'] : 0;
        
$array_type = array('helmet''cape','armor''zone''feet''hands''shield''weapon''shoes');

        
// Благословение
        
$user_blessing SetBlessing($user['lost_blessing']);

            if (
$user_blessing) {
                
$time_enka element_settings_game('lost_refresh_energy') - $user_blessing['energy'];
            } else 
$time_enka element_settings_game('lost_refresh_energy');

        
// Восстановление энергии
        
$user_energy element_update_params_energy($user['lost_params_energy'], $time_enka);
        if (
$user_energy[3] == 1) {
            
$user['lost_params_energy'] = $user_energy[4];
            
writecache('element_users_id_'.$user['lost_id'],$user);
            
user_list_update($user['lost_id']);
        }

        
// Обновляем айпи и юзер агент раз в 5 минут
        
if ($user['time_refresh_ip'] < time()) {
            
$user['lost_ip'] = my_ip();
            
$user['lost_user_agent_2'] = $_SERVER['HTTP_USER_AGENT'];
            
$user['time_refresh_ip'] = time() + 300;
            
update_params_users($user);
            
user_list_update($user['lost_id']);
        }

        
// Алтарь города. Обновляем параметры в зависимости от % и активности алтаря
        
$user_altar SetAltar($user['lost_town_altar'], $user['lost_town_altar_time'], $user['lost_town']);
        if (
$user_altar['update'] == true$user SetParams($user000true);

        
// Снимаем благословение, если активно
        
if ($user['lost_blessing'] > AND $user['lost_blessing_time'] < time()) {
            
$user['lost_blessing'] = 0;
            
$user SetParams($user, -$user_blessing['params'], -$user_blessing['params'], -$user_blessing['params'], true);
        }
        
        if (
sizeof(users_shoot_item($user['lost_id'])) < 20)
        {
            require_once 
'./element_function/element_function_mail.php';
            
$_bag users_shoot_item($user['lost_id']);
            
$query mysql_query("SELECT * FROM `element_auction` WHERE `lost_user`='{$user['lost_id']}' AND `lost_time`+'86400'<'".time()."' LIMIT ".(20 sizeof($_bag)));
            while (
$auk mysql_fetch_array($query))
            {
                
$_bag[$auk['lost_id']] = $auk['lost_id'];
                
$profile_other explode(' '$user['lost_other']);
                
$profile_other[2] = $profile_other[2] + 1;
                
$user['lost_other'] = implode(' '$profile_other);
                
                
mysql_query("UPDATE `element_item` SET `lost_bag` = '0' WHERE `lost_id` = '$auk[lost_id]' LIMIT 1");
                
mysql_query("DELETE FROM `element_auction` WHERE `lost_id` = '$auk[lost_id]' LIMIT 1");
                
mysql_query("INSERT INTO `element_mail` SET `lost_out` = '0', `lost_in` = '$user[lost_id]',
                    `lost_sub_text` = 'Возврат с аукциона',
                    `lost_text` = 'Вашу <a href="
/item?id={$auk['lost_id']}">вещь</a> никто не купил, и мы её Вам вернули',
                    `lost_user_out` = '0', `lost_user_in` = '
$user[lost_id]', `lost_time` = '".time()."', `lost_system` = 'Аукцион', `lost_new` = '1'");        
                                                        
                
$count_in Cache_Count_Message($user['lost_id']);
                if (!empty(
$count_in['all']))
                {
                    
$count_in['all']++;
                }
                if (!empty(
$count_in['in']))
                {
                    
$count_in['in']++;
                }
                if (!empty(
$count_in['new']))
                {
                    
$count_in['new']++;
                }
                
                
writecache('element_users_id_'.$user['lost_id'], $user);
                
writecache('element_count_message'.$user['lost_id'], $count_in);
                
writecache('element_shoot_item_user_id'.$user['lost_id'], $_bag);
            }
        }

        
$_week date('w');
        if (
$_week or $_week 5)
        {
            
$_prize_s 1;
            
$_week_award mysql_query("SELECT * FROM `tours` ORDER BY `count` DESC LIMIT 3");
            
$_week_count mysql_result(mysql_query("SELECT COUNT(*) FROM `tours`"), 0);
            
$_award_user null;

            while (
$_week_a mysql_fetch_assoc($_week_award))
            {
                
$_cache_user cache_user($_week_a['user']);
                if (
$_prize_s == 1)
                {
                    
$_award_user $_cache_user;
                    
update_money_exp($_cache_user000, ($_week_count 10 2));
                }
                else if (
$_prize_s == 2)
                {
                    
update_money_exp($_cache_user01000000);
                }
                else if (
$_prize_s == 3)
                {
                    
update_money_exp($_cache_user001000);
                }
                
                
$_prize_s++;
            }
            
            if (
$_week_count 0)
            {
                
mysql_query("INSERT INTO `element_forum_topic_2` SET `lost_name` = 'Турнир завершен',
                                                                 `lost_text` = 'Окончание, я взял кассу)',
                                                                 `lost_user` = '
{$_award_user['lost_id']}',
                                                                 `lost_time` = '"
.time()."',
                                                                 `lost_time_comment` = '"
.time()."',
                                                                 `lost_subforum` = '1',
                                                                 `lost_close` = '0',
                                                                 `lost_pric` = '0'"
);
            }
            
            
mysql_query("DELETE FROM `tours`");
        }
        

    }
?>
Онлайн: 1
Реклама