@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | $source_planet = &$mission_data['src_planet']; |
15 | 15 | $destination_planet = &$mission_data['dst_planet']; |
16 | 16 | |
17 | - if(!isset($destination_planet['id']) || !$destination_planet['id_owner']) |
|
17 | + if (!isset($destination_planet['id']) || !$destination_planet['id_owner']) |
|
18 | 18 | { |
19 | 19 | // doquery("UPDATE {{fleets}} SET `fleet_mess` = 1 WHERE `fleet_id` = {$fleet_row['fleet_id']} LIMIT 1;"); |
20 | 20 | fleet_send_back($fleet_row); |
@@ -27,10 +27,10 @@ discard block |
||
27 | 27 | $destination_planet['name'], uni_render_coordinates_href($fleet_row, 'fleet_end_', 3, ''), |
28 | 28 | $fleet_row['fleet_resource_metal'], $lang['Metal'], |
29 | 29 | $fleet_row['fleet_resource_crystal'], $lang['Crystal'], |
30 | - $fleet_row['fleet_resource_deuterium'], $lang['Deuterium'] ); |
|
30 | + $fleet_row['fleet_resource_deuterium'], $lang['Deuterium']); |
|
31 | 31 | msg_send_simple_message($fleet_row['fleet_target_owner'], '', $fleet_row['fleet_start_time'], MSG_TYPE_TRANSPORT, $lang['sys_mess_tower'], $lang['sys_mess_transport'], $Message); |
32 | 32 | |
33 | - if($fleet_row['fleet_target_owner'] <> $fleet_row['fleet_owner']) |
|
33 | + if ($fleet_row['fleet_target_owner'] <> $fleet_row['fleet_owner']) |
|
34 | 34 | { |
35 | 35 | msg_send_simple_message($fleet_row['fleet_owner'], '', $fleet_row['fleet_start_time'], MSG_TYPE_TRANSPORT, $lang['sys_mess_tower'], $lang['sys_mess_transport'], $Message); |
36 | 36 | } |
@@ -8,8 +8,7 @@ |
||
8 | 8 | * @copyright 2008 By Chlorel for XNova |
9 | 9 | */ |
10 | 10 | |
11 | -function flt_mission_transport(&$mission_data) |
|
12 | -{ |
|
11 | +function flt_mission_transport(&$mission_data) { |
|
13 | 12 | $fleet_row = &$mission_data['fleet']; |
14 | 13 | $source_planet = &$mission_data['src_planet']; |
15 | 14 | $destination_planet = &$mission_data['dst_planet']; |
@@ -5,14 +5,14 @@ |
||
5 | 5 | */ |
6 | 6 | global $template; |
7 | 7 | |
8 | -if(isset($sn_page_name) || ($sn_page_name = isset($_GET['page']) ? trim(strip_tags($_GET['page'])) : '')) { |
|
8 | +if (isset($sn_page_name) || ($sn_page_name = isset($_GET['page']) ? trim(strip_tags($_GET['page'])) : '')) { |
|
9 | 9 | require_once('common.' . substr(strrchr(__FILE__, '.'), 1)); |
10 | - if($sn_page_name) { |
|
10 | + if ($sn_page_name) { |
|
11 | 11 | // Loading page-specific language files |
12 | 12 | |
13 | 13 | !empty($sn_mvc['model'][$sn_page_name]) and execute_hooks($sn_mvc['model'][$sn_page_name], $template, 'model', $sn_page_name); |
14 | 14 | !empty($sn_mvc['view'][$sn_page_name]) and execute_hooks($sn_mvc['view'][$sn_page_name], $template, 'view', $sn_page_name); |
15 | - if(!empty($template_result) && is_object($template)) { |
|
15 | + if (!empty($template_result) && is_object($template)) { |
|
16 | 16 | $template->assign_recursive($template_result); |
17 | 17 | } |
18 | 18 |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | |
22 | 22 | define('IN_AJAX', true); |
23 | 23 | |
24 | - if(!is_object($template)) { |
|
24 | + if (!is_object($template)) { |
|
25 | 25 | $template = gettemplate('_ajax', true); |
26 | 26 | } |
27 | 27 | |
@@ -37,16 +37,16 @@ discard block |
||
37 | 37 | |
38 | 38 | $mode = sys_get_param_str('mode'); |
39 | 39 | |
40 | - if(class_exists($className = 'Pages\\Page' . ucfirst($mode))) { |
|
40 | + if (class_exists($className = 'Pages\\Page' . ucfirst($mode))) { |
|
41 | 41 | /** |
42 | 42 | * @var \Pages\IPage $page |
43 | 43 | */ |
44 | 44 | $page = new $className(); |
45 | - if(method_exists($page, 'loadParams')) { |
|
45 | + if (method_exists($page, 'loadParams')) { |
|
46 | 46 | $page->loadParams(); |
47 | 47 | } |
48 | 48 | |
49 | - if(method_exists($page, $action = sys_get_param('action')) && $page->checkAction($action)) { |
|
49 | + if (method_exists($page, $action = sys_get_param('action')) && $page->checkAction($action)) { |
|
50 | 50 | $result = $page->$action(); |
51 | 51 | is_array($result) ? HelperArray::merge($template_result['AJAX'], $result) : false; |
52 | 52 | } |
@@ -31,7 +31,7 @@ |
||
31 | 31 | QUEST_STATUS_COMPLETE => '', |
32 | 32 | ); |
33 | 33 | |
34 | - if(!isset($statuses[$this->filterQuestStatus])) { |
|
34 | + if (!isset($statuses[$this->filterQuestStatus])) { |
|
35 | 35 | $this->filterQuestStatus = QUEST_STATUS_ALL; |
36 | 36 | } |
37 | 37 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | } |
102 | 102 | } |
103 | 103 | |
104 | - if(!isset($next)) { |
|
104 | + if (!isset($next)) { |
|
105 | 105 | $next = new TextEntity(); |
106 | 106 | } |
107 | 107 | |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | $prev = $this->getById($currentText->prev); |
120 | 120 | } |
121 | 121 | |
122 | - if(!isset($prev)) { |
|
122 | + if (!isset($prev)) { |
|
123 | 123 | $prev = new TextEntity(); |
124 | 124 | } |
125 | 125 |
@@ -338,7 +338,7 @@ discard block |
||
338 | 338 | * @return string |
339 | 339 | */ |
340 | 340 | protected function stringValue($value) { |
341 | - return "'" . $this->escape((string)$value) . "'"; |
|
341 | + return "'" . $this->escape((string) $value) . "'"; |
|
342 | 342 | } |
343 | 343 | |
344 | 344 | /** |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | * @return string |
350 | 350 | */ |
351 | 351 | public function quote($fieldName) { |
352 | - return "`" . $this->escape((string)$fieldName) . "`"; |
|
352 | + return "`" . $this->escape((string) $fieldName) . "`"; |
|
353 | 353 | } |
354 | 354 | |
355 | 355 | /** |
@@ -396,7 +396,7 @@ discard block |
||
396 | 396 | * @return string |
397 | 397 | */ |
398 | 398 | protected function quoteTable($tableName) { |
399 | - return "`{{" . $this->escape((string)$tableName) . "}}`"; |
|
399 | + return "`{{" . $this->escape((string) $tableName) . "}}`"; |
|
400 | 400 | } |
401 | 401 | |
402 | 402 | /** |
@@ -43,7 +43,7 @@ |
||
43 | 43 | */ |
44 | 44 | public function toArray() { |
45 | 45 | $tutorial = array(); |
46 | - foreach($this->keys() as $key) { |
|
46 | + foreach ($this->keys() as $key) { |
|
47 | 47 | $tutorial[$key] = $this->$key; |
48 | 48 | } |
49 | 49 |
@@ -7,9 +7,9 @@ |
||
7 | 7 | * |
8 | 8 | */ |
9 | 9 | |
10 | -define('INSIDE' , true); |
|
11 | -define('INSTALL' , false); |
|
12 | -define('IN_ADMIN' , true); |
|
10 | +define('INSIDE', true); |
|
11 | +define('INSTALL', false); |
|
12 | +define('IN_ADMIN', true); |
|
13 | 13 | |
14 | 14 | require('../common.' . substr(strrchr(__FILE__, '.'), 1)); |
15 | 15 |
@@ -20,30 +20,30 @@ |
||
20 | 20 | $planet_id = sys_get_param_id('planet_id'); |
21 | 21 | |
22 | 22 | $unit_list = sys_get_param('unit_list'); |
23 | -if(sys_get_param('change_data') && !empty($unit_list)) |
|
23 | +if (sys_get_param('change_data') && !empty($unit_list)) |
|
24 | 24 | { |
25 | 25 | $query_string = array(); |
26 | - foreach($unit_list as $unit_id => $unit_amount) |
|
26 | + foreach ($unit_list as $unit_id => $unit_amount) |
|
27 | 27 | { |
28 | - if($unit_query_string = admin_planet_edit_query_string($unit_id, $unit_amount, $mode)) |
|
28 | + if ($unit_query_string = admin_planet_edit_query_string($unit_id, $unit_amount, $mode)) |
|
29 | 29 | { |
30 | 30 | $query_string[] = $unit_query_string; |
31 | 31 | } |
32 | 32 | } |
33 | 33 | |
34 | - if(!empty($query_string)) |
|
34 | + if (!empty($query_string)) |
|
35 | 35 | { |
36 | 36 | DBStaticPlanet::db_planet_set_by_id($planet_id, implode(', ', $query_string)); |
37 | 37 | } |
38 | 38 | } |
39 | 39 | |
40 | -if($planet_id) |
|
40 | +if ($planet_id) |
|
41 | 41 | { |
42 | 42 | $edit_planet_row = DBStaticPlanet::db_planet_by_id($planet_id); |
43 | 43 | admin_planet_edit_template($template, $edit_planet_row, $mode); |
44 | 44 | } |
45 | 45 | |
46 | -foreach($admin_planet_edit_mode_list as $page_mode => $mode_locale) |
|
46 | +foreach ($admin_planet_edit_mode_list as $page_mode => $mode_locale) |
|
47 | 47 | { |
48 | 48 | $template->assign_block_vars('page_menu', array( |
49 | 49 | 'ID' => $page_mode, |