@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | |
31 | 31 | //define('SN_RENDER_NAVBAR_PLANET', false); |
32 | 32 | |
33 | -include('common.' . substr(strrchr(__FILE__, '.'), 1)); |
|
33 | +include('common.'.substr(strrchr(__FILE__, '.'), 1)); |
|
34 | 34 | |
35 | 35 | // |
36 | 36 | ////$player = new Player(); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | |
79 | 79 | $result = array(); |
80 | 80 | |
81 | -switch($mode = sys_get_param_str('mode')) { |
|
81 | +switch ($mode = sys_get_param_str('mode')) { |
|
82 | 82 | case 'manage': |
83 | 83 | sn_sys_sector_buy('overview.php?mode=manage'); |
84 | 84 | |
@@ -88,11 +88,11 @@ discard block |
||
88 | 88 | $template = gettemplate('planet_manage', true); |
89 | 89 | $planet_id = sys_get_param_id('planet_id'); |
90 | 90 | |
91 | - if(sys_get_param_str('rename') && $new_name = sys_get_param_str('new_name')) { |
|
91 | + if (sys_get_param_str('rename') && $new_name = sys_get_param_str('new_name')) { |
|
92 | 92 | $planetrow['name'] = $new_name; |
93 | 93 | // $new_name = db_escape($new_name); |
94 | 94 | DBStaticPlanet::db_planet_set_by_id($planetrow['id'], "`name` = '{$new_name}'"); |
95 | - } elseif(sys_get_param_str('action') == 'make_capital') { |
|
95 | + } elseif (sys_get_param_str('action') == 'make_capital') { |
|
96 | 96 | try { |
97 | 97 | sn_db_transaction_start(); |
98 | 98 | $user = DBStaticUser::db_user_by_id($user['id'], true, '*'); |
@@ -101,15 +101,15 @@ discard block |
||
101 | 101 | // $user = $global_data['user']; |
102 | 102 | // $planetrow = $global_data['planet']; |
103 | 103 | |
104 | - if($planetrow['planet_type'] != PT_PLANET) { |
|
104 | + if ($planetrow['planet_type'] != PT_PLANET) { |
|
105 | 105 | throw new exception(classLocale::$lang['ov_capital_err_not_a_planet'], ERR_ERROR); |
106 | 106 | } |
107 | 107 | |
108 | - if($planetrow['id'] == $user['id_planet']) { |
|
108 | + if ($planetrow['id'] == $user['id_planet']) { |
|
109 | 109 | throw new exception(classLocale::$lang['ov_capital_err_capital_already'], ERR_ERROR); |
110 | 110 | } |
111 | 111 | |
112 | - if($user_dark_matter < classSupernova::$config->planet_capital_cost) { |
|
112 | + if ($user_dark_matter < classSupernova::$config->planet_capital_cost) { |
|
113 | 113 | throw new exception(classLocale::$lang['ov_capital_err_no_dark_matter'], ERR_ERROR); |
114 | 114 | } |
115 | 115 | |
@@ -126,16 +126,16 @@ discard block |
||
126 | 126 | ); |
127 | 127 | sn_db_transaction_commit(); |
128 | 128 | sys_redirect('overview.php?mode=manage'); |
129 | - } catch(exception $e) { |
|
129 | + } catch (exception $e) { |
|
130 | 130 | sn_db_transaction_rollback(); |
131 | 131 | $result[] = array( |
132 | 132 | 'STATUS' => $e->getCode(), |
133 | 133 | 'MESSAGE' => $e->getMessage(), |
134 | 134 | ); |
135 | 135 | } |
136 | - } elseif(sys_get_param_str('action') == 'planet_teleport') { |
|
136 | + } elseif (sys_get_param_str('action') == 'planet_teleport') { |
|
137 | 137 | try { |
138 | - if(!uni_coordinates_valid($new_coordinates = array( |
|
138 | + if (!uni_coordinates_valid($new_coordinates = array( |
|
139 | 139 | 'galaxy' => sys_get_param_int('new_galaxy'), |
140 | 140 | 'system' => sys_get_param_int('new_system'), |
141 | 141 | 'planet' => sys_get_param_int('new_planet'))) |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | // $planetrow = $global_data['planet']; |
153 | 153 | |
154 | 154 | $can_teleport = uni_planet_teleport_check($user, $planetrow, $new_coordinates); |
155 | - if($can_teleport['result'] != ERR_NONE) { |
|
155 | + if ($can_teleport['result'] != ERR_NONE) { |
|
156 | 156 | throw new exception($can_teleport['message'], $can_teleport['result']); |
157 | 157 | } |
158 | 158 | |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | DBStaticPlanet::db_planet_set_by_gspt($planetrow['galaxy'], $planetrow['system'], $planetrow['planet'], PT_ALL, |
164 | 164 | "galaxy = {$new_coordinates['galaxy']}, system = {$new_coordinates['system']}, planet = {$new_coordinates['planet']}, planet_teleport_next = {$planet_teleport_next}"); |
165 | 165 | |
166 | - if($planetrow['id'] == $user['id_planet']) { |
|
166 | + if ($planetrow['id'] == $user['id_planet']) { |
|
167 | 167 | DBStaticUser::db_user_set_by_id($user['id'], "galaxy = {$new_coordinates['galaxy']}, system = {$new_coordinates['system']}, planet = {$new_coordinates['planet']}"); |
168 | 168 | } |
169 | 169 | |
@@ -176,17 +176,17 @@ discard block |
||
176 | 176 | 'MESSAGE' => classLocale::$lang['ov_teleport_err_none'], |
177 | 177 | ); |
178 | 178 | sys_redirect('overview.php?mode=manage'); |
179 | - } catch(exception $e) { |
|
179 | + } catch (exception $e) { |
|
180 | 180 | sn_db_transaction_rollback(); |
181 | 181 | $result[] = array( |
182 | 182 | 'STATUS' => $e->getCode(), |
183 | 183 | 'MESSAGE' => $e->getMessage(), |
184 | 184 | ); |
185 | 185 | } |
186 | - } elseif(sys_get_param_str('action') == 'planet_abandon') { |
|
186 | + } elseif (sys_get_param_str('action') == 'planet_abandon') { |
|
187 | 187 | // if(sec_password_check($user['id'], sys_get_param('abandon_confirm'))) { |
188 | - if(classSupernova::$auth->password_check(sys_get_param('abandon_confirm'))) { |
|
189 | - if($user['id_planet'] != $user['current_planet'] && $user['current_planet'] == $planet_id) { |
|
188 | + if (classSupernova::$auth->password_check(sys_get_param('abandon_confirm'))) { |
|
189 | + if ($user['id_planet'] != $user['current_planet'] && $user['current_planet'] == $planet_id) { |
|
190 | 190 | $destroyed = SN_TIME_NOW + 60 * 60 * 24; |
191 | 191 | DBStaticPlanet::db_planet_set_by_id($user['current_planet'], "`destruyed`='{$destroyed}', `id_owner`=0"); |
192 | 192 | DBStaticPlanet::db_planet_set_by_parent($user['current_planet'], "`destruyed`='{$destroyed}', `id_owner`=0"); |
@@ -196,9 +196,9 @@ discard block |
||
196 | 196 | message(classLocale::$lang['ov_delete_wrong_planet'], classLocale::$lang['colony_abandon'], 'overview.php?mode=manage'); |
197 | 197 | } |
198 | 198 | } else { |
199 | - message(classLocale::$lang['ov_delete_wrong_pass'] , classLocale::$lang['colony_abandon'], 'overview.php?mode=manage'); |
|
199 | + message(classLocale::$lang['ov_delete_wrong_pass'], classLocale::$lang['colony_abandon'], 'overview.php?mode=manage'); |
|
200 | 200 | } |
201 | - } elseif( |
|
201 | + } elseif ( |
|
202 | 202 | ($hire = sys_get_param_int('hire')) && in_array($hire, sn_get_groups('governors')) |
203 | 203 | && ( |
204 | 204 | !get_unit_param($hire, P_MAX_STACK) || |
@@ -213,8 +213,8 @@ discard block |
||
213 | 213 | $user = DBStaticUser::db_user_by_id($user['id'], true); |
214 | 214 | $planetrow = DBStaticPlanet::db_planet_by_id($planetrow['id'], true); |
215 | 215 | $build_data = eco_get_build_data($user, $planetrow, $hire, $planetrow['PLANET_GOVERNOR_ID'] == $hire ? $planetrow['PLANET_GOVERNOR_LEVEL'] : 0); |
216 | - if($build_data['CAN'][BUILD_CREATE]) { |
|
217 | - if($planetrow['PLANET_GOVERNOR_ID'] == $hire) { |
|
216 | + if ($build_data['CAN'][BUILD_CREATE]) { |
|
217 | + if ($planetrow['PLANET_GOVERNOR_ID'] == $hire) { |
|
218 | 218 | $planetrow['PLANET_GOVERNOR_LEVEL']++; |
219 | 219 | $query = '`PLANET_GOVERNOR_LEVEL` + 1'; |
220 | 220 | } else { |
@@ -240,8 +240,8 @@ discard block |
||
240 | 240 | |
241 | 241 | lng_include('mrc_mercenary'); |
242 | 242 | int_planet_pretemplate($planetrow, $template); |
243 | - foreach(sn_get_groups('governors') as $governor_id) { |
|
244 | - if($planetrow['planet_type'] == PT_MOON && $governor_id == MRC_TECHNOLOGIST) { |
|
243 | + foreach (sn_get_groups('governors') as $governor_id) { |
|
244 | + if ($planetrow['planet_type'] == PT_MOON && $governor_id == MRC_TECHNOLOGIST) { |
|
245 | 245 | continue; |
246 | 246 | } |
247 | 247 | |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | 'PAGE_HINT' => classLocale::$lang['ov_manage_page_hint'], |
294 | 294 | )); |
295 | 295 | |
296 | - foreach($result as &$a_result) { |
|
296 | + foreach ($result as &$a_result) { |
|
297 | 297 | $template->assign_block_vars('result', $a_result); |
298 | 298 | } |
299 | 299 | |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | default: |
304 | 304 | sn_sys_sector_buy(); |
305 | 305 | |
306 | - if(sys_get_param_str('rename') && $new_name = sys_get_param_str('new_name')) { |
|
306 | + if (sys_get_param_str('rename') && $new_name = sys_get_param_str('new_name')) { |
|
307 | 307 | $planetrow['name'] = $new_name; |
308 | 308 | $new_name_safe = db_escape($new_name); |
309 | 309 | DBStaticPlanet::db_planet_set_by_id($planetrow['id'], "`name` = '{$new_name_safe}'"); |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | |
334 | 334 | $planet_count = 0; |
335 | 335 | $planets_query = DBStaticPlanet::db_planet_list_sorted($user, false, '*'); |
336 | - foreach($planets_query as $an_id => $UserPlanet) { |
|
336 | + foreach ($planets_query as $an_id => $UserPlanet) { |
|
337 | 337 | sn_db_transaction_start(); |
338 | 338 | $UserPlanet = sys_o_get_updated($user, $UserPlanet['id'], SN_TIME_NOW, false, true); |
339 | 339 | sn_db_transaction_commit(); |
@@ -344,16 +344,16 @@ discard block |
||
344 | 344 | |
345 | 345 | $planet_fleet_id = 0; |
346 | 346 | $fleet_list = $template_planet['fleet_list']; |
347 | - if($fleet_list['own']['count']) { |
|
347 | + if ($fleet_list['own']['count']) { |
|
348 | 348 | $planet_fleet_id = "p{$UserPlanet['id']}"; |
349 | 349 | $fleets_to_planet[$UserPlanet['id']] = tpl_parse_fleet_sn($fleet_list['own']['total'], $planet_fleet_id); |
350 | 350 | // $fleet_id++;tpl_parse_fleet_sn |
351 | 351 | } |
352 | - if($UserPlanet['planet_type'] == PT_MOON) { |
|
352 | + if ($UserPlanet['planet_type'] == PT_MOON) { |
|
353 | 353 | continue; |
354 | 354 | } |
355 | 355 | $moon = DBStaticPlanet::db_planet_by_parent($UserPlanet['id']); |
356 | - if($moon) { |
|
356 | + if ($moon) { |
|
357 | 357 | $moon_fill = min(100, floor($moon['field_current'] / eco_planet_fields_max($moon) * 100)); |
358 | 358 | } else { |
359 | 359 | $moon_fill = 0; |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | tpl_assign_fleet($template, $fleets); |
394 | 394 | |
395 | 395 | $lune = $planetrow['planet_type'] == PT_PLANET ? DBStaticPlanet::db_planet_by_parent($planetrow['id']) : DBStaticPlanet::db_planet_by_id($planetrow['parent_planet']); |
396 | - if($lune) { |
|
396 | + if ($lune) { |
|
397 | 397 | $template->assign_vars(array( |
398 | 398 | 'MOON_ID' => $lune['id'], |
399 | 399 | 'MOON_IMG' => $lune['image'], |
@@ -405,15 +405,15 @@ discard block |
||
405 | 405 | $planet_fill = $planet_fill > 100 ? 100 : $planet_fill; |
406 | 406 | |
407 | 407 | $planet_recyclers_orbiting = 0; |
408 | - foreach(Fleet::$snGroupRecyclers as $recycler_id) { |
|
408 | + foreach (Fleet::$snGroupRecyclers as $recycler_id) { |
|
409 | 409 | $planet_recyclers_orbiting += mrc_get_level($user, $planetrow, $recycler_id); |
410 | 410 | } |
411 | 411 | |
412 | 412 | int_planet_pretemplate($planetrow, $template); |
413 | 413 | |
414 | 414 | $sn_group_ques = sn_get_groups('ques'); |
415 | - if(!defined('GAME_STRUCTURES_DISABLED') || !GAME_STRUCTURES_DISABLED) { |
|
416 | - foreach(array(QUE_STRUCTURES => $sn_group_ques[QUE_STRUCTURES]) as $que_id => $que_type_data) { |
|
415 | + if (!defined('GAME_STRUCTURES_DISABLED') || !GAME_STRUCTURES_DISABLED) { |
|
416 | + foreach (array(QUE_STRUCTURES => $sn_group_ques[QUE_STRUCTURES]) as $que_id => $que_type_data) { |
|
417 | 417 | $this_que = $que['ques'][$que_id][$user['id']][$planetrow['id']]; |
418 | 418 | $template->assign_block_vars('ques', array( |
419 | 419 | 'ID' => $que_id, |
@@ -421,8 +421,8 @@ discard block |
||
421 | 421 | 'LENGTH' => empty($this_que) ? 0 : count($this_que), |
422 | 422 | )); |
423 | 423 | |
424 | - if(!empty($this_que)) { |
|
425 | - foreach($this_que as $que_item) { |
|
424 | + if (!empty($this_que)) { |
|
425 | + foreach ($this_que as $que_item) { |
|
426 | 426 | $template->assign_block_vars('que', que_tpl_parse_element($que_item)); |
427 | 427 | } |
428 | 428 | } |
@@ -436,7 +436,7 @@ discard block |
||
436 | 436 | 'LENGTH' => $que_hangar_length, |
437 | 437 | )); |
438 | 438 | |
439 | - if(!defined('GAME_DEFENSE_DISABLED') || !GAME_DEFENSE_DISABLED) { |
|
439 | + if (!defined('GAME_DEFENSE_DISABLED') || !GAME_DEFENSE_DISABLED) { |
|
440 | 440 | $que_hangar_length = tpl_assign_hangar($template, $planetrow, SUBQUE_DEFENSE); |
441 | 441 | $template->assign_block_vars('ques', array( |
442 | 442 | 'ID' => SUBQUE_DEFENSE, |
@@ -448,12 +448,12 @@ discard block |
||
448 | 448 | $overview_planet_rows = $user['opt_int_overview_planet_rows']; |
449 | 449 | $overview_planet_columns = $user['opt_int_overview_planet_columns']; |
450 | 450 | |
451 | - if($overview_planet_rows <= 0 && $overview_planet_columns <= 0) { |
|
451 | + if ($overview_planet_rows <= 0 && $overview_planet_columns <= 0) { |
|
452 | 452 | $overview_planet_rows = $user_option_list[OPT_INTERFACE]['opt_int_overview_planet_rows']; |
453 | 453 | $overview_planet_columns = $user_option_list[OPT_INTERFACE]['opt_int_overview_planet_columns']; |
454 | 454 | } |
455 | 455 | |
456 | - if($overview_planet_rows > 0 && $overview_planet_columns <= 0) { |
|
456 | + if ($overview_planet_rows > 0 && $overview_planet_columns <= 0) { |
|
457 | 457 | $overview_planet_columns = ceil($planet_count / $overview_planet_rows); |
458 | 458 | } |
459 | 459 | |
@@ -510,7 +510,7 @@ discard block |
||
510 | 510 | )); |
511 | 511 | tpl_set_resource_info($template, $planetrow, $fleets_to_planet, 2); |
512 | 512 | |
513 | - foreach($result as &$a_result) { |
|
513 | + foreach ($result as &$a_result) { |
|
514 | 514 | $template->assign_block_vars('result', $a_result); |
515 | 515 | } |
516 | 516 |
@@ -103,23 +103,23 @@ |
||
103 | 103 | |
104 | 104 | !empty(classSupernova::$config->url_faq) ? $msg = str_replace('faq://', classSupernova::$config->url_faq, $msg) : false; |
105 | 105 | |
106 | - foreach(classSupernova::$design['bbcodes'] as $auth_level => $replaces) { |
|
107 | - if($auth_level > $author_auth) { |
|
106 | + foreach (classSupernova::$design['bbcodes'] as $auth_level => $replaces) { |
|
107 | + if ($auth_level > $author_auth) { |
|
108 | 108 | continue; |
109 | 109 | } |
110 | 110 | |
111 | - foreach($replaces as $key => $html) { |
|
111 | + foreach ($replaces as $key => $html) { |
|
112 | 112 | $msg = preg_replace(''.$key.'', $html, $msg); |
113 | 113 | } |
114 | 114 | } |
115 | 115 | |
116 | - foreach(classSupernova::$design['smiles'] as $auth_level => $replaces) { |
|
117 | - if($auth_level > $author_auth) { |
|
116 | + foreach (classSupernova::$design['smiles'] as $auth_level => $replaces) { |
|
117 | + if ($auth_level > $author_auth) { |
|
118 | 118 | continue; |
119 | 119 | } |
120 | 120 | |
121 | - foreach($replaces as $key => $imgName) { |
|
122 | - $msg = preg_replace("#" . addcslashes($key, '()[]{}') . "#isU","<img src=\"design/images/smileys/".$imgName.".gif\" align=\"absmiddle\" title=\"".$key."\" alt=\"".$key."\">",$msg); |
|
121 | + foreach ($replaces as $key => $imgName) { |
|
122 | + $msg = preg_replace("#".addcslashes($key, '()[]{}')."#isU", "<img src=\"design/images/smileys/".$imgName.".gif\" align=\"absmiddle\" title=\"".$key."\" alt=\"".$key."\">", $msg); |
|
123 | 123 | } |
124 | 124 | } |
125 | 125 |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | $user_auth_level = isset($user['authlevel']) ? $user['authlevel'] : AUTH_LEVEL_ANONYMOUS; |
37 | 37 | |
38 | 38 | $mode = sys_get_param_int('mode'); |
39 | - switch($mode) { |
|
39 | + switch ($mode) { |
|
40 | 40 | case CHAT_MODE_ALLY: |
41 | 41 | $template_result['ALLY'] = intval($user['ally_id']); |
42 | 42 | $page_title = classLocale::$lang['chat_ally']; |
@@ -49,12 +49,12 @@ discard block |
||
49 | 49 | } |
50 | 50 | |
51 | 51 | $template_result['.']['smiles'] = array(); |
52 | - foreach(classSupernova::$design['smiles'] as $auth_level => $replaces) { |
|
53 | - if($auth_level > $user_auth_level) { |
|
52 | + foreach (classSupernova::$design['smiles'] as $auth_level => $replaces) { |
|
53 | + if ($auth_level > $user_auth_level) { |
|
54 | 54 | continue; |
55 | 55 | } |
56 | 56 | |
57 | - foreach($replaces as $bbcode => $filename) { |
|
57 | + foreach ($replaces as $bbcode => $filename) { |
|
58 | 58 | $template_result['.']['smiles'][] = array( |
59 | 59 | 'BBCODE' => $bbcode, |
60 | 60 | 'FILENAME' => $filename, |
@@ -77,11 +77,11 @@ discard block |
||
77 | 77 | define('IN_AJAX', true); |
78 | 78 | $skip_fleet_update = true; |
79 | 79 | |
80 | - if(classSupernova::$config->_MODE != CACHER_NO_CACHE && classSupernova::$config->chat_timeout && SN_TIME_MICRO - classSupernova::$config->array_get('users', $user['id'], 'chat_last_activity') > classSupernova::$config->chat_timeout) { |
|
80 | + if (classSupernova::$config->_MODE != CACHER_NO_CACHE && classSupernova::$config->chat_timeout && SN_TIME_MICRO - classSupernova::$config->array_get('users', $user['id'], 'chat_last_activity') > classSupernova::$config->chat_timeout) { |
|
81 | 81 | die(); |
82 | 82 | } |
83 | 83 | |
84 | - if(($message = sys_get_param_str('message')) && $user['username']) { |
|
84 | + if (($message = sys_get_param_str('message')) && $user['username']) { |
|
85 | 85 | $ally_id = sys_get_param('ally') && $user['ally_id'] ? $user['ally_id'] : 0; |
86 | 86 | $nick = db_escape(player_nick_compact(player_nick_render_current_to_array($user, array('color' => true, 'icons' => true, 'ally' => !$ally_id)))); |
87 | 87 | |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | $skip_fleet_update = true; |
104 | 104 | |
105 | 105 | $history = sys_get_param_str('history'); |
106 | - if(!$history) { |
|
106 | + if (!$history) { |
|
107 | 107 | classSupernova::$config->array_set('users', $user['id'], 'chat_last_refresh', SN_TIME_MICRO); |
108 | 108 | } |
109 | 109 | |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $last_message = ''; |
112 | 112 | $alliance = 0; |
113 | 113 | $template_result['.']['chat'] = array(); |
114 | - if(!$history && classSupernova::$config->_MODE != CACHER_NO_CACHE && classSupernova::$config->chat_timeout && SN_TIME_MICRO - classSupernova::$config->array_get('users', $user['id'], 'chat_last_activity') > classSupernova::$config->chat_timeout) { |
|
114 | + if (!$history && classSupernova::$config->_MODE != CACHER_NO_CACHE && classSupernova::$config->chat_timeout && SN_TIME_MICRO - classSupernova::$config->array_get('users', $user['id'], 'chat_last_activity') > classSupernova::$config->chat_timeout) { |
|
115 | 115 | $result['disable'] = true; |
116 | 116 | $template_result['.']['chat'][] = array( |
117 | 117 | 'TIME' => date(FMT_DATE_TIME, htmlentities(SN_CLIENT_TIME_LOCAL, ENT_QUOTES, 'utf-8')), |
@@ -124,11 +124,11 @@ discard block |
||
124 | 124 | |
125 | 125 | $where_add = ''; |
126 | 126 | $last_message = 0; |
127 | - if($history) { |
|
127 | + if ($history) { |
|
128 | 128 | $rows = DBStaticChat::db_chat_message_count_by_ally($alliance); |
129 | 129 | $page_count = ceil($rows['CNT'] / $page_limit); |
130 | 130 | |
131 | - for($i = 0; $i < $page_count; $i++) { |
|
131 | + for ($i = 0; $i < $page_count; $i++) { |
|
132 | 132 | $template_result['.']['page'][] = array( |
133 | 133 | 'NUMBER' => $i |
134 | 134 | ); |
@@ -142,12 +142,12 @@ discard block |
||
142 | 142 | |
143 | 143 | $start_row = $page * $page_limit; |
144 | 144 | $query = DBStaticChat::db_chat_message_get_page($alliance, $where_add, $start_row, $page_limit); |
145 | - while($chat_row = db_fetch($query)) { |
|
145 | + while ($chat_row = db_fetch($query)) { |
|
146 | 146 | // Little magik here - to retain HTML codes from DB and stripping HTML codes from nick |
147 | 147 | $chat_row['user'] = player_nick_render_to_html($chat_row['user']); |
148 | 148 | $nick_stripped = htmlentities(strip_tags($chat_row['user']), ENT_QUOTES, 'utf-8'); |
149 | 149 | $nick = str_replace(strip_tags($chat_row['user']), $nick_stripped, $chat_row['user']); |
150 | - if(!$history) { |
|
150 | + if (!$history) { |
|
151 | 151 | $nick = "<span style=\"cursor: pointer;\" onclick=\"addSmiley('({$nick_stripped})');\">{$nick}</span>"; |
152 | 152 | } |
153 | 153 | |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | $template = gettemplate('chat_messages', $template); |
173 | 173 | $template->assign_recursive($template_result); |
174 | 174 | |
175 | - if($history) { |
|
175 | + if ($history) { |
|
176 | 176 | display($template, "{$classLocale['chat_history']} - {$classLocale[$alliance ? 'chat_ally' : 'chat_common']}", true, '', false, true); |
177 | 177 | } else { |
178 | 178 | $result['last_message'] = $last_message; |
@@ -12,10 +12,10 @@ discard block |
||
12 | 12 | define('INSIDE', true); |
13 | 13 | define('INSTALL', false); |
14 | 14 | define('IN_ADMIN', true); |
15 | -require('../common.' . substr(strrchr(__FILE__, '.'), 1)); |
|
15 | +require('../common.'.substr(strrchr(__FILE__, '.'), 1)); |
|
16 | 16 | |
17 | 17 | global $user; |
18 | -if($user['authlevel'] < 3) { |
|
18 | +if ($user['authlevel'] < 3) { |
|
19 | 19 | AdminMessage(classLocale::$lang['adm_err_denied']); |
20 | 20 | } |
21 | 21 | |
@@ -39,10 +39,10 @@ discard block |
||
39 | 39 | $sort = sys_get_param_int('sort', SORT_ID); |
40 | 40 | $sort = $sort_fields[$sort] ? $sort : SORT_ID; |
41 | 41 | |
42 | -if(($action = sys_get_param_int('action')) && ($user_id = sys_get_param_id('uid'))) { |
|
42 | +if (($action = sys_get_param_int('action')) && ($user_id = sys_get_param_id('uid'))) { |
|
43 | 43 | $user_selected = DBStaticUser::db_user_by_id($user_id, false, 'id, username, authlevel'); |
44 | - if($user_selected['authlevel'] < $user['authlevel'] && $user['authlevel'] >= 3) { |
|
45 | - switch($action) { |
|
44 | + if ($user_selected['authlevel'] < $user['authlevel'] && $user['authlevel'] >= 3) { |
|
45 | + switch ($action) { |
|
46 | 46 | case ACTION_DELETE: |
47 | 47 | DeleteSelectedUser($user_id); |
48 | 48 | sys_redirect("{$_SERVER['SCRIPT_NAME']}?sort={$sort}"); |
@@ -62,20 +62,20 @@ discard block |
||
62 | 62 | $template = gettemplate('admin/userlist', true); |
63 | 63 | |
64 | 64 | $multi_ip = array(); |
65 | -foreach(DBStaticUser::db_user_list_admin_multiaccounts() as $ip) { |
|
65 | +foreach (DBStaticUser::db_user_list_admin_multiaccounts() as $ip) { |
|
66 | 66 | $multi_ip[$ip['user_lastip']] = $ip['ip_count']; |
67 | 67 | } |
68 | 68 | |
69 | 69 | $geoip = geoip_status(); |
70 | 70 | $count = 0; |
71 | -foreach(DBStaticUser::db_user_list_admin_sorted($sort_fields[$sort], $is_players_online_page) as $user_row ) { |
|
71 | +foreach (DBStaticUser::db_user_list_admin_sorted($sort_fields[$sort], $is_players_online_page) as $user_row) { |
|
72 | 72 | $count++; |
73 | - if($user_row['banaday']) { |
|
73 | + if ($user_row['banaday']) { |
|
74 | 74 | $ban_details = db_ban_list_get_details($user_row); |
75 | 75 | } |
76 | 76 | |
77 | 77 | $geoip_info = $geoip ? geoip_ip_info(ip2longu($user_row['user_lastip'])) : array(); |
78 | - foreach($geoip_info as $key => $value) { |
|
78 | + foreach ($geoip_info as $key => $value) { |
|
79 | 79 | $geoip_info[strtoupper($key)] = $value; |
80 | 80 | unset($geoip_info[$key]); |
81 | 81 | } |
@@ -116,12 +116,12 @@ |
||
116 | 116 | * @return static |
117 | 117 | */ |
118 | 118 | public static function convertToVector($coordinates, $prefix = '') { |
119 | - $galaxy = !empty($coordinates[$prefix . 'galaxy']) ? intval($coordinates[$prefix . 'galaxy']) : 0; |
|
120 | - $system = !empty($coordinates[$prefix . 'system']) ? intval($coordinates[$prefix . 'system']) : 0; |
|
121 | - $planet = !empty($coordinates[$prefix . 'planet']) ? intval($coordinates[$prefix . 'planet']) : 0; |
|
122 | - $type = !empty($coordinates[$prefix . 'type']) |
|
123 | - ? intval($coordinates[$prefix . 'type']) |
|
124 | - : (!empty($coordinates[$prefix . 'planet_type']) ? intval($coordinates[$prefix . 'planet_type']) : 0); |
|
119 | + $galaxy = !empty($coordinates[$prefix.'galaxy']) ? intval($coordinates[$prefix.'galaxy']) : 0; |
|
120 | + $system = !empty($coordinates[$prefix.'system']) ? intval($coordinates[$prefix.'system']) : 0; |
|
121 | + $planet = !empty($coordinates[$prefix.'planet']) ? intval($coordinates[$prefix.'planet']) : 0; |
|
122 | + $type = !empty($coordinates[$prefix.'type']) |
|
123 | + ? intval($coordinates[$prefix.'type']) |
|
124 | + : (!empty($coordinates[$prefix.'planet_type']) ? intval($coordinates[$prefix.'planet_type']) : 0); |
|
125 | 125 | |
126 | 126 | return new static($galaxy, $system, $planet, $type); |
127 | 127 | } |
@@ -10,7 +10,7 @@ |
||
10 | 10 | 'checkSpeedPercentOld' => FLIGHT_FLEET_SPEED_WRONG, |
11 | 11 | 'checkTargetInUniverse' => FLIGHT_VECTOR_BEYOND_UNIVERSE, |
12 | 12 | 'checkTargetNotSource' => FLIGHT_VECTOR_SAME_SOURCE, |
13 | - 'checkSenderNoVacation' => FLIGHT_PLAYER_VACATION_OWN, // tODO |
|
13 | + 'checkSenderNoVacation' => FLIGHT_PLAYER_VACATION_OWN, // tODO |
|
14 | 14 | 'checkTargetNoVacation' => FLIGHT_PLAYER_VACATION, |
15 | 15 | 'checkFleetNotEmpty' => FLIGHT_SHIPS_NO_SHIPS, |
16 | 16 | // 'checkUnitsPositive' => FLIGHT_SHIPS_NEGATIVE, // Unused - 'cause it's not allowed to put negative units into Unit class |
@@ -15,8 +15,8 @@ discard block |
||
15 | 15 | 'factor' => 1.5, |
16 | 16 | ), |
17 | 17 | P_UNIT_PRODUCTION => array( |
18 | - RES_METAL => function ($level, $production_factor, $user, $planet_row) {return 40 * $level * pow(1.1, $level) * (0.1 * $production_factor);}, |
|
19 | - RES_ENERGY => function ($level, $production_factor, $user, $planet_row) {return -13 * $level * pow(1.1, $level) * (0.1 * $production_factor);}, |
|
18 | + RES_METAL => function($level, $production_factor, $user, $planet_row) {return 40 * $level * pow(1.1, $level) * (0.1 * $production_factor); }, |
|
19 | + RES_ENERGY => function($level, $production_factor, $user, $planet_row) {return -13 * $level * pow(1.1, $level) * (0.1 * $production_factor); }, |
|
20 | 20 | ), |
21 | 21 | P_MINING_IS_MANAGED => true, |
22 | 22 | ), |
@@ -33,8 +33,8 @@ discard block |
||
33 | 33 | 'factor' => 1.6, |
34 | 34 | ), |
35 | 35 | P_UNIT_PRODUCTION => array( |
36 | - RES_CRYSTAL => function ($level, $production_factor, $user, $planet_row) {return 32 * $level * pow(1.1, $level) * (0.1 * $production_factor);}, |
|
37 | - RES_ENERGY => function ($level, $production_factor, $user, $planet_row) {return -16 * $level * pow(1.1, $level) * (0.1 * $production_factor);}, |
|
36 | + RES_CRYSTAL => function($level, $production_factor, $user, $planet_row) {return 32 * $level * pow(1.1, $level) * (0.1 * $production_factor); }, |
|
37 | + RES_ENERGY => function($level, $production_factor, $user, $planet_row) {return -16 * $level * pow(1.1, $level) * (0.1 * $production_factor); }, |
|
38 | 38 | ), |
39 | 39 | P_MINING_IS_MANAGED => true, |
40 | 40 | ), |
@@ -51,8 +51,8 @@ discard block |
||
51 | 51 | 'factor' => 1.5, |
52 | 52 | ), |
53 | 53 | P_UNIT_PRODUCTION => array( |
54 | - RES_DEUTERIUM => function ($level, $production_factor, $user, $planet_row) {return 10 * $level * pow(1.1, $level) * (0.1 * $production_factor) * (-0.002 * $planet_row["temp_max"] + 1.28);}, |
|
55 | - RES_ENERGY => function ($level, $production_factor, $user, $planet_row) {return -20 * $level * pow(1.1, $level) * (0.1 * $production_factor);}, |
|
54 | + RES_DEUTERIUM => function($level, $production_factor, $user, $planet_row) {return 10 * $level * pow(1.1, $level) * (0.1 * $production_factor) * (-0.002 * $planet_row["temp_max"] + 1.28); }, |
|
55 | + RES_ENERGY => function($level, $production_factor, $user, $planet_row) {return -20 * $level * pow(1.1, $level) * (0.1 * $production_factor); }, |
|
56 | 56 | ), |
57 | 57 | P_MINING_IS_MANAGED => true, |
58 | 58 | ), |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | 'factor' => 1.5, |
70 | 70 | ), |
71 | 71 | P_UNIT_PRODUCTION => array( |
72 | - RES_ENERGY => function ($level, $production_factor, $user, $planet_row) {return ($planet_row["temp_max"] / 5 + 15) * $level * pow(1.1, $level) * (0.1 * $production_factor);}, |
|
72 | + RES_ENERGY => function($level, $production_factor, $user, $planet_row) {return ($planet_row["temp_max"] / 5 + 15) * $level * pow(1.1, $level) * (0.1 * $production_factor); }, |
|
73 | 73 | ), |
74 | 74 | P_MINING_IS_MANAGED => true, |
75 | 75 | ), |
@@ -87,8 +87,8 @@ discard block |
||
87 | 87 | 'factor' => 1.8, |
88 | 88 | ), |
89 | 89 | P_UNIT_PRODUCTION => array( |
90 | - RES_DEUTERIUM => function ($level, $production_factor, $user, $planet_row) {return -10 * $level * pow(1.1, $level) * (0.1 * $production_factor);}, |
|
91 | - RES_ENERGY => function ($level, $production_factor, $user, $planet_row) {return 30 * $level * pow(1.05 + 0.01 * mrc_get_level($user, null, TECH_ENERGY), $level) * (0.1 * $production_factor);}, |
|
90 | + RES_DEUTERIUM => function($level, $production_factor, $user, $planet_row) {return -10 * $level * pow(1.1, $level) * (0.1 * $production_factor); }, |
|
91 | + RES_ENERGY => function($level, $production_factor, $user, $planet_row) {return 30 * $level * pow(1.05 + 0.01 * mrc_get_level($user, null, TECH_ENERGY), $level) * (0.1 * $production_factor); }, |
|
92 | 92 | ), |
93 | 93 | P_MINING_IS_MANAGED => true, |
94 | 94 | ), |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | 'factor' => 2, |
106 | 106 | ), |
107 | 107 | 'storage' => array( |
108 | - RES_METAL => function($level) {return BASE_STORAGE_SIZE * pow(1.5, $level);}, |
|
108 | + RES_METAL => function($level) {return BASE_STORAGE_SIZE * pow(1.5, $level); }, |
|
109 | 109 | ), |
110 | 110 | ), |
111 | 111 | |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | 'factor' => 2, |
122 | 122 | ), |
123 | 123 | 'storage' => array( |
124 | - RES_CRYSTAL => function($level) {return BASE_STORAGE_SIZE * pow(1.5, $level);}, |
|
124 | + RES_CRYSTAL => function($level) {return BASE_STORAGE_SIZE * pow(1.5, $level); }, |
|
125 | 125 | ), |
126 | 126 | ), |
127 | 127 | |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | 'factor' => 2, |
138 | 138 | ), |
139 | 139 | 'storage' => array( |
140 | - RES_DEUTERIUM => function($level) {return BASE_STORAGE_SIZE * pow(1.5, $level);}, |
|
140 | + RES_DEUTERIUM => function($level) {return BASE_STORAGE_SIZE * pow(1.5, $level); }, |
|
141 | 141 | ), |
142 | 142 | ), |
143 | 143 |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | 'shield' => 10, |
36 | 36 | 'armor' => 400, |
37 | 37 | 'attack' => 5, |
38 | - 'amplify' => array(SHIP_SPY => 100, SHIP_SATTELITE_SOLAR => 250, ), |
|
38 | + 'amplify' => array(SHIP_SPY => 100, SHIP_SATTELITE_SOLAR => 250,), |
|
39 | 39 | ), |
40 | 40 | SHIP_CARGO_BIG => array( |
41 | 41 | 'name' => 'big_ship_cargo', |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | 'shield' => 25, |
56 | 56 | 'armor' => 1200, |
57 | 57 | 'attack' => 5, |
58 | - 'amplify' => array(SHIP_SPY => 100, SHIP_SATTELITE_SOLAR => 250, ), |
|
58 | + 'amplify' => array(SHIP_SPY => 100, SHIP_SATTELITE_SOLAR => 250,), |
|
59 | 59 | 'engine' => array( |
60 | 60 | array( |
61 | 61 | 'tech' => TECH_ENGINE_CHEMICAL, |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | 'shield' => 50, |
84 | 84 | 'armor' => 3000, |
85 | 85 | 'attack' => 10, |
86 | - 'amplify' => array(SHIP_SPY => 100, SHIP_SATTELITE_SOLAR => 250, ), |
|
86 | + 'amplify' => array(SHIP_SPY => 100, SHIP_SATTELITE_SOLAR => 250,), |
|
87 | 87 | 'engine' => array( |
88 | 88 | array( |
89 | 89 | 'tech' => TECH_ENGINE_ION, |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | 'shield' => 200, |
112 | 112 | 'armor' => 70000, |
113 | 113 | 'attack' => 50, |
114 | - 'amplify' => array(SHIP_SPY => 100, SHIP_SATTELITE_SOLAR => 250, ), |
|
114 | + 'amplify' => array(SHIP_SPY => 100, SHIP_SATTELITE_SOLAR => 250,), |
|
115 | 115 | 'engine' => array( |
116 | 116 | array( |
117 | 117 | 'tech' => TECH_ENGINE_HYPER, |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | 'shield' => 100, |
141 | 141 | 'armor' => 3000, |
142 | 142 | 'attack' => 50, |
143 | - 'amplify' => array(SHIP_SPY => 10.001, SHIP_SATTELITE_SOLAR => 21, ), |
|
143 | + 'amplify' => array(SHIP_SPY => 10.001, SHIP_SATTELITE_SOLAR => 21,), |
|
144 | 144 | 'engine' => array( |
145 | 145 | array( |
146 | 146 | 'tech' => TECH_ENGINE_ION, |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | 'shield' => 10, |
169 | 169 | 'armor' => 1600, |
170 | 170 | 'attack' => 1, |
171 | - 'amplify' => array(SHIP_SPY => 500.05, SHIP_SATTELITE_SOLAR => 1050, ), |
|
171 | + 'amplify' => array(SHIP_SPY => 500.05, SHIP_SATTELITE_SOLAR => 1050,), |
|
172 | 172 | 'engine' => array( |
173 | 173 | array( |
174 | 174 | 'tech' => TECH_ENGINE_CHEMICAL, |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | 'shield' => 0.01, |
197 | 197 | 'armor' => 100, |
198 | 198 | 'attack' => 0.01, |
199 | - 'amplify' => array( SHIP_SPY => 1,), |
|
199 | + 'amplify' => array(SHIP_SPY => 1,), |
|
200 | 200 | 'engine' => array( |
201 | 201 | array( |
202 | 202 | 'tech' => TECH_ENGINE_CHEMICAL, |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | 'factor' => 1, |
221 | 221 | ), |
222 | 222 | P_UNIT_PRODUCTION => array( |
223 | - RES_ENERGY => function($level, $production_factor, $user, $planet_row) {return ($planet_row["temp_max"] / 4 + 20) * $level * (0.1 * $production_factor);}, |
|
223 | + RES_ENERGY => function($level, $production_factor, $user, $planet_row) {return ($planet_row["temp_max"] / 4 + 20) * $level * (0.1 * $production_factor); }, |
|
224 | 224 | ), |
225 | 225 | P_MINING_IS_MANAGED => true, |
226 | 226 | |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | 'shield' => 10, |
230 | 230 | 'armor' => 200, |
231 | 231 | 'attack' => 1, |
232 | - 'amplify' => array(SHIP_SPY => 1, ), |
|
232 | + 'amplify' => array(SHIP_SPY => 1,), |
|
233 | 233 | 'engine' => array( |
234 | 234 | array( |
235 | 235 | 'tech' => TECH_ENGINE_CHEMICAL, |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | 'shield' => 10, |
262 | 262 | 'armor' => 400, |
263 | 263 | 'attack' => 50, |
264 | - 'amplify' => array(SHIP_CARGO_SMALL => 16.4, SHIP_SPY => 10.001, SHIP_SATTELITE_SOLAR => 21, ), |
|
264 | + 'amplify' => array(SHIP_CARGO_SMALL => 16.4, SHIP_SPY => 10.001, SHIP_SATTELITE_SOLAR => 21,), |
|
265 | 265 | 'engine' => array( |
266 | 266 | array( |
267 | 267 | 'tech' => TECH_ENGINE_CHEMICAL, |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | 'shield' => 25, |
291 | 291 | 'armor' => 1000, |
292 | 292 | 'attack' => 150, |
293 | - 'amplify' => array(SHIP_CARGO_SMALL => 8.2, SHIP_SPY => 3.33367, SHIP_SATTELITE_SOLAR => 7, ), |
|
293 | + 'amplify' => array(SHIP_CARGO_SMALL => 8.2, SHIP_SPY => 3.33367, SHIP_SATTELITE_SOLAR => 7,), |
|
294 | 294 | 'engine' => array( |
295 | 295 | array( |
296 | 296 | 'tech' => TECH_ENGINE_ION, |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | 'shield' => 50, |
350 | 350 | 'armor' => 2700, |
351 | 351 | 'attack' => 400, |
352 | - 'amplify' => array(SHIP_SMALL_FIGHTER_LIGHT => 6.15, SHIP_SPY => 1.25013, SHIP_SATTELITE_SOLAR => 2.625, UNIT_DEF_TURRET_MISSILE => 5.5, ), |
|
352 | + 'amplify' => array(SHIP_SMALL_FIGHTER_LIGHT => 6.15, SHIP_SPY => 1.25013, SHIP_SATTELITE_SOLAR => 2.625, UNIT_DEF_TURRET_MISSILE => 5.5,), |
|
353 | 353 | 'engine' => array( |
354 | 354 | array( |
355 | 355 | 'tech' => TECH_ENGINE_ION, |
@@ -408,7 +408,7 @@ discard block |
||
408 | 408 | 'shield' => 200, |
409 | 409 | 'armor' => 6000, |
410 | 410 | 'attack' => 1000, |
411 | - 'amplify' => array(SHIP_SPY => 0.50005, SHIP_SATTELITE_SOLAR => 1.05, UNIT_DEF_TURRET_MISSILE => 1.76, ), |
|
411 | + 'amplify' => array(SHIP_SPY => 0.50005, SHIP_SATTELITE_SOLAR => 1.05, UNIT_DEF_TURRET_MISSILE => 1.76,), |
|
412 | 412 | 'engine' => array( |
413 | 413 | array( |
414 | 414 | 'tech' => TECH_ENGINE_HYPER, |
@@ -504,7 +504,7 @@ discard block |
||
504 | 504 | 'shield' => 500, |
505 | 505 | 'armor' => 11000, |
506 | 506 | 'attack' => 2000, |
507 | - 'amplify' => array(SHIP_SPY => 0.25003, SHIP_SATTELITE_SOLAR => 0.525, SHIP_LARGE_BATTLESHIP => 7.4, UNIT_DEF_TURRET_LASER_SMALL => 1.125, ), |
|
507 | + 'amplify' => array(SHIP_SPY => 0.25003, SHIP_SATTELITE_SOLAR => 0.525, SHIP_LARGE_BATTLESHIP => 7.4, UNIT_DEF_TURRET_LASER_SMALL => 1.125,), |
|
508 | 508 | 'engine' => array( |
509 | 509 | array( |
510 | 510 | 'tech' => TECH_ENGINE_HYPER, |
@@ -608,7 +608,7 @@ discard block |
||
608 | 608 | 'shield' => 20, |
609 | 609 | 'armor' => 200, |
610 | 610 | 'attack' => 80, |
611 | - 'amplify' => array(SHIP_SPY => 7, ), |
|
611 | + 'amplify' => array(SHIP_SPY => 7,), |
|
612 | 612 | ), |
613 | 613 | UNIT_DEF_TURRET_LASER_SMALL => array( |
614 | 614 | 'name' => 'small_laser', |
@@ -626,7 +626,7 @@ discard block |
||
626 | 626 | 'shield' => 25, |
627 | 627 | 'armor' => 200, |
628 | 628 | 'attack' => 100, |
629 | - 'amplify' => array(SHIP_SPY => 5, ), |
|
629 | + 'amplify' => array(SHIP_SPY => 5,), |
|
630 | 630 | ), |
631 | 631 | UNIT_DEF_TURRET_LASER_BIG => array( |
632 | 632 | 'name' => 'big_laser', |
@@ -644,7 +644,7 @@ discard block |
||
644 | 644 | 'shield' => 100, |
645 | 645 | 'armor' => 800, |
646 | 646 | 'attack' => 250, |
647 | - 'amplify' => array(SHIP_SPY => 2, ), |
|
647 | + 'amplify' => array(SHIP_SPY => 2,), |
|
648 | 648 | ), |
649 | 649 | UNIT_DEF_TURRET_GAUSS => array( |
650 | 650 | 'name' => 'gauss_canyon', |
@@ -662,7 +662,7 @@ discard block |
||
662 | 662 | 'armor' => 3500, |
663 | 663 | 'shield' => 200, |
664 | 664 | 'attack' => 1100, |
665 | - 'amplify' => array(SHIP_SPY => 0.5, ), |
|
665 | + 'amplify' => array(SHIP_SPY => 0.5,), |
|
666 | 666 | ), |
667 | 667 | UNIT_DEF_TURRET_ION => array( |
668 | 668 | 'name' => 'ionic_canyon', |
@@ -680,7 +680,7 @@ discard block |
||
680 | 680 | 'shield' => 500, |
681 | 681 | 'armor' => 800, |
682 | 682 | 'attack' => 150, |
683 | - 'amplify' => array(SHIP_SPY => 3.3, ), |
|
683 | + 'amplify' => array(SHIP_SPY => 3.3,), |
|
684 | 684 | ), |
685 | 685 | UNIT_DEF_TURRET_PLASMA => array( |
686 | 686 | 'name' => 'buster_canyon', |
@@ -698,7 +698,7 @@ discard block |
||
698 | 698 | 'shield' => 300, |
699 | 699 | 'armor' => 10000, |
700 | 700 | 'attack' => 3000, |
701 | - 'amplify' => array(SHIP_SPY => 0.17, ), |
|
701 | + 'amplify' => array(SHIP_SPY => 0.17,), |
|
702 | 702 | ), |
703 | 703 | |
704 | 704 | UNIT_DEF_SHIELD_SMALL => array( |
@@ -718,7 +718,7 @@ discard block |
||
718 | 718 | 'shield' => 2000, |
719 | 719 | 'armor' => 2000, |
720 | 720 | 'attack' => 1, |
721 | - 'amplify' => array(SHIP_SPY => 500, ), |
|
721 | + 'amplify' => array(SHIP_SPY => 500,), |
|
722 | 722 | ), |
723 | 723 | UNIT_DEF_SHIELD_BIG => array( |
724 | 724 | 'name' => 'big_protection_shield', |
@@ -737,7 +737,7 @@ discard block |
||
737 | 737 | 'shield' => 2000, |
738 | 738 | 'armor' => 10000, |
739 | 739 | 'attack' => 1, |
740 | - 'amplify' => array(SHIP_SPY => 500, ), |
|
740 | + 'amplify' => array(SHIP_SPY => 500,), |
|
741 | 741 | ), |
742 | 742 | UNIT_DEF_SHIELD_PLANET => array( |
743 | 743 | 'name' => 'planet_protector', |
@@ -104,21 +104,21 @@ discard block |
||
104 | 104 | 'LEVEL' => 'submenu', |
105 | 105 | 'TYPE' => 'lang', |
106 | 106 | 'ITEM' => 'tech[UNIT_STRUCTURES]', |
107 | - 'LINK' => 'buildings.php?mode=' . QUE_STRUCTURES, |
|
107 | + 'LINK' => 'buildings.php?mode='.QUE_STRUCTURES, |
|
108 | 108 | 'ICON' => true, |
109 | 109 | ), |
110 | 110 | 'menu_planet_shipyard' => array( |
111 | 111 | 'LEVEL' => 'submenu', |
112 | 112 | 'TYPE' => 'lang', |
113 | 113 | 'ITEM' => 'Shipyard', |
114 | - 'LINK' => 'buildings.php?mode=' . SUBQUE_FLEET, |
|
114 | + 'LINK' => 'buildings.php?mode='.SUBQUE_FLEET, |
|
115 | 115 | 'ICON' => true, |
116 | 116 | ), |
117 | 117 | 'menu_planet_defense' => array( |
118 | 118 | 'LEVEL' => 'submenu', |
119 | 119 | 'TYPE' => 'lang', |
120 | 120 | 'ITEM' => 'Defense', |
121 | - 'LINK' => 'buildings.php?mode=' . SUBQUE_DEFENSE, |
|
121 | + 'LINK' => 'buildings.php?mode='.SUBQUE_DEFENSE, |
|
122 | 122 | 'ICON' => true, |
123 | 123 | ), |
124 | 124 | 'menu_planet_resources' => array( |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | 'LEVEL' => 'submenu', |
148 | 148 | 'TYPE' => 'lang', |
149 | 149 | 'ITEM' => 'Research', |
150 | - 'LINK' => 'buildings.php?mode=' . QUE_RESEARCH, |
|
150 | + 'LINK' => 'buildings.php?mode='.QUE_RESEARCH, |
|
151 | 151 | 'ICON' => true, |
152 | 152 | ), |
153 | 153 | 'menu_empire_techtree' => array( |
@@ -233,14 +233,14 @@ discard block |
||
233 | 233 | 'LEVEL' => 'submenu', |
234 | 234 | 'TYPE' => 'lang', |
235 | 235 | 'ITEM' => 'tech[UNIT_MERCENARIES]', |
236 | - 'LINK' => 'officer.php?mode=' . UNIT_MERCENARIES, |
|
236 | + 'LINK' => 'officer.php?mode='.UNIT_MERCENARIES, |
|
237 | 237 | 'ICON' => true, |
238 | 238 | ), |
239 | 239 | 'menu_empire_schematics' => array( |
240 | 240 | 'LEVEL' => 'submenu', |
241 | 241 | 'TYPE' => 'lang', |
242 | 242 | 'ITEM' => 'tech[UNIT_PLANS]', |
243 | - 'LINK' => 'officer.php?mode=' . UNIT_PLANS, |
|
243 | + 'LINK' => 'officer.php?mode='.UNIT_PLANS, |
|
244 | 244 | 'ICON' => true, |
245 | 245 | ), |
246 | 246 | 'menu_empire_artifacts' => array( |
@@ -270,14 +270,14 @@ discard block |
||
270 | 270 | 'LEVEL' => 'submenu', |
271 | 271 | 'TYPE' => 'lang', |
272 | 272 | 'ITEM' => 'Chat', |
273 | - 'LINK' => 'index.php?page=chat&mode=' . CHAT_MODE_COMMON, |
|
273 | + 'LINK' => 'index.php?page=chat&mode='.CHAT_MODE_COMMON, |
|
274 | 274 | 'ICON' => true, |
275 | 275 | ), |
276 | 276 | 'menu_ally_chat' => array( |
277 | 277 | 'LEVEL' => 'submenu', |
278 | 278 | 'TYPE' => 'lang', |
279 | 279 | 'ITEM' => 'AllyChat', |
280 | - 'LINK' => 'index.php?page=chat&mode=' . CHAT_MODE_ALLY, |
|
280 | + 'LINK' => 'index.php?page=chat&mode='.CHAT_MODE_ALLY, |
|
281 | 281 | 'ICON' => true, |
282 | 282 | 'DISABLED' => classSupernova::$config->game_mode == GAME_BLITZ, |
283 | 283 | ), |
@@ -458,8 +458,8 @@ discard block |
||
458 | 458 | ), |
459 | 459 | 'menu_admin_version_info' => array( |
460 | 460 | 'TYPE' => 'text', |
461 | - 'ITEM' => (classSupernova::$config->server_updater_check_last ? date(FMT_DATE, classSupernova::$config->server_updater_check_last) : '') . '<div class="' . |
|
462 | - $sn_version_check_class[classSupernova::$config->server_updater_check_result] . '">' . classLocale::$lang['adm_opt_ver_response_short'][classSupernova::$config->server_updater_check_result] . '</div>', |
|
461 | + 'ITEM' => (classSupernova::$config->server_updater_check_last ? date(FMT_DATE, classSupernova::$config->server_updater_check_last) : '').'<div class="'. |
|
462 | + $sn_version_check_class[classSupernova::$config->server_updater_check_result].'">'.classLocale::$lang['adm_opt_ver_response_short'][classSupernova::$config->server_updater_check_result].'</div>', |
|
463 | 463 | ), |
464 | 464 | |
465 | 465 | 'USER_AUTHLEVEL_NAME' => array( |
@@ -547,13 +547,13 @@ discard block |
||
547 | 547 | 'menu_admin_planet_list_planets' => array( |
548 | 548 | 'TYPE' => 'lang', |
549 | 549 | 'ITEM' => 'adm_pltlst', |
550 | - 'LINK' => 'admin/adm_planet_list.php?planet_type=' . PT_PLANET, |
|
550 | + 'LINK' => 'admin/adm_planet_list.php?planet_type='.PT_PLANET, |
|
551 | 551 | 'AUTH_LEVEL' => 3, |
552 | 552 | ), |
553 | 553 | 'menu_admin_planet_list_moons' => array( |
554 | 554 | 'TYPE' => 'lang', |
555 | 555 | 'ITEM' => 'adm_moonlst', |
556 | - 'LINK' => 'admin/adm_planet_list.php?planet_type=' . PT_MOON, |
|
556 | + 'LINK' => 'admin/adm_planet_list.php?planet_type='.PT_MOON, |
|
557 | 557 | 'AUTH_LEVEL' => 3, |
558 | 558 | ), |
559 | 559 | 'menu_admin_planet_moon_add' => array( |