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


PHP Functions_Lib::get_languages方法代码示例

本文整理汇总了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));
 }
开发者ID:Gritch69,项目名称:XG-Project,代码行数:59,代码来源:server.php

示例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);
 }
开发者ID:rampmaster,项目名称:XG-Proyect-v3.x.x,代码行数:31,代码来源:Template_Lib.php


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