本文整理汇总了PHP中Functions_Lib::get_languages方法的典型用法代码示例。如果您正苦于以下问题:PHP Functions_Lib::get_languages方法的具体用法?PHP Functions_Lib::get_languages怎么用?PHP Functions_Lib::get_languages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Functions_Lib
的用法示例。
在下文中一共展示了Functions_Lib::get_languages方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: build_page
/**
* method build_page
* param
* return main method, loads everything
*/
private function build_page()
{
$parse = $this->_lang;
$parse['alert'] = '';
if (isset($_POST['opt_save']) && $_POST['opt_save'] == '1') {
// CHECK BEFORE SAVE
$this->run_validations();
Functions_Lib::update_config('game_name', $this->_game_config['game_name']);
Functions_Lib::update_config('game_logo', $this->_game_config['game_logo']);
Functions_Lib::update_config('lang', $this->_game_config['lang']);
Functions_Lib::update_config('game_speed', $this->_game_config['game_speed']);
Functions_Lib::update_config('fleet_speed', $this->_game_config['fleet_speed']);
Functions_Lib::update_config('resource_multiplier', $this->_game_config['resource_multiplier']);
Functions_Lib::update_config('admin_email', $this->_game_config['admin_email']);
Functions_Lib::update_config('forum_url', $this->_game_config['forum_url']);
Functions_Lib::update_config('reg_enable', $this->_game_config['reg_enable']);
Functions_Lib::update_config('game_enable', $this->_game_config['game_enable']);
Functions_Lib::update_config('close_reason', $this->_game_config['close_reason']);
Functions_Lib::update_config('ssl_enabled', $this->_game_config['ssl_enabled']);
Functions_Lib::update_config('date_time_zone', $this->_game_config['date_time_zone']);
Functions_Lib::update_config('date_format', $this->_game_config['date_format']);
Functions_Lib::update_config('date_format_extended', $this->_game_config['date_format_extended']);
Functions_Lib::update_config('adm_attack', $this->_game_config['adm_attack']);
Functions_Lib::update_config('debug', $this->_game_config['debug']);
Functions_Lib::update_config('fleet_cdr', $this->_game_config['fleet_cdr']);
Functions_Lib::update_config('defs_cdr', $this->_game_config['defs_cdr']);
Functions_Lib::update_config('noobprotection', $this->_game_config['noobprotection']);
Functions_Lib::update_config('noobprotectiontime', $this->_game_config['noobprotectiontime']);
Functions_Lib::update_config('noobprotectionmulti', $this->_game_config['noobprotectionmulti']);
$parse['alert'] = Administration_Lib::save_message('ok', $this->_lang['se_all_ok_message']);
}
$parse['game_name'] = $this->_game_config['game_name'];
$parse['game_logo'] = $this->_game_config['game_logo'];
$parse['language_settings'] = Functions_Lib::get_languages($this->_game_config['lang']);
$parse['game_speed'] = $this->_game_config['game_speed'] / 2500;
$parse['fleet_speed'] = $this->_game_config['fleet_speed'] / 2500;
$parse['resource_multiplier'] = $this->_game_config['resource_multiplier'];
$parse['admin_email'] = $this->_game_config['admin_email'];
$parse['forum_url'] = $this->_game_config['forum_url'];
$parse['closed'] = $this->_game_config['game_enable'] == 1 ? " checked = 'checked' " : "";
$parse['close_reason'] = stripslashes($this->_game_config['close_reason']);
$parse['ssl_enabled'] = $this->_game_config['ssl_enabled'] == 1 ? " checked = 'checked' " : "";
$parse['date_time_zone'] = $this->time_zone_picker();
$parse['date_format'] = $this->_game_config['date_format'];
$parse['date_format_extended'] = $this->_game_config['date_format_extended'];
$parse['adm_attack'] = $this->_game_config['adm_attack'] == 1 ? " checked = 'checked' " : "";
$parse['debug'] = $this->_game_config['debug'] == 1 ? " checked = 'checked' " : "";
$parse['shiips'] = $this->_game_config['fleet_cdr'];
$parse['defenses'] = $this->_game_config['defs_cdr'];
$parse['noobprot'] = $this->_game_config['noobprotection'] == 1 ? " checked = 'checked' " : "";
$parse['noobprot2'] = $this->_game_config['noobprotectiontime'];
$parse['noobprot3'] = $this->_game_config['noobprotectionmulti'];
parent::$page->display(parent::$page->parse_template(parent::$page->get_template('adm/server_view'), $parse));
}
示例2: install_navbar
/**
* method install_navbar
* param
* return install navigation bar
*/
private function install_navbar()
{
// Update config language to the new setted value
if (isset($_POST['language'])) {
Functions_Lib::update_config('lang', $_POST['language']);
Functions_Lib::redirect(XGP_ROOT . 'install/');
}
$current_page = isset($_GET['page']) ? $_GET['page'] : NULL;
$items = '';
$pages = array(0 => array('install', $this->_lang['ins_overview'], 'overview'), 1 => array('install', $this->_lang['ins_license'], 'license'), 2 => array('install', $this->_lang['ins_install'], 'step1'), 3 => array('update', $this->_lang['ins_update'], ''), 4 => array('migrate', $this->_lang['ins_migrate'], ''));
// BUILD THE MENU
foreach ($pages as $key => $data) {
if ($data[2] != '') {
// URL
$items .= '<li' . ($current_page == $data[0] ? ' class="active"' : '') . '><a href="index.php?page=' . $data[0] . '&mode=' . $data[2] . '">' . $data[1] . '</a></li>';
} else {
// URL
$items .= '<li' . ($current_page == $data[0] ? ' class="active"' : '') . '><a href="index.php?page=' . $data[0] . '">' . $data[1] . '</a></li>';
}
}
// PARSE THE MENU AND OTHER DATA
$parse = $this->_lang;
$parse['menu_items'] = $items;
$parse['language_select'] = Functions_Lib::get_languages(Functions_Lib::read_config('lang'));
return $this->parse_template($this->get_template('install/topnav_view'), $parse);
}