@@ -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']--; |
@@ -10,8 +10,7 @@ |
||
10 | 10 | // ---------------------------------------------------------------------------------------------------------------- |
11 | 11 | // Mission Case 9: -> Coloniser |
12 | 12 | // |
13 | -function flt_mission_colonize(&$mission_data) |
|
14 | -{ |
|
13 | +function flt_mission_colonize(&$mission_data) { |
|
15 | 14 | $fleet_row = &$mission_data['fleet']; |
16 | 15 | $src_user_row = &$mission_data['src_user']; |
17 | 16 |
@@ -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); |
@@ -6,8 +6,7 @@ |
||
6 | 6 | * version 2.0 copyright (c) 2012 by Gorlum for http://supernova.ws |
7 | 7 | */ |
8 | 8 | |
9 | -function sn_techtree_view($template = null) |
|
10 | -{ |
|
9 | +function sn_techtree_view($template = null) { |
|
11 | 10 | global $lang, $user, $planetrow; |
12 | 11 | |
13 | 12 | $tech_tree = array(); |
@@ -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 | } |
@@ -61,8 +61,7 @@ |
||
61 | 61 | 'ALLY_NAME' => htmlentities($row['ally_name'], ENT_COMPAT, 'UTF-8'), |
62 | 62 | 'ALLY_TAG' => htmlentities($row['ally_tag'], ENT_COMPAT, 'UTF-8'), |
63 | 63 | )); |
64 | - } |
|
65 | - elseif($type=='ally') |
|
64 | + } elseif($type=='ally') |
|
66 | 65 | { |
67 | 66 | $template->assign_block_vars('search_result', array( |
68 | 67 | 'ALLY_NAME' => htmlentities($row['ally_name'], ENT_COMPAT, 'UTF-8'), |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | |
13 | 13 | include('common.' . substr(strrchr(__FILE__, '.'), 1)); |
14 | 14 | |
15 | -if(SN::$config->game_mode == GAME_BLITZ) { |
|
15 | +if (SN::$config->game_mode == GAME_BLITZ) { |
|
16 | 16 | messageBox($lang['sys_blitz_page_disabled'], $lang['sys_error'], 'overview.php', 10); |
17 | 17 | die(); |
18 | 18 | } |
@@ -25,9 +25,9 @@ discard block |
||
25 | 25 | |
26 | 26 | $template = gettemplate('search', true); |
27 | 27 | |
28 | -if($searchtext && $type) |
|
28 | +if ($searchtext && $type) |
|
29 | 29 | { |
30 | - switch($type) |
|
30 | + switch ($type) |
|
31 | 31 | { |
32 | 32 | case "planetname": |
33 | 33 | // $search = db_planet_list_search($searchtext); |
@@ -43,9 +43,9 @@ discard block |
||
43 | 43 | break; |
44 | 44 | } |
45 | 45 | |
46 | - while($row = db_fetch($search)) |
|
46 | + while ($row = db_fetch($search)) |
|
47 | 47 | { |
48 | - if($type=='playername' || $type=='planetname') |
|
48 | + if ($type == 'playername' || $type == 'planetname') |
|
49 | 49 | { |
50 | 50 | $template->assign_block_vars('search_result', array( |
51 | 51 | 'PLAYER_ID' => $row['uid'], |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | 'ALLY_TAG' => htmlentities($row['ally_tag'], ENT_COMPAT, 'UTF-8'), |
63 | 63 | )); |
64 | 64 | } |
65 | - elseif($type=='ally') |
|
65 | + elseif ($type == 'ally') |
|
66 | 66 | { |
67 | 67 | $template->assign_block_vars('search_result', array( |
68 | 68 | 'ALLY_NAME' => htmlentities($row['ally_name'], ENT_COMPAT, 'UTF-8'), |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | 'ally' => 'sys_alliance', |
82 | 82 | ); |
83 | 83 | |
84 | -foreach($search_type as $type_id => $type_lang) |
|
84 | +foreach ($search_type as $type_id => $type_lang) |
|
85 | 85 | { |
86 | 86 | $template->assign_block_vars('type', array( |
87 | 87 | 'ID' => $type_id, |
@@ -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 |