| @@ -17,12 +17,12 @@ discard block | ||
| 17 | 17 | |
| 18 | 18 | global $lang; | 
| 19 | 19 | |
| 20 | - $TargetAdress = sprintf ($lang['sys_adress_planet'], $fleet_row['fleet_end_galaxy'], $fleet_row['fleet_end_system'], $fleet_row['fleet_end_planet']); | |
| 20 | + $TargetAdress = sprintf($lang['sys_adress_planet'], $fleet_row['fleet_end_galaxy'], $fleet_row['fleet_end_system'], $fleet_row['fleet_end_planet']); | |
| 21 | 21 | |
| 22 | 22 | $fleet_array = sys_unit_str2arr($fleet_row['fleet_array']); | 
| 23 | 23 | |
| 24 | 24 | $TheMessage = $lang['sys_colo_no_colonizer']; | 
| 25 | - if($fleet_array[SHIP_COLONIZER] >= 1) | |
| 25 | + if ($fleet_array[SHIP_COLONIZER] >= 1) | |
| 26 | 26 |    { | 
| 27 | 27 | $TheMessage = $lang['sys_colo_notfree']; | 
| 28 | 28 | if (!$mission_data['dst_planet'] || empty($mission_data['dst_planet'])) | 
| @@ -31,7 +31,7 @@ discard block | ||
| 31 | 31 | |
| 32 | 32 | // Can we colonize more planets? | 
| 33 | 33 | $TheMessage = $lang['sys_colo_maxcolo']; | 
| 34 | - if($iPlanetCount < get_player_max_colonies($src_user_row)) | |
| 34 | + if ($iPlanetCount < get_player_max_colonies($src_user_row)) | |
| 35 | 35 |        { | 
| 36 | 36 | // Yes, we can colonize | 
| 37 | 37 | $TheMessage = $lang['sys_colo_badpos']; | 
| @@ -42,7 +42,7 @@ discard block | ||
| 42 | 42 | if ($NewOwnerPlanet) | 
| 43 | 43 |          { | 
| 44 | 44 | $TheMessage = $lang['sys_colo_arrival'] . $TargetAdress . $lang['sys_colo_allisok']; | 
| 45 | - msg_send_simple_message ( $fleet_row['fleet_owner'], '', $fleet_row['fleet_start_time'], MSG_TYPE_SPY, $lang['sys_colo_mess_from'], $lang['sys_colo_mess_report'], $TheMessage); | |
| 45 | + msg_send_simple_message($fleet_row['fleet_owner'], '', $fleet_row['fleet_start_time'], MSG_TYPE_SPY, $lang['sys_colo_mess_from'], $lang['sys_colo_mess_report'], $TheMessage); | |
| 46 | 46 | |
| 47 | 47 | $fleet_array[SHIP_COLONIZER]--; | 
| 48 | 48 | $fleet_row['fleet_amount']--; | 
| @@ -15,7 +15,7 @@ | ||
| 15 | 15 | |
| 16 | 16 |    $combat_data = sn_ube_report_load(sys_get_param_str('cypher')); | 
| 17 | 17 | |
| 18 | -  if($combat_data != UBE_REPORT_NOT_FOUND) { | |
| 18 | +  if ($combat_data != UBE_REPORT_NOT_FOUND) { | |
| 19 | 19 | sn_ube_report_generate($combat_data, $template_result); | 
| 20 | 20 |      $template = gettemplate('ube_combat_report', $template); | 
| 21 | 21 | $template->assign_vars(array( | 
| @@ -14,14 +14,14 @@ | ||
| 14 | 14 | global $lang, $user, $planetrow; | 
| 15 | 15 | |
| 16 | 16 | $tech_tree = array(); | 
| 17 | -  foreach(get_unit_param('techtree') as $unit_group_id => $unit_list) | |
| 17 | +  foreach (get_unit_param('techtree') as $unit_group_id => $unit_list) | |
| 18 | 18 |    { | 
| 19 | 19 | $tech_tree[] = array( | 
| 20 | 20 | 'NAME' => $lang['tech'][$unit_group_id], | 
| 21 | 21 | 'GROUP_ID' => $unit_group_id, | 
| 22 | 22 | ); | 
| 23 | 23 | |
| 24 | - foreach($unit_list as $unit_id) | |
| 24 | + foreach ($unit_list as $unit_id) | |
| 25 | 25 |      { | 
| 26 | 26 | $sn_data_unit = get_unit_param($unit_id); | 
| 27 | 27 | $level_basic = $sn_data_unit[P_STACKABLE] ? 0 : mrc_get_level($user, $planetrow, $unit_id, false, true); | 
| @@ -1,11 +1,11 @@ | ||
| 1 | 1 | <?php | 
| 2 | 2 | |
| 3 | -function geoip_status(){return sn_function_call('geoip_status', array(&$result));} | |
| 3 | +function geoip_status() {return sn_function_call('geoip_status', array(&$result)); } | |
| 4 | 4 |  function sn_geoip_status(&$result) { | 
| 5 | 5 | return $result = false; | 
| 6 | 6 | } | 
| 7 | 7 | |
| 8 | -function geoip_ip_info($ip){return sn_function_call('geoip_ip_info', array($ip, &$result));} | |
| 8 | +function geoip_ip_info($ip) {return sn_function_call('geoip_ip_info', array($ip, &$result)); } | |
| 9 | 9 |  function sn_geoip_ip_info($ip, &$result) { | 
| 10 | 10 | return $result = false; | 
| 11 | 11 | } | 
| @@ -7,8 +7,8 @@ | ||
| 7 | 7 | * | 
| 8 | 8 | */ | 
| 9 | 9 | |
| 10 | -define('INSIDE'  , true); | |
| 11 | -define('INSTALL' , false); | |
| 10 | +define('INSIDE', true); | |
| 11 | +define('INSTALL', false); | |
| 12 | 12 | |
| 13 | 13 |  require('common.' . substr(strrchr(__FILE__, '.'), 1)); | 
| 14 | 14 | |
| @@ -15,7 +15,7 @@ | ||
| 15 | 15 | |
| 16 | 16 |  include('includes/init.' . substr(strrchr(__FILE__, '.'), 1)); | 
| 17 | 17 | // die(); | 
| 18 | -if($template_result[F_USER_IS_AUTHORIZED]) { | |
| 18 | +if ($template_result[F_USER_IS_AUTHORIZED]) { | |
| 19 | 19 |    sys_redirect('index' . DOT_PHP_EX); | 
| 20 | 20 | } | 
| 21 | 21 |  lng_include('login'); | 
| @@ -26,7 +26,7 @@ discard block | ||
| 26 | 26 | $newstock = $stock; | 
| 27 | 27 | $intError = MARKET_DEAL; | 
| 28 | 28 | |
| 29 | -switch($mode) | |
| 29 | +switch ($mode) | |
| 30 | 30 |  { | 
| 31 | 31 | case MARKET_RESOURCES: // Resource trader | 
| 32 | 32 |      require('includes/includes/market_trader.inc'); | 
| @@ -82,12 +82,12 @@ discard block | ||
| 82 | 82 | } | 
| 83 | 83 | |
| 84 | 84 |  $message_id = sys_get_param_int('message'); | 
| 85 | -if($message_id != MARKET_NOTHING) | |
| 85 | +if ($message_id != MARKET_NOTHING) | |
| 86 | 86 |  { | 
| 87 | 87 |    $template->assign_block_vars('result', array('MESSAGE' => $lang['eco_mrk_errors'][$message_id])); | 
| 88 | 88 | } | 
| 89 | 89 | |
| 90 | -if($message) | |
| 90 | +if ($message) | |
| 91 | 91 |  { | 
| 92 | 92 |    $template->assign_block_vars('result', array('MESSAGE' => $message)); | 
| 93 | 93 | } | 
| @@ -35,7 +35,7 @@ discard block | ||
| 35 | 35 | */ | 
| 36 | 36 | // OK 4.9 | 
| 37 | 37 |    public function __construct($filename = __FILE__) { | 
| 38 | -    if($this->provider_id == ACCOUNT_PROVIDER_NONE) { | |
| 38 | +    if ($this->provider_id == ACCOUNT_PROVIDER_NONE) { | |
| 39 | 39 |        die('У всех провайдеров должен быть $provider_id!'); | 
| 40 | 40 | } | 
| 41 | 41 | |
| @@ -133,7 +133,7 @@ discard block | ||
| 133 | 133 | // OK 4.6 | 
| 134 | 134 |    public function player_name_suggest() { | 
| 135 | 135 | $name = ''; | 
| 136 | -    if(is_object($this->account) && !empty($this->account->account_email)) { | |
| 136 | +    if (is_object($this->account) && !empty($this->account->account_email)) { | |
| 137 | 137 |        list($name) = explode('@', $this->account->account_email); | 
| 138 | 138 | } | 
| 139 | 139 | |
| @@ -41,7 +41,7 @@ | ||
| 41 | 41 |        // $query = static::$db->doquery("SELECT `id` FROM {{confirmations}} WHERE `code` = '{$confirm_code_safe}' AND `type` = {$confirmation_type_safe} FOR UPDATE", true); | 
| 42 | 42 | // Тип не нужен для проверки - код подтверждения должен быть уникален от слова "совсем" | 
| 43 | 43 |        $query = $this->db->doquery("SELECT `id` FROM {{confirmations}} WHERE `code` = '{$confirm_code_safe}' FOR UPDATE", true); | 
| 44 | - } while($query); | |
| 44 | + } while ($query); | |
| 45 | 45 | |
| 46 | 46 | $this->db->doquery( | 
| 47 | 47 |        "REPLACE INTO {{confirmations}} |