当前位置: 首页>>代码示例>>PHP>>正文


PHP lng_include函数代码示例

本文整理汇总了PHP中lng_include函数的典型用法代码示例。如果您正苦于以下问题:PHP lng_include函数的具体用法?PHP lng_include怎么用?PHP lng_include使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了lng_include函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: scheduler_process

function scheduler_process()
{
    global $config, $user, $debug, $lang;
    $is_admin_request = false;
    $ts_var_stat_update = strtotime($config->db_loadItem('var_stat_update'));
    $ts_scheduled_update = sys_schedule_get_prev_run($config->db_loadItem('stats_schedule'), $config->var_stat_update);
    if (sys_get_param_int('admin_update')) {
        define('USER_LEVEL', isset($user['authlevel']) ? $user['authlevel'] : -1);
        if (USER_LEVEL > 0) {
            $is_admin_request = true;
            $ts_scheduled_update = SN_TIME_NOW;
        }
    }
    if ($ts_scheduled_update > $ts_var_stat_update) {
        lng_include('admin');
        sn_db_transaction_start();
        $ts_var_stat_update_end = strtotime($config->db_loadItem('var_stat_update_end'));
        if (SN_TIME_NOW > $ts_var_stat_update_end) {
            $old_server_status = $config->db_loadItem('game_disable');
            $config->db_saveItem('game_disable', GAME_DISABLE_STAT);
            $config->db_saveItem('var_stat_update_end', date(FMT_DATE_TIME_SQL, SN_TIME_NOW + ($config->db_loadItem('stats_minimal_interval') ? $config->stats_minimal_interval : 600)));
            $config->db_saveItem('var_stat_update_msg', 'Update started');
            sn_db_transaction_commit();
            $msg = $is_admin_request ? 'admin request' : 'scheduler';
            $next_run = date(FMT_DATE_TIME_SQL, sys_schedule_get_prev_run($config->stats_schedule, $config->var_stat_update, true));
            $msg = "Running stat updates: {$msg}. Config->var_stat_update = " . $config->var_stat_update . ', $ts_scheduled_update = ' . date(FMT_DATE_TIME_SQL, $ts_scheduled_update) . ', next_stat_update = ' . $next_run;
            $debug->warning($msg, 'Stat update', LOG_INFO_STAT_PROCESS);
            $total_time = microtime(true);
            // require_once('../includes/sys_stat.php');
            require_once SN_ROOT_PHYSICAL . 'includes/includes/sys_stat.php';
            sys_stat_calculate();
            $total_time = microtime(true) - $total_time;
            $msg = "Stat update complete in {$total_time} seconds.";
            $debug->warning($msg, 'Stat update', LOG_INFO_STAT_PROCESS);
            $msg = "{$lang['adm_done']}: {$total_time} {$lang['sys_sec']}.";
            // . date(FMT_DATE_TIME, $ts_scheduled_update) . ' ' . date(FMT_DATE_TIME, $config->var_stat_update);
            // TODO: Analyze maintenance result. Add record to log if error. Add record to log if OK
            $maintenance_result = sys_maintenance();
            $config->db_saveItem('var_stat_update', SN_TIME_SQL);
            $config->db_saveItem('var_stat_update_msg', $msg);
            $config->db_saveItem('var_stat_update_next', $next_run);
            $config->db_saveItem('var_stat_update_admin_forced', SN_TIME_SQL);
            $config->db_saveItem('var_stat_update_end', SN_TIME_SQL);
            $config->db_saveItem('game_disable', $old_server_status);
        } elseif ($ts_scheduled_update > $ts_var_stat_update) {
            $timeout = strtotime($config->db_loadItem('var_stat_update_end')) - SN_TIME_NOW;
            $msg = $config->db_loadItem('var_stat_update_msg');
            $msg = "{$msg} ETA {$timeout} seconds. Please wait...";
        }
        sn_db_transaction_rollback();
    } elseif ($is_admin_request) {
        $msg = 'Stat is up to date';
    }
    return $msg;
}
开发者ID:divyinfo,项目名称:SuperNova,代码行数:55,代码来源:scheduler_process.php

示例2: ShowLeftMenu

