Esempio n. 1
0
 /**
  * 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();
         FunctionsLib::update_config('game_name', $this->_game_config['game_name']);
         FunctionsLib::update_config('game_logo', $this->_game_config['game_logo']);
         FunctionsLib::update_config('lang', $this->_game_config['lang']);
         FunctionsLib::update_config('game_speed', $this->_game_config['game_speed']);
         FunctionsLib::update_config('fleet_speed', $this->_game_config['fleet_speed']);
         FunctionsLib::update_config('resource_multiplier', $this->_game_config['resource_multiplier']);
         FunctionsLib::update_config('admin_email', $this->_game_config['admin_email']);
         FunctionsLib::update_config('forum_url', $this->_game_config['forum_url']);
         FunctionsLib::update_config('reg_enable', $this->_game_config['reg_enable']);
         FunctionsLib::update_config('game_enable', $this->_game_config['game_enable']);
         FunctionsLib::update_config('close_reason', $this->_game_config['close_reason']);
         FunctionsLib::update_config('ssl_enabled', $this->_game_config['ssl_enabled']);
         FunctionsLib::update_config('date_time_zone', $this->_game_config['date_time_zone']);
         FunctionsLib::update_config('date_format', $this->_game_config['date_format']);
         FunctionsLib::update_config('date_format_extended', $this->_game_config['date_format_extended']);
         FunctionsLib::update_config('adm_attack', $this->_game_config['adm_attack']);
         FunctionsLib::update_config('debug', $this->_game_config['debug']);
         FunctionsLib::update_config('fleet_cdr', $this->_game_config['fleet_cdr']);
         FunctionsLib::update_config('defs_cdr', $this->_game_config['defs_cdr']);
         FunctionsLib::update_config('noobprotection', $this->_game_config['noobprotection']);
         FunctionsLib::update_config('noobprotectiontime', $this->_game_config['noobprotectiontime']);
         FunctionsLib::update_config('noobprotectionmulti', $this->_game_config['noobprotectionmulti']);
         $parse['alert'] = AdministrationLib::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'] = FunctionsLib::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));
 }