function ShowLeftMenu($Level = 0)
{
    global $time_now;
    lng_include('leftmenu');
    $template_name = $Level > 0 ? 'admin/left_menu' : 'left_menu';
    $template = gettemplate($template_name, true);
    $template->assign_vars(array('SERVER_TIME' => $time_now, 'USER_AUTHLEVEL' => $GLOBALS['user']['authlevel'], 'USER_AUTHLEVEL_NAME' => $GLOBALS['lang']['user_level'][$GLOBALS['user']['authlevel']]));
    if ($Level < 1) {
        global $config;
        $template->assign_vars(array('new_announce_count' => $GLOBALS['user']['news_lastread'], 'game_url' => SN_ROOT_RELATIVE, 'game_name' => $config->game_name, 'URL_RULES' => $config->url_rules, 'URL_FORUM' => $config->url_forum, 'URL_FAQ' => $config->url_faq, 'ADV_LEFT_BOTTOM' => $config->advGoogleLeftMenuIsOn ? $config->advGoogleLeftMenuCode : ''));
    }
    return $template;
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:13,代码来源:template.php

示例3: eco_bld_tech

function eco_bld_tech($que_type, &$user, &$planet)
{
    global $config, $lang;
    lng_include('buildings');
    lng_include('infos');
    if (!mrc_get_level($user, $planet, STRUC_LABORATORY)) {
        message($lang['no_laboratory'], $lang['tech'][UNIT_TECHNOLOGIES]);
    }
    if (eco_unit_busy($user, $planet, UNIT_TECHNOLOGIES)) {
        message($lang['eco_bld_msg_err_laboratory_upgrading'], $lang['tech'][UNIT_TECHNOLOGIES]);
    }
    switch ($action = sys_get_param_escaped('action')) {
        case 'build':
            $operation_result = que_build($user, $planet);
            break;
        case 'trim':
            que_delete(QUE_RESEARCH, $user, $planet, false);
            break;
        case 'clear':
            que_delete(QUE_RESEARCH, $user, $planet, true);
            break;
            //case 'build':$operation_result = eco_bld_tech_research($user, $planet);break;
    }
    $template = gettemplate('buildings_research', true);
    if (!empty($operation_result)) {
        $template->assign_block_vars('result', $operation_result);
    }
    $fleet_list = flt_get_fleets_to_planet($planet);
    $ques = que_get($user['id'], QUE_RESEARCH);
    $que =& $ques['ques'][QUE_RESEARCH][$user['id']][0];
    que_tpl_parse($template, QUE_RESEARCH, $user, null, $que);
    $in_que =& $ques['in_que'][QUE_RESEARCH][$user['id']][0];
    foreach (sn_get_groups('tech') as $unit_id) {
        if (eco_can_build_unit($user, $planet, $unit_id) != BUILD_ALLOWED) {
            continue;
        }
        $level_base = mrc_get_level($user, '', $unit_id, false, true);
        $level_effective = mrc_get_level($user, '', $unit_id);
        $level_in_que = $in_que[$unit_id];
        $level_bonus = max(0, $level_effective - $level_base);
        $level_base_and_que = $level_base + $level_in_que;
        $build_data = eco_get_build_data($user, $planet, $unit_id, $level_base_and_que);
        $temp[RES_METAL] = floor($planet['metal'] - $build_data[BUILD_CREATE][RES_METAL]);
        $temp[RES_CRYSTAL] = floor($planet['crystal'] - $build_data[BUILD_CREATE][RES_CRYSTAL]);
        $temp[RES_DEUTERIUM] = floor($planet['deuterium'] - $build_data[BUILD_CREATE][RES_DEUTERIUM]);
        $template->assign_block_vars('production', array('ID' => $unit_id, 'NAME' => $lang['tech'][$unit_id], 'DESCRIPTION' => $lang['info'][$unit_id]['description_short'], 'LEVEL_OLD' => $level_base, 'LEVEL_BONUS' => $level_bonus, 'LEVEL_NEXT' => $level_base + $level_in_que + 1, 'LEVEL_QUED' => $level_in_que, 'LEVEL' => $level_base_and_que, 'BUILD_CAN' => $build_data['CAN'][BUILD_CREATE], 'TIME' => pretty_time($build_data[RES_TIME][BUILD_CREATE]), 'METAL' => $build_data[BUILD_CREATE][RES_METAL], 'CRYSTAL' => $build_data[BUILD_CREATE][RES_CRYSTAL], 'DEUTERIUM' => $build_data[BUILD_CREATE][RES_DEUTERIUM], 'METAL_PRINT' => pretty_number($build_data[BUILD_CREATE][RES_METAL], true, $planet['metal']), 'CRYSTAL_PRINT' => pretty_number($build_data[BUILD_CREATE][RES_CRYSTAL], true, $planet['crystal']), 'DEUTERIUM_PRINT' => pretty_number($build_data[BUILD_CREATE][RES_DEUTERIUM], true, $planet['deuterium']), 'METAL_REST' => pretty_number($temp[RES_METAL], true, true), 'CRYSTAL_REST' => pretty_number($temp[RES_CRYSTAL], true, true), 'DEUTERIUM_REST' => pretty_number($temp[RES_DEUTERIUM], true, true), 'METAL_REST_NUM' => $temp[RES_METAL], 'CRYSTAL_REST_NUM' => $temp[RES_CRYSTAL], 'DEUTERIUM_REST_NUM' => $temp[RES_DEUTERIUM], 'METAL_FLEET' => pretty_number($temp[RES_METAL] + $fleet_list['own']['total'][RES_METAL], true, true), 'CRYSTAL_FLEET' => pretty_number($temp[RES_CRYSTAL] + $fleet_list['own']['total'][RES_CRYSTAL], true, true), 'DEUTERIUM_FLEET' => pretty_number($temp[RES_DEUTERIUM] + $fleet_list['own']['total'][RES_DEUTERIUM], true, true), 'BUILD_CAN2' => $build_data['CAN'][BUILD_CREATE]));
    }
    //  if(count($que['ques'][$que_id][$user['id']][$planet_id]) >= que_get_max_que_length($user, $planet, $que_id, $que_data))
    $template->assign_vars(array('QUE_ID' => QUE_RESEARCH, 'FLEET_OWN_COUNT' => $fleet_list['own']['count'], 'ARTIFACT_ID' => ART_HEURISTIC_CHIP, 'ARTIFACT_LEVEL' => mrc_get_level($user, array(), ART_HEURISTIC_CHIP), 'ARTIFACT_NAME' => $lang['tech'][ART_HEURISTIC_CHIP], 'REQUEST_URI' => $_SERVER['REQUEST_URI'], 'PAGE_HEADER' => $page_header = $lang['tech'][UNIT_TECHNOLOGIES] . ($user['user_as_ally'] ? "&nbsp;{$lang['sys_of_ally']}&nbsp;{$user['username']}" : ''), 'CONFIG_RESEARCH_QUE' => $config->server_que_length_research));
    display(parsetemplate($template), $page_header);
}
开发者ID:hayalolsam,项目名称:SuperNova,代码行数:51,代码来源:eco_bld_tech.php

示例4: die

<?php

if (!defined('INSIDE')) {
    die('Hack attempt!');
}
lng_include('menu');
$active_payment_modules = sn_module_get_active_count('payment') > 0;
global $sn_version_check_class, $template_result, $user, $config, $lang;
// , $sn_menu_admin_extra
$sn_menu = array('menu_server_name' => array('LEVEL' => 'text', 'CLASS' => 'menu_text_t', 'ITEM' => "{$config->game_name}<br />{$lang['sys_from']} {$config->server_start_date}", 'MOVEABLE' => 2, 'HIDEABLE' => 3), 'menu_server_logo' => array('LEVEL' => 'text', 'CLASS' => 'menu_text_b', 'TYPE' => 'image', 'ITEM' => 'design/images/supernova.png', 'LINK' => '.', 'ALT' => $config->game_name, 'MOVEABLE' => 2, 'HIDEABLE' => 3), 'menu_admin' => array('LEVEL' => 'header', 'ITEM' => $lang['user_level'][$user['authlevel']], 'LINK' => 'admin/overview.php', 'MOVEABLE' => 2, 'HIDEABLE' => 3, 'DISABLED' => $user['authlevel'] < 1), 'menu_impersonator' => array('LEVEL' => 'header', 'TYPE' => 'lang', 'ITEM' => 'sys_impersonate_done', 'LINK' => 'logout.php', 'MOVEABLE' => 2, 'HIDEABLE' => 3, 'DISABLED' => $template_result[F_IMPERSONATE_STATUS] == LOGIN_UNDEFINED), 'menu_faq' => array('LEVEL' => 'header', 'TYPE' => 'lang', 'ITEM' => 'm_faq', 'LINK' => $config->url_faq, 'BLANK' => true, 'ICON' => true, 'MOVEABLE' => 2, 'HIDEABLE' => 3, 'DISABLED' => empty($config->url_faq)), 'menu_planet_overview' => array('LEVEL' => 'header', 'TYPE' => 'lang', 'ITEM' => 'sys_planet', 'LINK' => 'overview.php', 'ICON' => true), 'menu_planet_structures' => array('LEVEL' => 'submenu', 'TYPE' => 'lang', 'ITEM' => 'tech[UNIT_STRUCTURES]', 'LINK' => 'buildings.php?mode=' . QUE_STRUCTURES, 'ICON' => true), 'menu_planet_shipyard' => array('LEVEL' => 'submenu', 'TYPE' => 'lang', 'ITEM' => 'Shipyard', 'LINK' => 'buildings.php?mode=' . SUBQUE_FLEET, 'ICON' => true), 'menu_planet_defense' => array('LEVEL' => 'submenu', 'TYPE' => 'lang', 'ITEM' => 'Defense', 'LINK' => 'buildings.php?mode=' . SUBQUE_DEFENSE, 'ICON' => true), 'menu_planet_resources' => array('LEVEL' => 'submenu', 'TYPE' => 'lang', 'ITEM' => 'Resources', 'LINK' => 'resources.php', 'ICON' => true), 'menu_planet_fleets' => array('LEVEL' => 'submenu', 'TYPE' => 'lang', 'ITEM' => 'lm_fleet_orbiting', 'LINK' => 'fleet.php', 'ICON' => true), 'menu_empire_overview' => array('LEVEL' => 'header', 'TYPE' => 'lang', 'ITEM' => 'sys_empire', 'LINK' => 'index.php?page=imperium', 'ICON' => true), 'menu_info_research' => array('LEVEL' => 'submenu', 'TYPE' => 'lang', 'ITEM' => 'Research', 'LINK' => 'buildings.php?mode=' . QUE_RESEARCH, 'ICON' => true), 'menu_empire_techtree' => array('LEVEL' => 'submenu', 'TYPE' => 'lang', 'ITEM' => 'Technology', 'LINK' => 'index.php?page=techtree', 'ICON' => true), 'menu_empire_fleets' => array('LEVEL' => 'submenu', 'TYPE' => 'lang', 'ITEM' => 'imp_fleets', 'LINK' => 'flying_fleets.php', 'ICON' => true), 'menu_empire_universe' => array('LEVEL' => 'header', 'TYPE' => 'lang', 'ITEM' => 'menu_universe_overview', 'LINK' => 'galaxy.php?mode=0'), 'menu_empire_emperor' => array('LEVEL' => 'submenu', 'TYPE' => 'lang', 'ITEM' => 'imp_imperator', 'LINK' => 'index.php?page=imperator', 'ICON' => true), 'menu_ally' => array('LEVEL' => 'submenu', 'TYPE' => 'lang', 'ITEM' => 'sys_alliance', 'LINK' => 'alliance.php', 'ICON' => true, 'LOCATION' => '+menu_empire_emperor', 'DISABLED' => $config->game_mode == GAME_BLITZ), 'menu_info_stats' => array('LEVEL' => 'submenu', 'TYPE' => 'lang', 'ITEM' => 'menu_stat_players', 'LINK' => 'stat.php', 'ICON' => true), 'menu_info_records' => array('LEVEL' => 'submenu', 'TYPE' => 'lang', 'ITEM' => 'menu_stat_records', 'LINK' => 'records.php', 'ICON' => true), 'menu_empire_quests' => array('LEVEL' => 'submenu', 'TYPE' => 'lang', 'ITEM' => 'menu_quest_list', 'LINK' => 'quest.php', 'ICON' => true), 'menu_dark_matter' => array('LEVEL' => 'header', 'TYPE' => 'lang', 'ITEM' => 'sys_dark_matter', 'LINK' => 'dark_matter.php'), 'menu_empire_market' => array('LEVEL' => 'submenu', 'TYPE' => 'lang', 'ITEM' => 'rinok', 'LINK' => 'market.php', 'ICON' => true), 'menu_empire_mercenaries' => array('LEVEL' => 'submenu', 'TYPE' => 'lang', 'ITEM' => 'tech[UNIT_MERCENARIES]', 'LINK' => 'officer.php?mode=' . UNIT_MERCENARIES, 'ICON' => true), 'menu_empire_schematics' => array('LEVEL' => 'submenu', 'TYPE' => 'lang', 'ITEM' => 'tech[UNIT_PLANS]', 'LINK' => 'officer.php?mode=' . UNIT_PLANS, 'ICON' => true), 'menu_empire_artifacts' => array('LEVEL' => 'submenu', 'TYPE' => 'lang', 'ITEM' => 'tech[UNIT_ARTIFACTS]', 'LINK' => 'artifacts.php', 'ICON' => true), 'menu_affiliates' => array('LEVEL' => 'submenu', 'TYPE' => 'lang', 'ITEM' => 'm_affilates', 'LINK' => 'affilates.php', 'ICON' => true), 'menu_comm_messages' => array('LEVEL' => 'header', 'TYPE' => 'lang', 'ITEM' => 'Messages', 'LINK' => 'messages.php', 'ICON' => true), 'menu_comm_chat' => array('LEVEL' => 'submenu', 'TYPE' => 'lang', 'ITEM' => 'Chat', 'LINK' => 'index.php?page=chat&mode=' . CHAT_MODE_COMMON, 'ICON' => true), 'menu_ally_chat' => array('LEVEL' => 'submenu', 'TYPE' => 'lang', 'ITEM' => 'AllyChat', 'LINK' => 'index.php?page=chat&mode=' . CHAT_MODE_ALLY, 'ICON' => true, 'DISABLED' => $config->game_mode == GAME_BLITZ), 'menu_comm_forum' => array('LEVEL' => 'submenu', 'TYPE' => 'lang', 'ITEM' => 'm_forum', 'LINK' => $config->url_forum, 'BLANK' => true, 'ICON' => true, 'DISABLED' => empty($config->url_forum)), 'menu_utils_search' => array('LEVEL' => 'header', 'TYPE' => 'lang', 'ITEM' => 'Search', 'LINK' => 'search.php', 'ICON' => true, 'DISABLED' => $config->game_mode == GAME_BLITZ), 'menu_utils_shortcuts' => array('LEVEL' => 'submenu', 'TYPE' => 'lang', 'ITEM' => 'lm_shortcuts', 'LINK' => 'notes.php', 'ICON' => true), 'menu_utils_buddies' => array('LEVEL' => 'submenu', 'TYPE' => 'lang', 'ITEM' => 'Buddylist', 'LINK' => 'buddy.php', 'ICON' => true), 'menu_utils_reports' => array('LEVEL' => 'submenu', 'TYPE' => 'lang', 'ITEM' => 'lm_combat_reports', 'LINK' => 'viewreport.php', 'ICON' => true), 'menu_utils_simulator' => array('LEVEL' => 'submenu', 'TYPE' => 'lang', 'ITEM' => 'm_simulator', 'LINK' => 'simulator.php', 'ICON' => true), 'menu_rules' => array('LEVEL' => 'header', 'TYPE' => 'lang', 'ITEM' => 'sys_game_rules', 'LINK' => $config->url_rules, 'BLANK' => true, 'ICON' => true, 'DISABLED' => empty($config->url_rules)), 'menu_news' => array('LEVEL' => 'submenu', 'ITEM' => $lang['news_title'], 'ITEM_FINISH' => $user['news_lastread'] < $config->var_news_last ? "&nbsp;<span class=\"fresh\">{$lang['lm_announce_fresh']}</span>" : '', 'LINK' => 'announce.php', 'ICON' => true), 'menu_documentation' => array('TYPE' => 'lang', 'ITEM' => 'sys_game_documentation', 'LINK' => 'docs/html/readme.html', 'BLANK' => true, 'ICON' => true), 'menu_info_ban' => array('LEVEL' => 'submenu', 'TYPE' => 'lang', 'ITEM' => 'lm_banned', 'LINK' => 'banned.php', 'ICON' => true), 'menu_info_server' => array('LEVEL' => 'submenu', 'TYPE' => 'lang', 'ITEM' => 'lm_server_info', 'LINK' => 'server_info.php', 'ICON' => true), 'menu_info_admins' => array('LEVEL' => 'submenu', 'TYPE' => 'lang', 'ITEM' => 'commun', 'LINK' => 'index.php?page=contact', 'ICON' => true), 'menu_options' => array('LEVEL' => 'header', 'TYPE' => 'lang', 'ITEM' => 'Options', 'LINK' => 'index.php?page=options', 'MOVEABLE' => 2, 'HIDEABLE' => 3), 'menu_logout' => array('LEVEL' => 'header', 'TYPE' => 'lang', 'ITEM' => 'Logout', 'LINK' => 'logout.php', 'MOVEABLE' => 2, 'HIDEABLE' => 3), 'menu_extra' => array('LEVEL' => 'submenu', 'CLASS' => 'c_c', 'ITEM' => $config->advGoogleLeftMenuCode, 'MOVEABLE' => 2, 'HIDEABLE' => 3, 'DISABLED' => !$config->advGoogleLeftMenuIsOn || empty($config->advGoogleLeftMenuCode) || empty($user) || SN_TIME_NOW - $user['register_time'] < PERIOD_WEEK || mrc_get_level($user, array(), UNIT_PREMIUM)), 'menu_supernova_logo' => array('LEVEL' => 'submenu', 'TYPE' => 'image', 'CLASS' => 'c_c', 'ITEM' => 'design/images/supernova.png', 'LINK' => 'http://supernova.ws/index-ru.html', 'ALT' => 'Powered by \'Project "SuperNova.WS"\' engine', 'BLANK' => true, 'MOVEABLE' => 2, 'HIDEABLE' => 3));
$sn_menu_admin = defined('IN_ADMIN') && IN_ADMIN === true ? array('menu_admin_server_name' => array('LEVEL' => 'header', 'TYPE' => 'text', 'ITEM' => $config->game_name), 'menu_admin_server_time' => array('TYPE' => 'text', 'ITEM' => ''), 'menu_admin_version_check' => array('LEVEL' => 'header', 'TYPE' => 'lang', 'ITEM' => 'adm_opt_ver_check'), 'menu_admin_version_info' => array('TYPE' => 'text', 'ITEM' => ($config->server_updater_check_last ? date(FMT_DATE, $config->server_updater_check_last) : '') . '<div class="' . $sn_version_check_class[$config->server_updater_check_result] . '">' . $lang['adm_opt_ver_response_short'][$config->server_updater_check_result] . '</div>'), 'USER_AUTHLEVEL_NAME' => array('LEVEL' => 'header', 'ITEM' => $lang['user_level'][$user['authlevel']]), 'menu_admin_overview' => array('TYPE' => 'lang', 'ITEM' => 'adm_over', 'LINK' => 'admin/overview.php', 'AUTH_LEVEL' => 3), 'menu_admin_quests' => array('TYPE' => 'lang', 'ITEM' => 'qst_quests', 'LINK' => 'admin/adm_quest.php', 'AUTH_LEVEL' => 3), 'menu_admin_configuration' => array('TYPE' => 'lang', 'ITEM' => 'adm_conf', 'LINK' => 'admin/settings.php', 'AUTH_LEVEL' => 3), 'menu_admin_dark_matter' => array('TYPE' => 'lang', 'ITEM' => 'dark_matter', 'LINK' => 'admin/admin_darkmatter.php', 'AUTH_LEVEL' => 3), 'menu_admin_metamatter_header' => array('LEVEL' => 'header', 'TYPE' => 'lang', 'ITEM' => 'adm_metametter_payment', 'AUTH_LEVEL' => 3, 'DISABLED' => !$active_payment_modules), 'menu_admin_metamatter' => array('TYPE' => 'lang', 'ITEM' => 'sys_metamatter', 'LINK' => 'admin/adm_metamatter.php', 'AUTH_LEVEL' => 3, 'DISABLED' => !$active_payment_modules), 'menu_admin_metametter_payment' => array('TYPE' => 'lang', 'ITEM' => 'adm_pay', 'LINK' => 'admin/adm_payment.php', 'AUTH_LEVEL' => 3, 'DISABLED' => !$active_payment_modules), 'menu_admin_player' => array('LEVEL' => 'header', 'TYPE' => 'lang', 'ITEM' => 'player'), 'menu_admin_player_ban' => array('TYPE' => 'lang', 'ITEM' => 'adm_ban_unban', 'LINK' => 'admin/banned.php'), 'menu_admin_player_list' => array('TYPE' => 'lang', 'ITEM' => 'adm_plrlst', 'LINK' => 'admin/userlist.php', 'AUTH_LEVEL' => 3), 'menu_admin_universe' => array('LEVEL' => 'header', 'TYPE' => 'lang', 'ITEM' => 'sys_universe', 'AUTH_LEVEL' => 3), 'menu_admin_planet_list_active' => array('TYPE' => 'lang', 'ITEM' => 'adm_planet_active', 'LINK' => 'admin/adm_planet_list.php?planet_active=1', 'AUTH_LEVEL' => 3), 'menu_admin_planet_list_planets' => array('TYPE' => 'lang', 'ITEM' => 'adm_pltlst', 'LINK' => 'admin/adm_planet_list.php?planet_type=' . PT_PLANET, 'AUTH_LEVEL' => 3), 'menu_admin_planet_list_moons' => array('TYPE' => 'lang', 'ITEM' => 'adm_moonlst', 'LINK' => 'admin/adm_planet_list.php?planet_type=' . PT_MOON, 'AUTH_LEVEL' => 3), 'menu_admin_planet_moon_add' => array('TYPE' => 'lang', 'ITEM' => 'adm_addmoon', 'LINK' => 'admin/add_moon.php', 'AUTH_LEVEL' => 3), 'menu_admin_planet_compensate' => array('TYPE' => 'lang', 'ITEM' => 'adm_lm_compensate', 'LINK' => 'admin/planet_compensate.php', 'AUTH_LEVEL' => 3), 'menu_admin_fleets' => array('TYPE' => 'lang', 'ITEM' => 'adm_fleet', 'LINK' => 'admin/adm_flying_fleets.php', 'AUTH_LEVEL' => 3), 'menu_admin_utilites' => array('LEVEL' => 'header', 'TYPE' => 'lang', 'ITEM' => 'tool', 'CLASS' => 'link', 'LINK' => 'admin/tools.php', 'AUTH_LEVEL' => 3), 'menu_admin_statbuilder' => array('TYPE' => 'lang', 'ITEM' => 'adm_updpt', 'LINK' => 'admin/statbuilder.php', 'AUTH_LEVEL' => 3), 'menu_admin_languages' => array('TYPE' => 'lang', 'ITEM' => 'adm_lng_title', 'LINK' => 'admin/admin_locale.php', 'AUTH_LEVEL' => 3), 'menu_admin_maintenance' => array('TYPE' => 'lang', 'ITEM' => 'adm_maint', 'LINK' => 'admin/maintenance.php', 'AUTH_LEVEL' => 3), 'menu_admin_backup' => array('TYPE' => 'lang', 'ITEM' => 'adm_backup', 'LINK' => 'admin/sxd/index.php', 'AUTH_LEVEL' => 3), 'menu_admin_messages' => array('TYPE' => 'lang', 'ITEM' => 'adm_msg', 'LINK' => 'admin/adm_message_list.php', 'AUTH_LEVEL' => 3), 'menu_admin_chat' => array('TYPE' => 'lang', 'ITEM' => 'adm_chat', 'LINK' => 'admin/admin_chat.php', 'AUTH_LEVEL' => 3), 'menu_admin_logs' => array('TYPE' => 'lang', 'ITEM' => 'adm_log_main', 'LINK' => 'admin/adm_log_main.php', 'AUTH_LEVEL' => 3), 'menu_admin_exit' => array('LEVEL' => 'header', 'CLASS' => 'link', 'TYPE' => 'lang', 'ITEM' => 'adm_back', 'LINK' => 'index.php')) : array();
开发者ID:divyinfo,项目名称:SuperNova,代码行数:11,代码来源:vars_menu.php

示例5: substr

<?php

include 'common.' . substr(strrchr(__FILE__, '.'), 1);
if ($config->game_mode == GAME_BLITZ) {
    message($lang['sys_blitz_page_disabled'], $lang['sys_error'], 'overview.php', 10);
    die;
}
define('SN_IN_ALLY', true);
// Main admin page save themes
lng_include('alliance');
$mode = sys_get_param_str('mode');
if ($mode == 'ainfo') {
    include 'includes/alliance/ali_info.inc';
}
if (!$user['ally_id']) {
    $user_request = doquery("SELECT * FROM {{alliance_requests}} WHERE `id_user` ='{$user['id']}' LIMIT 1;", '', true);
    if ($user_request['id_user']) {
        require 'includes/alliance/ali_external_request.inc';
    } else {
        switch ($mode) {
            case 'search':
                require 'includes/alliance/ali_external_search.inc';
                break;
            case 'apply':
                require 'includes/alliance/ali_external_request.inc';
                break;
            case 'make':
                require 'includes/alliance/ali_external_create_ally.inc';
                break;
            default:
                display(parsetemplate(gettemplate('ali_external', true)), $lang['alliance']);
开发者ID:divyinfo,项目名称:SuperNova,代码行数:31,代码来源:alliance.php

示例6: substr

<?php

/**
* phalanx.php
*
* 2.0 copyright (c) 2009-2011 by Gorlum for http://supernova.ws
    [!] Full rewrote using SN functions
* 1.2 - Security checks & tests by Gorlum for http://supernova.ws
* @version 1.1
* @original made by ????
* @copyright 2008 by Pada for XNova.project.es
*/
include 'common.' . substr(strrchr(__FILE__, '.'), 1);
lng_include('overview');
lng_include('universe');
$sensorLevel = mrc_get_level($user, $planetrow, STRUC_MOON_PHALANX);
if (!intval($sensorLevel)) {
    message($lang['phalanx_nosensoravailable'], $lang['tech'][STRUC_MOON_PHALANX], '', 3);
}
if ($planetrow['planet_type'] != PT_MOON) {
    message($lang['phalanx_onlyformoons'], $lang['tech'][STRUC_MOON_PHALANX], '', 3);
}
$scan_galaxy = sys_get_param_int('galaxy');
$scan_system = sys_get_param_int('system');
$scan_planet = sys_get_param_int('planet');
$scan_planet_type = 1;
// sys_get_param_int('planettype');
$id = sys_get_param_id('id');
$source_galaxy = $planetrow['galaxy'];
$source_system = $planetrow['system'];
$source_planet = $planetrow['planet'];
开发者ID:divyinfo,项目名称:SuperNova,代码行数:31,代码来源:phalanx.php

示例7: tpl_render_menu

function tpl_render_menu()
{
    global $user, $user_impersonator, $lang, $template_result;
    // $config,
    //$template_name = IN_ADMIN === true ? 'admin/menu' : 'menu';
    //$template = gettemplate($template_name, true);
    $template = gettemplate('menu', true);
    $template->assign_recursive($template_result);
    player_load_option($user, array(PLAYER_OPTION_MENU_HIDE_SHOW_BUTTON, PLAYER_OPTION_MENU_SHOW_ON_BUTTON, PLAYER_OPTION_MENU_HIDE_ON_BUTTON, PLAYER_OPTION_MENU_HIDE_ON_LEAVE, PLAYER_OPTION_MENU_UNPIN_ABSOLUTE, PLAYER_OPTION_MENU_ITEMS_AS_BUTTONS));
    $template->assign_vars(array('USER_AUTHLEVEL' => $user['authlevel'], 'USER_AUTHLEVEL_NAME' => $lang['user_level'][$user['authlevel']], 'USER_IMPERSONATOR' => is_array($user_impersonator), 'PAYMENT' => sn_module_get_active_count('payment'), 'MENU_START_HIDE' => !empty($_COOKIE[SN_COOKIE . '_menu_hidden']), 'PLAYER_OPTION_MENU_HIDE_SHOW_BUTTON' => isset($template_result['MENU_CUSTOMIZE']) ? $user['player_options'][PLAYER_OPTION_MENU_HIDE_SHOW_BUTTON] : 0, 'PLAYER_OPTION_MENU_SHOW_ON_BUTTON' => $template_result['MENU_CUSTOMIZE'] ? $user['player_options'][PLAYER_OPTION_MENU_SHOW_ON_BUTTON] : 0, 'PLAYER_OPTION_MENU_HIDE_ON_BUTTON' => $template_result['MENU_CUSTOMIZE'] ? $user['player_options'][PLAYER_OPTION_MENU_HIDE_ON_BUTTON] : 0, 'PLAYER_OPTION_MENU_HIDE_ON_LEAVE' => $template_result['MENU_CUSTOMIZE'] ? $user['player_options'][PLAYER_OPTION_MENU_HIDE_ON_LEAVE] : 0, 'PLAYER_OPTION_MENU_UNPIN_ABSOLUTE' => $template_result['MENU_CUSTOMIZE'] ? $user['player_options'][PLAYER_OPTION_MENU_UNPIN_ABSOLUTE] : 0, 'PLAYER_OPTION_MENU_ITEMS_AS_BUTTONS' => $template_result['MENU_CUSTOMIZE'] ? $user['player_options'][PLAYER_OPTION_MENU_ITEMS_AS_BUTTONS] : 0));
    if (IN_ADMIN === true && $user['authlevel'] > 0) {
        //global $sn_version_check_class;
        //$template->assign_vars(array(
        //  'CHECK_DATE' => $config->server_updater_check_last ? date(FMT_DATE, $config->server_updater_check_last) : 0,
        //  'CHECK_RESULT' => $lang['adm_opt_ver_response_short'][$config->server_updater_check_result],
        //  'CHECK_CLASS' => $sn_version_check_class[$config->server_updater_check_result],
        //));
        //$template = gettemplate('menu', $template);
        global $sn_menu_admin_extra, $sn_menu_admin;
        lng_include('admin');
        tpl_menu_merge_extra($sn_menu_admin, $sn_menu_admin_extra);
        tpl_menu_assign_to_template($sn_menu_admin, $template);
    } else {
        global $sn_menu, $sn_menu_extra;
        tpl_menu_merge_extra($sn_menu, $sn_menu_extra);
        tpl_menu_assign_to_template($sn_menu, $template);
    }
    return $template;
}
开发者ID:hayalolsam,项目名称:SuperNova,代码行数:29,代码来源:template.php

示例8: substr

<?php

/**
 * lostpassword.php
 *
 * @version 2.0 copyright (c) 2009-2011 by Gorlum for http://supernova.ws
 *   [!] Fully rewrote
 *   [+] Confrimation code system
 *   [+] Random password generation
 * @version 1.1 copyright (c) 2009-2011 by Gorlum for http://supernova.ws
 *   [~] Security checks & tests
 * @version 1.0 copyright 2008 by Tom1991 for XNova
 *   [!] Création (Tom)
**/
include 'includes/init.' . substr(strrchr(__FILE__, '.'), 1);
lng_include('login');
$id_ref = sys_get_param_int('id_ref');
$email = sys_get_param_str('email');
$confirm = sys_get_param_str('confirm');
$confirm_password_reset = CONFIRM_PASSWORD_RESET;
if ($confirm) {
    $last_confirm = doquery("SELECT *, UNIX_TIMESTAMP(`create_time`) as `unix_time` FROM {{confirmations}} WHERE `code` = '{$confirm}' LIMIT 1;", '', true);
    if ($last_confirm['id'] && $time_now - $last_confirm['unix_time'] <= 3 * 24 * 60 * 60) {
        doquery("DELETE FROM {{confirmations}} WHERE `id` = '{$last_confirm['id']}' LIMIT 1;");
        $user_data = doquery("SELECT * FROM {{users}} WHERE `id` = '{$last_confirm['id_user']}' LIMIT 1;", '', true);
        if (!$user_data['id']) {
            message($lang['log_lost_err_code'], $lang['sys_error']);
        }
        if ($user_data['authlevel']) {
            message($lang['log_lost_err_admin'], $lang['sys_error']);
        }
开发者ID:sonicmaster,项目名称:RPG,代码行数:31,代码来源:lostpassword.php

示例9: substr

<?php

/**
* annonce.php
*
* Announces for trading between players
*
* @version 1.0s - Security checked for SQL-injection by Gorlum for http://supernova.ws
* @version 1.0
* @copyright 2008 by ??????? for XNova
*/
include 'common.' . substr(strrchr(__FILE__, '.'), 1);
$users = db_user_by_id($user['id'], false, '`username`,`galaxy`,`system`');
$action = sys_get_param_int('action');
$GET_id = sys_get_param_int('id');
lng_include('announce');
switch ($action) {
    case 1:
        //on veut poster une annonce
        $page .= '<HTML>
    <center>
    <br>
    <table width="600">
    <td class="c" colspan="10" align="center"><b><font color="white">' . $lang['Classifieds'] . '</font></b></td></tr>
    <form action="annonce.php?action=2" method="post">
    <td class="c" colspan="10" align="center"><b>' . $lang['Resources_to_be_sold'] . '</font></b></td>
    <tr><th colspan="5">' . $lang['metal'] . '</th><th colspan="5"><input type="texte" value="0" name="metalvendre" /></th></tr>
    <tr><th colspan="5">' . $lang['crystal'] . '</th><th colspan="5"><input type="texte" value="0" name="cristalvendre" /></th></tr>
    <tr><th colspan="5">' . $lang['deuterium'] . '</th><th colspan="5"><input type="texte" value="0" name="deutvendre" /></th></tr>

    <td class="c" colspan="10" align="center"><b>' . $lang['Desired_resources'] . '</font></b></td></tr>
开发者ID:divyinfo,项目名称:SuperNova,代码行数:31,代码来源:annonce.php

示例10: mrc_mercenary_render

function mrc_mercenary_render($user)
{
    global $config, $lang, $sn_powerup_buy_discounts;
    $mode = sys_get_param_int('mode', UNIT_MERCENARIES);
    $mode = in_array($mode, array(UNIT_MERCENARIES, UNIT_PLANS)) ? $mode : UNIT_MERCENARIES;
    $is_permanent = $mode == UNIT_PLANS || !$config->empire_mercenary_temporary;
    if ($mercenary_id = sys_get_param_int('mercenary_id')) {
        $operation_result = mrc_mercenary_hire($mode, $user, $mercenary_id);
    }
    lng_include('infos');
    $template = gettemplate('mrc_mercenary_hire', true);
    if (!empty($operation_result)) {
        $template->assign_block_vars('result', $operation_result);
    }
    foreach ($sn_powerup_buy_discounts as $hire_period => $hire_discount) {
        $template->assign_block_vars('period', array('LENGTH' => $hire_period, 'TEXT' => $lang['mrc_period_list'][$hire_period], 'DISCOUNT' => $hire_period / $config->empire_mercenary_base_period * $hire_discount, 'SELECTED' => $hire_period == $config->empire_mercenary_base_period));
    }
    $user_dark_matter = mrc_get_level($user, '', RES_DARK_MATTER);
    $cost_alliance_multiplyer = SN_IN_ALLY === true && $mode == UNIT_PLANS ? $config->ali_bonus_members : 1;
    $cost_alliance_multiplyer = $cost_alliance_multiplyer >= 1 ? $cost_alliance_multiplyer : 1;
    foreach (sn_get_groups($mode == UNIT_PLANS ? 'plans' : 'mercenaries') as $mercenary_id) {
        $mercenary = get_unit_param($mercenary_id);
        $mercenary_bonus = $mercenary['bonus'];
        $mercenary_bonus = $mercenary_bonus >= 0 ? "+{$mercenary_bonus}" : "{$mercenary_bonus}";
        switch ($mercenary['bonus_type']) {
            case BONUS_PERCENT:
                $mercenary_bonus = "{$mercenary_bonus}% ";
                break;
            case BONUS_ABILITY:
                $mercenary_bonus = '';
                break;
            case BONUS_ADD:
            default:
                break;
        }
        $mercenary_level = mrc_get_level($user, null, $mercenary_id, false, true);
        $mercenary_level_bonus = max(0, mrc_get_level($user, null, $mercenary_id) - $mercenary_level);
        $total_cost_old = 0;
        if ($is_permanent) {
            $total_cost_old = eco_get_total_cost($mercenary_id, $mercenary_level);
            $total_cost_old = $total_cost_old[BUILD_CREATE][RES_DARK_MATTER] * $cost_alliance_multiplyer;
        }
        $total_cost = eco_get_total_cost($mercenary_id, $mercenary_level + 1);
        $total_cost[BUILD_CREATE][RES_DARK_MATTER] *= $cost_alliance_multiplyer;
        $mercenary_unit = classSupernova::db_get_unit_by_location($user['id'], LOC_USER, $user['id'], $mercenary_id);
        $mercenary_time_finish = strtotime($mercenary_unit['unit_time_finish']);
        $template->assign_block_vars('officer', array('ID' => $mercenary_id, 'NAME' => $lang['tech'][$mercenary_id], 'DESCRIPTION' => $lang['info'][$mercenary_id]['description'], 'EFFECT' => $lang['info'][$mercenary_id]['effect'], 'COST' => $total_cost[BUILD_CREATE][RES_DARK_MATTER] - $total_cost_old, 'COST_TEXT' => pretty_number($total_cost[BUILD_CREATE][RES_DARK_MATTER] - $total_cost_old, 0, $user_dark_matter), 'LEVEL' => $mercenary_level, 'LEVEL_BONUS' => $mercenary_level_bonus, 'LEVEL_MAX' => $mercenary['max'], 'BONUS' => $mercenary_bonus, 'BONUS_TYPE' => $mercenary['bonus_type'], 'HIRE_END' => $mercenary_time_finish && $mercenary_time_finish >= SN_TIME_NOW ? date(FMT_DATE_TIME, $mercenary_time_finish) : '', 'CAN_BUY' => mrc_officer_accessible($user, $mercenary_id)));
        $upgrade_cost = 1;
        for ($i = $config->empire_mercenary_temporary ? 1 : $mercenary_level + 1; $mercenary['max'] ? $i <= $mercenary['max'] : $upgrade_cost <= $user_dark_matter; $i++) {
            $total_cost = eco_get_total_cost($mercenary_id, $i);
            $total_cost[BUILD_CREATE][RES_DARK_MATTER] *= $cost_alliance_multiplyer;
            $upgrade_cost = $total_cost[BUILD_CREATE][RES_DARK_MATTER] - $total_cost_old;
            $template->assign_block_vars('officer.level', array('VALUE' => $i, 'PRICE' => $upgrade_cost));
        }
    }
    $template->assign_vars(array('PAGE_HEADER' => $lang['tech'][$mode], 'MODE' => $mode, 'IS_PERMANENT' => intval($is_permanent), 'EMPIRE_MERCENARY_TEMPORARY' => $config->empire_mercenary_temporary, 'DARK_MATTER' => $user_dark_matter));
    display(parsetemplate($template), $lang['tech'][$mode]);
}
开发者ID:hayalolsam,项目名称:SuperNova,代码行数:58,代码来源:mrc_mercenary.php

示例11: substr

/**
 * search.php
 *
 * 1.3 copyright (c) 2009-2010 by Gorlum for http://supernova.ws
 *   [%] Fixed search of players without alliance
 * 1.2 - Security checks & tests by Gorlum for http://supernova.ws
 * @version 1.1
 * @copyright 2009 by angelus_ira for Project. XNova
 * @copyright 2008 by ??????? for XNova
 */
include 'common.' . substr(strrchr(__FILE__, '.'), 1);
$searchtext = mysql_real_escape_string($_POST['searchtext']);
$type = sys_get_param_str('type');
$dpath = !$user["dpath"] ? DEFAULT_SKINPATH : $user["dpath"];
lng_include('search');
$i = 0;
//creamos la query
switch ($type) {
    case "playername":
        $table = gettemplate('search_user_table');
        $row = gettemplate('search_user_row');
        $sql = "SELECT\r\n        u.id as uid, u.username, u.ally_id, u.id_planet,\r\n        p.*, p.name as planet_name,\r\n        s.total_points, s.total_rank,\r\n        a.ally_tag, a.ally_name\r\n      FROM {{table}}planets as p,\r\n        {{table}}statpoints as s,\r\n        {{table}}users as u LEFT JOIN {{table}}alliance as a ON a.id = u.ally_id\r\n      WHERE\r\n        username LIKE '%{$searchtext}%'\r\n        AND p.id_owner = u.id AND p.id=u.id_planet\r\n        AND s.id_owner = u.id AND stat_type = 1 AND stat_code = 1 LIMIT 30;";
        $search = doquery($sql, '');
        break;
    case "planetname":
        $table = gettemplate('search_user_table');
        $row = gettemplate('search_user_row');
        $sql = "SELECT\r\n        p.*, p.name as planet_name,\r\n        u.id as uid, u.username, u.ally_id, u.id_planet,\r\n        s.total_points, s.total_rank,\r\n        a.ally_tag, a.ally_name\r\n      FROM {{table}}planets as p,\r\n        {{table}}users as u,\r\n        {{table}}alliance as a,\r\n        {{table}}statpoints as s\r\n      WHERE\r\n        name LIKE '%{$searchtext}%'\r\n        AND u.id=p.id_owner\r\n        AND a.id = u.ally_id\r\n        AND s.id_owner = p.id_owner AND stat_type = 1 AND stat_code = 1 LIMIT 30;";
        $search = doquery($sql, '');
        break;
开发者ID:sonicmaster,项目名称:RPG,代码行数:30,代码来源:search.php

示例12: substr

/**
* artifacts.php
* Artifact actions
*
* @package roleplay
* @version 1.0
*
* Revision History
* ================
* 1.0 copyright (c) 2011 by Gorlum for http://supernova.ws
*
*/
include 'common.' . substr(strrchr(__FILE__, '.'), 1);
lng_include('infos');
lng_include('artifacts');
include 'includes/includes/art_artifact.php';
$sn_group_artifacts = sn_get_groups('artifacts');
if (($action = sys_get_param_int('action')) && in_array($unit_id = sys_get_param_int('unit_id'), $sn_group_artifacts)) {
    switch ($action) {
        case ACTION_BUY:
            sn_db_transaction_start();
            $user = db_user_by_id($user['id'], true);
            $artifact_level = mrc_get_level($user, array(), $unit_id, true);
            $build_data = eco_get_build_data($user, $planetrow, $unit_id, $artifact_level, true);
            $darkmater_cost = $build_data[BUILD_CREATE][RES_DARK_MATTER];
            // TODO: more correct check - with "FOR UPDATE"
            if (mrc_get_level($user, null, RES_DARK_MATTER) >= $darkmater_cost) {
                $unit_max_stack = get_unit_param($unit_id, P_MAX_STACK);
                if (!isset($unit_max_stack) || $unit_max_stack > mrc_get_level($user, $planetrow, $unit_id)) {
                    $db_changeset['unit'][] = sn_db_unit_changeset_prepare($unit_id, 1, $user);
开发者ID:divyinfo,项目名称:SuperNova,代码行数:30,代码来源:artifacts.php

示例13: tpl_render_menu

/**
 * @return template
 */
function tpl_render_menu()
{
    global $user, $lang, $template_result, $sn_menu_admin_extra, $sn_menu_admin, $sn_menu, $sn_menu_extra;
    lng_include('admin');
    $template = gettemplate('menu', true);
    $template->assign_recursive($template_result);
    $template->assign_vars(array('USER_AUTHLEVEL' => $user['authlevel'], 'USER_AUTHLEVEL_NAME' => $lang['user_level'][$user['authlevel']], 'PAYMENT' => sn_module_get_active_count('payment'), 'MENU_START_HIDE' => !empty($_COOKIE[SN_COOKIE . '_menu_hidden']) || defined('SN_GOOGLE')));
    if (isset($template_result['MENU_CUSTOMIZE'])) {
        $template->assign_vars(array('PLAYER_OPTION_MENU_SHOW_ON_BUTTON' => classSupernova::$user_options[PLAYER_OPTION_MENU_SHOW_ON_BUTTON], 'PLAYER_OPTION_MENU_HIDE_ON_BUTTON' => classSupernova::$user_options[PLAYER_OPTION_MENU_HIDE_ON_BUTTON], 'PLAYER_OPTION_MENU_HIDE_ON_LEAVE' => classSupernova::$user_options[PLAYER_OPTION_MENU_HIDE_ON_LEAVE], 'PLAYER_OPTION_MENU_UNPIN_ABSOLUTE' => classSupernova::$user_options[PLAYER_OPTION_MENU_UNPIN_ABSOLUTE], 'PLAYER_OPTION_MENU_ITEMS_AS_BUTTONS' => classSupernova::$user_options[PLAYER_OPTION_MENU_ITEMS_AS_BUTTONS], 'PLAYER_OPTION_MENU_WHITE_TEXT' => classSupernova::$user_options[PLAYER_OPTION_MENU_WHITE_TEXT], 'PLAYER_OPTION_MENU_OLD' => classSupernova::$user_options[PLAYER_OPTION_MENU_OLD], 'PLAYER_OPTION_MENU_HIDE_SHOW_BUTTON' => empty($_COOKIE[SN_COOKIE . '_menu_hidden']) && !defined('SN_GOOGLE') ? classSupernova::$user_options[PLAYER_OPTION_MENU_HIDE_SHOW_BUTTON] : 1));
    }
    if (defined('IN_ADMIN') && IN_ADMIN === true && !empty($user['authlevel']) && $user['authlevel'] > 0) {
        tpl_menu_merge_extra($sn_menu_admin, $sn_menu_admin_extra);
        tpl_menu_assign_to_template($sn_menu_admin, $template);
    } else {
        tpl_menu_merge_extra($sn_menu, $sn_menu_extra);
        tpl_menu_assign_to_template($sn_menu, $template);
    }
    return $template;
}
开发者ID:divyinfo,项目名称:SuperNova,代码行数:22,代码来源:template.php

示例14: unset

    }
}
unset($db_name);
// Initializing constants
define('TEMPLATE_NAME', $config->game_default_template ? $config->game_default_template : 'OpenGame');
define('TEMPLATE_DIR', SN_ROOT_PHYSICAL . 'design/templates/' . TEMPLATE_NAME);
define('DEFAULT_SKINPATH', $config->game_default_skin ? $config->game_default_skin : 'skins/EpicBlue/');
define('DEFAULT_LANG', $config->game_default_language ? $config->game_default_language : 'ru');
define('FMT_DATE', $config->int_format_date ? $config->int_format_date : 'd.m.Y');
define('FMT_TIME', $config->int_format_time ? $config->int_format_time : 'H:i:s');
define('FMT_DATE_TIME', FMT_DATE . ' ' . FMT_TIME);
$HTTP_ACCEPT_LANGUAGE = DEFAULT_LANG;
// Now including all functions
require_once "{$sn_root_physical}includes/functions.{$phpEx}";
require_once "{$sn_root_physical}includes/vars.{$phpEx}";
require_once "{$sn_root_physical}includes/template.{$phpEx}";
require_once "{$sn_root_physical}language/" . DEFAULT_LANG . '/language.mo';
$lang['LANG_INFO'] = $lang_info;
unset($lang_info);
$dir = opendir("{$sn_root_physical}includes/functions");
while (($file = readdir($dir)) !== false) {
    $extension = '.' . substr($file, -3);
    if ($extension == ".{$phpEx}") {
        require_once "{$sn_root_physical}includes/functions/{$file}";
    }
}
sn_db_connect();
$language = sys_get_param_str('lang');
lng_include('system');
lng_include('tech');
开发者ID:sonicmaster,项目名称:RPG,代码行数:30,代码来源:init.php

示例15: substr

<?php

/**
 * jumpgate.php
 *
 * Jump Gate interface, I presume
 *
 * @version 1.0st Security checks & tests by Gorlum for http://supernova.ws
 * @version 1
 * @copyright 2008 By Chlorel for XNova
 */
include 'common.' . substr(strrchr(__FILE__, '.'), 1);
lng_include('infos');
if ($_POST) {
    $RestString = GetNextJumpWaitTime($planetrow);
    $NextJumpTime = $RestString['value'];
    $JumpTime = time();
    // Dit monsieur, j'ai le droit de sauter ???
    if ($NextJumpTime == 0) {
        // Dit monsieur, ou je veux aller ca existe ???
        $TargetPlanet = intval($_POST['jmpto']);
        $TargetGate = doquery("SELECT `id`, `sprungtor`, `last_jump_time` FROM {{planets}} WHERE `id` = '" . $TargetPlanet . "';", '', true);
        // Dit monsieur, ou je veux aller y a une porte de saut ???
        if ($TargetGate['sprungtor'] > 0) {
            $RestString = GetNextJumpWaitTime($TargetGate);
            $NextDestTime = $RestString['value'];
            // Dit monsieur, chez toi aussi peut y avoir un saut ???
            if ($NextDestTime == 0) {
                // Bon j'ai eu toutes les autorisations, donc je compte les radis !!!
                $ShipArray = array();
                $SubQueryOri = "";
开发者ID:sonicmaster,项目名称:RPG,代码行数:31,代码来源:jumpgate.php


注:本文中的lng_include函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。