@@ -17,14 +17,14 @@ |
||
17 | 17 | function flt_mission_attack($objMission) { |
18 | 18 | $objFleet = $objMission->fleet; |
19 | 19 | |
20 | - if($objFleet->shipsGetTotal() <= 0) { |
|
20 | + if ($objFleet->shipsGetTotal() <= 0) { |
|
21 | 21 | return null; |
22 | 22 | } |
23 | 23 | |
24 | 24 | $destination_user = $objMission->dst_user; |
25 | 25 | $destination_planet = $objMission->dst_planet; |
26 | 26 | |
27 | - if( |
|
27 | + if ( |
|
28 | 28 | // Нет данных о планете назначения или её владельце |
29 | 29 | empty($destination_user) || empty($destination_planet) || !is_array($destination_user) || !is_array($destination_planet) |
30 | 30 | || |
@@ -9,7 +9,6 @@ |
||
9 | 9 | |
10 | 10 | /** |
11 | 11 | * @param Mission $objMission |
12 | - * @param array $mission_data |
|
13 | 12 | */ |
14 | 13 | function flt_mission_attack($objMission) { |
15 | 14 | $objFleet = $objMission->fleet; |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -define('INSIDE' , true); |
|
4 | -define('INSTALL' , false); |
|
3 | +define('INSIDE', true); |
|
4 | +define('INSTALL', false); |
|
5 | 5 | define('IN_ADMIN', true); |
6 | 6 | |
7 | 7 | require('../common.' . substr(strrchr(__FILE__, '.'), 1)); |
@@ -9,12 +9,12 @@ discard block |
||
9 | 9 | global $config, $lang, $user; |
10 | 10 | |
11 | 11 | // if($user['authlevel'] < 1) |
12 | -if($user['authlevel'] < 3) { |
|
12 | +if ($user['authlevel'] < 3) { |
|
13 | 13 | AdminMessage(classLocale::$lang['adm_err_denied']); |
14 | 14 | } |
15 | 15 | |
16 | 16 | $planet_active = sys_get_param_int('planet_active'); |
17 | -if(!$planet_active) { |
|
17 | +if (!$planet_active) { |
|
18 | 18 | $planet_type = sys_get_param_int('planet_type', 1); |
19 | 19 | $planet_type = $planet_type == 3 ? 3 : 1; |
20 | 20 | } else { |
@@ -43,8 +43,7 @@ discard block |
||
43 | 43 | |
44 | 44 | $page_title = |
45 | 45 | classLocale::$lang['adm_planet_list_title'] . ': ' . |
46 | - ($planet_active ? classLocale::$lang['adm_planet_active'] : |
|
47 | - ($planet_type ? ($planet_type == 3 ? classLocale::$lang['sys_moons'] : classLocale::$lang['sys_planets']) : '') |
|
46 | + ($planet_active ? classLocale::$lang['adm_planet_active'] : ($planet_type ? ($planet_type == 3 ? classLocale::$lang['sys_moons'] : classLocale::$lang['sys_planets']) : '') |
|
48 | 47 | ); |
49 | 48 | $template->assign_vars(array( |
50 | 49 | 'PAGE_TITLE' => $page_title, |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | |
9 | 9 | include_once('common.' . substr(strrchr(__FILE__, '.'), 1)); |
10 | 10 | |
11 | -if(!sn_module_get_active_count('payment')) { |
|
11 | +if (!sn_module_get_active_count('payment')) { |
|
12 | 12 | sys_redirect('dark_matter.php'); |
13 | 13 | die(); |
14 | 14 | } |
@@ -65,9 +65,9 @@ discard block |
||
65 | 65 | |
66 | 66 | // Таблица скидок |
67 | 67 | $prev_discount = 0; |
68 | -if(isset(sn_module_payment::$bonus_table) && is_array(sn_module_payment::$bonus_table)) { |
|
69 | - foreach(sn_module_payment::$bonus_table as $sum => $discount) { |
|
70 | - if($discount && $discount != $prev_discount) { |
|
68 | +if (isset(sn_module_payment::$bonus_table) && is_array(sn_module_payment::$bonus_table)) { |
|
69 | + foreach (sn_module_payment::$bonus_table as $sum => $discount) { |
|
70 | + if ($discount && $discount != $prev_discount) { |
|
71 | 71 | $template->assign_block_vars('discount', array( |
72 | 72 | 'SUM' => $sum, |
73 | 73 | 'DISCOUNT' => $discount * 100, |
@@ -80,19 +80,19 @@ discard block |
||
80 | 80 | } |
81 | 81 | |
82 | 82 | // Результат платежа |
83 | -if($payment_id = sys_get_param_id('payment_id')) { |
|
83 | +if ($payment_id = sys_get_param_id('payment_id')) { |
|
84 | 84 | $payment = db_payment_get($payment_id); |
85 | - if($payment && $payment['payment_user_id'] == $user['id']) { |
|
86 | - if($payment['payment_status'] == PAYMENT_STATUS_COMPLETE) { |
|
85 | + if ($payment && $payment['payment_user_id'] == $user['id']) { |
|
86 | + if ($payment['payment_status'] == PAYMENT_STATUS_COMPLETE) { |
|
87 | 87 | $template->assign_block_vars('result', array('MESSAGE' => sprintf(classLocale::$lang['pay_msg_mm_purchase_complete'], $payment['payment_dark_matter_paid'], $payment['payment_module_name'], $payment['payment_dark_matter_gained']))); |
88 | 88 | } |
89 | - if($payment['payment_status'] == PAYMENT_STATUS_NONE) { |
|
89 | + if ($payment['payment_status'] == PAYMENT_STATUS_NONE) { |
|
90 | 90 | $template->assign_block_vars('result', array( |
91 | 91 | 'MESSAGE' => sprintf(classLocale::$lang['pay_msg_mm_purchase_incomplete'], $payment['payment_dark_matter_paid'], $payment['payment_module_name']), |
92 | 92 | 'STATUS' => 1, |
93 | 93 | )); |
94 | 94 | } |
95 | - if($payment['payment_test']) { |
|
95 | + if ($payment['payment_test']) { |
|
96 | 96 | $template->assign_block_vars('result', array( |
97 | 97 | 'MESSAGE' => sprintf(classLocale::$lang['pay_msg_mm_purchase_test']), |
98 | 98 | 'STATUS' => -1, |
@@ -107,28 +107,28 @@ discard block |
||
107 | 107 | 'metamatter' => sys_get_param_float('metamatter'), |
108 | 108 | ); |
109 | 109 | |
110 | -if(!$request['metamatter']) { |
|
110 | +if (!$request['metamatter']) { |
|
111 | 111 | unset($_POST); |
112 | 112 | } |
113 | 113 | |
114 | 114 | $payment_methods_available = array_combine(array_keys(sn_module_payment::$payment_methods), array_fill(0, count(sn_module_payment::$payment_methods), null)); |
115 | -array_walk($payment_methods_available, function (&$value, $index) { |
|
115 | +array_walk($payment_methods_available, function(&$value, $index) { |
|
116 | 116 | $value = !empty(sn_module_payment::$payment_methods[$index]) ? array_combine(array_keys(sn_module_payment::$payment_methods[$index]), array_fill(0, count(sn_module_payment::$payment_methods[$index]), null)) : $value; |
117 | 117 | }); |
118 | 118 | |
119 | 119 | // pdump($payment_methods_available); |
120 | 120 | $payment_module_valid = false; |
121 | 121 | $payment_module = sys_get_param_str('payment_module'); |
122 | -foreach(sn_module::$sn_module_list['payment'] as $module_name => $module) { |
|
123 | - if(!is_object($module) || !$module->manifest['active']) { |
|
122 | +foreach (sn_module::$sn_module_list['payment'] as $module_name => $module) { |
|
123 | + if (!is_object($module) || !$module->manifest['active']) { |
|
124 | 124 | continue; |
125 | 125 | } |
126 | 126 | |
127 | 127 | lng_include($module_name, $module->manifest['root_relative']); |
128 | 128 | |
129 | - foreach(sn_module_payment::$payment_methods as $payment_type_id => $available_methods) { |
|
130 | - foreach($available_methods as $payment_method => $payment_currency) { |
|
131 | - if(isset($module->manifest['payment_method'][$payment_method])) { |
|
129 | + foreach (sn_module_payment::$payment_methods as $payment_type_id => $available_methods) { |
|
130 | + foreach ($available_methods as $payment_method => $payment_currency) { |
|
131 | + if (isset($module->manifest['payment_method'][$payment_method])) { |
|
132 | 132 | $payment_methods_available[$payment_type_id][$payment_method][$module_name] = $module->manifest['payment_method'][$payment_method]; |
133 | 133 | } |
134 | 134 | } |
@@ -139,8 +139,8 @@ discard block |
||
139 | 139 | |
140 | 140 | global $template_result; |
141 | 141 | // Доступные платежные методы |
142 | -foreach($payment_methods_available as $payment_type_id => $payment_methods) { |
|
143 | - if(empty($payment_methods)) { |
|
142 | +foreach ($payment_methods_available as $payment_type_id => $payment_methods) { |
|
143 | + if (empty($payment_methods)) { |
|
144 | 144 | continue; |
145 | 145 | } |
146 | 146 | |
@@ -148,8 +148,8 @@ discard block |
||
148 | 148 | 'ID' => $payment_type_id, |
149 | 149 | 'NAME' => classLocale::$lang['pay_methods'][$payment_type_id], |
150 | 150 | ); |
151 | - foreach($payment_methods as $payment_method_id => $module_list) { |
|
152 | - if(empty($module_list)) { |
|
151 | + foreach ($payment_methods as $payment_method_id => $module_list) { |
|
152 | + if (empty($module_list)) { |
|
153 | 153 | continue; |
154 | 154 | } |
155 | 155 | $template_result['.']['payment'][$payment_type_id]['.']['method'][$payment_method_id] = array( |
@@ -160,14 +160,14 @@ discard block |
||
160 | 160 | 'NAME_FORCE' => isset(sn_module_payment::$payment_methods[$payment_type_id][$payment_method_id]['name']), |
161 | 161 | 'BUTTON' => isset(sn_module_payment::$payment_methods[$payment_type_id][$payment_method_id]['button']), |
162 | 162 | ); |
163 | - foreach($module_list as $payment_module_name => $payment_module_method_details) { |
|
163 | + foreach ($module_list as $payment_module_name => $payment_module_method_details) { |
|
164 | 164 | $template_result['.']['payment'][$payment_type_id]['.']['method'][$payment_method_id]['.']['module'][] = array( |
165 | 165 | 'MODULE' => $payment_module_name, |
166 | 166 | ); |
167 | 167 | } |
168 | 168 | } |
169 | 169 | |
170 | - if(empty($template_result['.']['payment'][$payment_type_id]['.'])) { |
|
170 | + if (empty($template_result['.']['payment'][$payment_type_id]['.'])) { |
|
171 | 171 | unset($template_result['.']['payment'][$payment_type_id]); |
172 | 172 | } |
173 | 173 | } |
@@ -180,19 +180,19 @@ discard block |
||
180 | 180 | $payment_module_valid = $payment_module_valid && (!$payment_method_selected || isset($payment_methods_available[$payment_type_selected][$payment_method_selected][$module_name])); |
181 | 181 | |
182 | 182 | // If payment_module invalid - making it empty OR if there is only one payment_module - selecting it |
183 | -if($payment_module_valid) { |
|
183 | +if ($payment_module_valid) { |
|
184 | 184 | // $payment_module = $payment_module; // Really - do nothing |
185 | -} elseif($payment_type_selected && count($payment_methods_available[$payment_type_selected][$payment_method_selected]) == 1) { |
|
185 | +} elseif ($payment_type_selected && count($payment_methods_available[$payment_type_selected][$payment_method_selected]) == 1) { |
|
186 | 186 | reset($payment_methods_available[$payment_type_selected][$payment_method_selected]); |
187 | 187 | $payment_module = key($payment_methods_available[$payment_type_selected][$payment_method_selected]); |
188 | -} elseif(count(sn_module::$sn_module_list['payment']) == 1) { |
|
188 | +} elseif (count(sn_module::$sn_module_list['payment']) == 1) { |
|
189 | 189 | $payment_module = $module_name; |
190 | 190 | } else { |
191 | 191 | $payment_module = ''; |
192 | 192 | } |
193 | 193 | |
194 | -if($payment_type_selected && $payment_method_selected) { |
|
195 | - foreach($payment_methods_available[$payment_type_selected][$payment_method_selected] as $module_name => $temp) { |
|
194 | +if ($payment_type_selected && $payment_method_selected) { |
|
195 | + foreach ($payment_methods_available[$payment_type_selected][$payment_method_selected] as $module_name => $temp) { |
|
196 | 196 | $template->assign_block_vars('payment_module', array( |
197 | 197 | 'ID' => $module_name, |
198 | 198 | 'NAME' => classLocale::$lang["module_{$module_name}_name"], |
@@ -201,10 +201,10 @@ discard block |
||
201 | 201 | } |
202 | 202 | } |
203 | 203 | |
204 | -foreach(classLocale::$lang['pay_currency_list'] as $key => $value) { |
|
204 | +foreach (classLocale::$lang['pay_currency_list'] as $key => $value) { |
|
205 | 205 | $course = get_exchange_rate($key); |
206 | 206 | // if(!$course || $key == $config->payment_currency_default) { |
207 | - if(!$course) { |
|
207 | + if (!$course) { |
|
208 | 208 | continue; |
209 | 209 | } |
210 | 210 | $template->assign_block_vars('exchange', array( |
@@ -219,17 +219,17 @@ discard block |
||
219 | 219 | )); |
220 | 220 | } |
221 | 221 | |
222 | -if($request['metamatter'] && $payment_module) { |
|
222 | +if ($request['metamatter'] && $payment_module) { |
|
223 | 223 | try { |
224 | 224 | // Any possible errors about generating paylink should be raised in module! |
225 | 225 | $pay_link = sn_module::$sn_module[$payment_module]->compile_request($request); |
226 | 226 | |
227 | 227 | // Поддержка дополнительной информации |
228 | - if(is_array($pay_link['RENDER'])) { |
|
229 | - foreach($pay_link['RENDER'] as $html_data) { |
|
228 | + if (is_array($pay_link['RENDER'])) { |
|
229 | + foreach ($pay_link['RENDER'] as $html_data) { |
|
230 | 230 | $template->assign_block_vars('render', $html_data); |
231 | - if(isset($html_data['VALUE']) && is_array($html_data['VALUE'])) { |
|
232 | - foreach($html_data['VALUE'] as $value_id => $value_value) { |
|
231 | + if (isset($html_data['VALUE']) && is_array($html_data['VALUE'])) { |
|
232 | + foreach ($html_data['VALUE'] as $value_id => $value_value) { |
|
233 | 233 | $template->assign_block_vars('render.value', array( |
234 | 234 | 'FIELD' => $value_id, |
235 | 235 | 'VALUE' => $value_value, |
@@ -240,8 +240,8 @@ discard block |
||
240 | 240 | } |
241 | 241 | |
242 | 242 | // Поддержка передачи данных для многошаговых платежных систем |
243 | - if(is_array($pay_link['DATA'])) { |
|
244 | - foreach($pay_link['DATA'] as $key => $value) { |
|
243 | + if (is_array($pay_link['DATA'])) { |
|
244 | + foreach ($pay_link['DATA'] as $key => $value) { |
|
245 | 245 | $template->assign_block_vars('pay_link_data', array( |
246 | 246 | 'FIELD' => $key, |
247 | 247 | 'VALUE' => $value, |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | } |
250 | 250 | } |
251 | 251 | |
252 | - if(is_array($pay_link) && in_array($pay_link['PAY_LINK_METHOD'], array('POST', 'GET', 'LINK', 'STEP'))) { |
|
252 | + if (is_array($pay_link) && in_array($pay_link['PAY_LINK_METHOD'], array('POST', 'GET', 'LINK', 'STEP'))) { |
|
253 | 253 | // TODO Переделать это под assign_vars_recursive и возвращать пустые строки если нет платежного метода - для унификации формы в темплейте |
254 | 254 | $template->assign_vars(array( |
255 | 255 | 'PAY_LINK_METHOD' => $pay_link['PAY_LINK_METHOD'], |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | } else { |
259 | 259 | throw new exception(classLocale::$lang['pay_msg_request_paylink_unsupported'], ERR_ERROR); |
260 | 260 | } |
261 | - } catch(exception $e) { |
|
261 | + } catch (exception $e) { |
|
262 | 262 | $template->assign_block_vars('result', $response = array( |
263 | 263 | 'STATUS' => $e->getCode(), |
264 | 264 | 'MESSAGE' => $e->getMessage(), |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | } |
269 | 269 | |
270 | 270 | // Прегенерированные пакеты |
271 | -foreach($unit_available_amount_list as $unit_amount => $discount) { |
|
271 | +foreach ($unit_available_amount_list as $unit_amount => $discount) { |
|
272 | 272 | $temp = sn_module_payment::currency_convert($unit_amount, 'MM_', $player_currency); |
273 | 273 | $template->assign_block_vars('mm_amount', array( |
274 | 274 | 'VALUE' => $unit_amount, |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | 'PLAYER_CURRENCY' => $player_currency, |
304 | 304 | 'PLAYER_CURRENCY_PRICE_PER_MM' => sn_module_payment::currency_convert(1, $player_currency, 'MM_', 10), |
305 | 305 | |
306 | - 'UNIT_AMOUNT' => (float)$request['metamatter'], |
|
306 | + 'UNIT_AMOUNT' => (float) $request['metamatter'], |
|
307 | 307 | 'UNIT_AMOUNT_TEXT' => pretty_number($request['metamatter']), |
308 | 308 | 'UNIT_AMOUNT_BONUS_PERCENT' => $bonus_percent, |
309 | 309 | 'UNIT_AMOUNT_TEXT_DISCOUNTED' => $income_metamatter_text, |
@@ -21,8 +21,8 @@ |
||
21 | 21 | $mode = sys_get_param_escaped('mode'); |
22 | 22 | $mode = (!$mode || $mode == 'buildings') ? QUE_STRUCTURES : ($mode == 'fleet' ? SUBQUE_FLEET : ($mode == 'defense' ? SUBQUE_DEFENSE : ($mode == 'research' ? QUE_RESEARCH : $mode))); |
23 | 23 | |
24 | -if($building_sort = sys_get_param_id('sort_elements')) { |
|
25 | - if(!empty(classLocale::$lang['player_option_building_sort'][$building_sort])) { |
|
24 | +if ($building_sort = sys_get_param_id('sort_elements')) { |
|
25 | + if (!empty(classLocale::$lang['player_option_building_sort'][$building_sort])) { |
|
26 | 26 | classSupernova::$user_options[array(PLAYER_OPTION_BUILDING_SORT, $mode)] = $building_sort; |
27 | 27 | classSupernova::$user_options[array(PLAYER_OPTION_BUILDING_SORT_INVERSE, $mode)] = sys_get_param_id('sort_elements_inverse', 0); |
28 | 28 | } |
@@ -21,12 +21,12 @@ discard block |
||
21 | 21 | |
22 | 22 | function sn_admin_planet_edit_template(&$template, $edit_planet_row, $mode) { |
23 | 23 | $unit_list = sn_get_groups($mode); |
24 | - if(empty($unit_list)) { |
|
24 | + if (empty($unit_list)) { |
|
25 | 25 | return; |
26 | 26 | } |
27 | 27 | $name_list = classLocale::$lang['tech']; |
28 | 28 | |
29 | - foreach($unit_list as $unit_id) { |
|
29 | + foreach ($unit_list as $unit_id) { |
|
30 | 30 | $template->assign_block_vars('unit', array( |
31 | 31 | 'ID' => $unit_id, |
32 | 32 | 'NAME' => $name_list[$unit_id], |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | function admin_planet_edit_query_string($unit_id, $unit_amount, $mode) { return sn_function_call(__FUNCTION__, array($unit_id, $unit_amount, $mode)); } |
40 | 40 | |
41 | 41 | function sn_admin_planet_edit_query_string($unit_id, $unit_amount, $mode) { |
42 | - if($unit_amount && in_array($unit_id, sn_get_groups($mode))) { |
|
42 | + if ($unit_amount && in_array($unit_id, sn_get_groups($mode))) { |
|
43 | 43 | $unit_amount = round($unit_amount); |
44 | 44 | $unit_name = get_unit_param($unit_id, P_NAME); |
45 | 45 | $result = "{$unit_name} = GREATEST(0, {$unit_name} + ({$unit_amount}))"; |
@@ -253,9 +253,11 @@ |
||
253 | 253 | } |
254 | 254 | |
255 | 255 | // Если новая планета не найдена или было переключения - проверяем текущую выбранную планету |
256 | - if(!isset($planet_row['id'])) // || $planet_row['id'] != $user['current_planet'] |
|
256 | + if(!isset($planet_row['id'])) { |
|
257 | + // || $planet_row['id'] != $user['current_planet'] |
|
257 | 258 | { |
258 | 259 | $planet_row = db_planet_by_id_and_owner($user['current_planet'], $user['id'], false, 'id'); |
260 | + } |
|
259 | 261 | // Если текущей планеты не существует - выставляем Столицу |
260 | 262 | if(!isset($planet_row['id'])) { |
261 | 263 | $planet_row = db_planet_by_id_and_owner($user['id_planet'], $user['id'], false, 'id'); |
@@ -11,12 +11,12 @@ discard block |
||
11 | 11 | |
12 | 12 | $possible_cores = array(); |
13 | 13 | $probability = 0; |
14 | - foreach($density_list as $possible_core_id => $core_data) { |
|
15 | - if(!$core_data[UNIT_PLANET_DENSITY_RARITY]) { |
|
14 | + foreach ($density_list as $possible_core_id => $core_data) { |
|
15 | + if (!$core_data[UNIT_PLANET_DENSITY_RARITY]) { |
|
16 | 16 | continue; |
17 | 17 | } |
18 | 18 | |
19 | - if( |
|
19 | + if ( |
|
20 | 20 | // Core type exists |
21 | 21 | in_array($possible_core_id, $position_data['core_types']) |
22 | 22 | // Limit core type with planet sector count |
@@ -37,8 +37,8 @@ discard block |
||
37 | 37 | |
38 | 38 | $random = mt_rand(1, $probability); |
39 | 39 | $selected_core = null; |
40 | - foreach($possible_cores as $core_type => $core_info) { |
|
41 | - if($random <= $core_info[UNIT_PLANET_DENSITY_RARITY]) { |
|
40 | + foreach ($possible_cores as $core_type => $core_info) { |
|
41 | + if ($random <= $core_info[UNIT_PLANET_DENSITY_RARITY]) { |
|
42 | 42 | $selected_core = $core_info; |
43 | 43 | break; |
44 | 44 | } |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | function uni_create_planet($Galaxy, $System, $Position, $PlanetOwnerID, $planet_name_unsafe = '', $HomeWorld = false, $options = array()) { |
62 | 62 | $Position = intval($Position); |
63 | 63 | |
64 | - if(!isset($options['skip_check']) && DBStaticPlanet::db_planet_by_gspt($Galaxy, $System, $Position, PT_PLANET, true, '`id`')) { |
|
64 | + if (!isset($options['skip_check']) && DBStaticPlanet::db_planet_by_gspt($Galaxy, $System, $Position, PT_PLANET, true, '`id`')) { |
|
65 | 65 | return false; |
66 | 66 | } |
67 | 67 | |
@@ -70,11 +70,11 @@ discard block |
||
70 | 70 | |
71 | 71 | $planet_generator = sn_get_groups('planet_generator'); |
72 | 72 | |
73 | - if($HomeWorld) { |
|
73 | + if ($HomeWorld) { |
|
74 | 74 | $position_data = $planet_generator[0]; |
75 | 75 | } else { |
76 | 76 | $position_data = $planet_generator[$Position >= UNIVERSE_RANDOM_PLANET_START || $Position < 1 ? UNIVERSE_RANDOM_PLANET_START : $Position]; |
77 | - if($Position >= UNIVERSE_RANDOM_PLANET_START) { |
|
77 | + if ($Position >= UNIVERSE_RANDOM_PLANET_START) { |
|
78 | 78 | // Корректируем температуру для планеты-странника |
79 | 79 | $position_data['t_max_max'] -= UNIVERSE_RANDOM_PLANET_TEMPERATURE_DECREASE * ($Position - UNIVERSE_RANDOM_PLANET_START); |
80 | 80 | } |
@@ -165,15 +165,15 @@ discard block |
||
165 | 165 | $moon_name = ''; |
166 | 166 | $moon_row = array(); |
167 | 167 | $moon = DBStaticPlanet::db_planet_by_gspt($pos_galaxy, $pos_system, $pos_planet, PT_MOON, false, 'id'); |
168 | - if(!$moon['id']) { |
|
168 | + if (!$moon['id']) { |
|
169 | 169 | $moon_planet = DBStaticPlanet::db_planet_by_gspt($pos_galaxy, $pos_system, $pos_planet, PT_PLANET, true, '`id`, `temp_min`, `temp_max`, `name`, `debris_metal`, `debris_crystal`'); |
170 | 170 | |
171 | - if($moon_planet['id']) { |
|
171 | + if ($moon_planet['id']) { |
|
172 | 172 | $base_storage_size = BASE_STORAGE_SIZE; |
173 | 173 | |
174 | - if(!$moon_chance) { |
|
174 | + if (!$moon_chance) { |
|
175 | 175 | $size = mt_rand(1100, 8999); |
176 | - } elseif($moon_chance <= 100) { |
|
176 | + } elseif ($moon_chance <= 100) { |
|
177 | 177 | $size = mt_rand($moon_chance * 100 + 1000, $moon_chance * 200 + 2999); |
178 | 178 | } else { |
179 | 179 | $size = $moon_chance; |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | |
189 | 189 | $field_max = ceil($size / 1000); |
190 | 190 | |
191 | - if(isset($options['image']) && $options['image']) { |
|
191 | + if (isset($options['image']) && $options['image']) { |
|
192 | 192 | $moon_image = $options['image']; |
193 | 193 | } else { |
194 | 194 | $moon_image = 'mond'; |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | 'deuterium_max' => $base_storage_size, |
222 | 222 | )); |
223 | 223 | |
224 | - if($update_debris) { |
|
224 | + if ($update_debris) { |
|
225 | 225 | $debris_spent = $moon_chance * 1000000; |
226 | 226 | $metal_spent = round(min($moon_planet['debris_metal'], $debris_spent * mt_rand(50, 75) / 100)); |
227 | 227 | $crystal_spent = min($moon_planet['debris_crystal'], $debris_spent - $metal_spent); |
@@ -229,8 +229,8 @@ discard block |
||
229 | 229 | DBStaticPlanet::db_planet_update_adjust_by_id( |
230 | 230 | $moon_planet['id'], |
231 | 231 | array( |
232 | - 'debris_metal' => -$metal_spent, // `debris_metal` = GREATEST(0, `debris_metal` - {$metal_spent}) |
|
233 | - 'debris_crystal' => -$crystal_spent, // `debris_crystal` = GREATEST(0, `debris_crystal` - {$crystal_spent}) |
|
232 | + 'debris_metal' => -$metal_spent, // `debris_metal` = GREATEST(0, `debris_metal` - {$metal_spent}) |
|
233 | + 'debris_crystal' => -$crystal_spent, // `debris_crystal` = GREATEST(0, `debris_crystal` - {$crystal_spent}) |
|
234 | 234 | ) |
235 | 235 | ); |
236 | 236 | } |
@@ -262,28 +262,28 @@ discard block |
||
262 | 262 | $planet_row['id'] = $user['current_planet']; |
263 | 263 | |
264 | 264 | // Пытаемся переключить на новую планету |
265 | - if(($selected_planet = sys_get_param_id('cp')) && $selected_planet != $user['current_planet']) { |
|
265 | + if (($selected_planet = sys_get_param_id('cp')) && $selected_planet != $user['current_planet']) { |
|
266 | 266 | $planet_row = DBStaticPlanet::db_planet_by_id_and_owner($selected_planet, $user['id'], false, 'id'); |
267 | 267 | } else { |
268 | 268 | $planet_row = DBStaticPlanet::db_planet_by_id($planet_row['id']); |
269 | 269 | } |
270 | 270 | |
271 | 271 | // Если новая планета не найдена или было переключения - проверяем текущую выбранную планету |
272 | - if(!isset($planet_row['id'])) // || $planet_row['id'] != $user['current_planet'] |
|
272 | + if (!isset($planet_row['id'])) // || $planet_row['id'] != $user['current_planet'] |
|
273 | 273 | { |
274 | 274 | $planet_row = DBStaticPlanet::db_planet_by_id_and_owner($user['current_planet'], $user['id'], false, 'id'); |
275 | 275 | // Если текущей планеты не существует - выставляем Столицу |
276 | - if(!isset($planet_row['id'])) { |
|
276 | + if (!isset($planet_row['id'])) { |
|
277 | 277 | $planet_row = DBStaticPlanet::db_planet_by_id_and_owner($user['id_planet'], $user['id'], false, 'id'); |
278 | 278 | // Если и столицы не существует - значит что-то очень не так с записью пользователя |
279 | - if(!isset($planet_row['id'])) { |
|
279 | + if (!isset($planet_row['id'])) { |
|
280 | 280 | classSupernova::$debug->error("User ID {$user['id']} has Capital planet {$user['id_planet']} but this planet does not exists", 'User record error', 502); |
281 | 281 | } |
282 | 282 | } |
283 | 283 | } |
284 | 284 | |
285 | 285 | // Если производилось переключение планеты - делаем запись в юзере |
286 | - if($user['current_planet'] != $planet_row['id']) { |
|
286 | + if ($user['current_planet'] != $planet_row['id']) { |
|
287 | 287 | $user['current_planet'] = $planet_row['id']; |
288 | 288 | DBStaticUser::db_user_set_by_id( |
289 | 289 | $user['id'], |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | } |
314 | 314 | |
315 | 315 | function uni_render_planet_full($from, $prefix = '', $html_safe = true, $include_id = false) { |
316 | - if(!$from['id']) { |
|
316 | + if (!$from['id']) { |
|
317 | 317 | $result = classLocale::$lang['sys_planet_expedition']; |
318 | 318 | } else { |
319 | 319 | $from_planet_id = $include_id ? ( |
@@ -363,30 +363,30 @@ discard block |
||
363 | 363 | $coordinates["{$prefix}planet"] = intval($coordinates["{$prefix}planet"]); |
364 | 364 | |
365 | 365 | return |
366 | - isset($coordinates["{$prefix}galaxy"]) && $coordinates["{$prefix}galaxy"] > 0 && $coordinates["{$prefix}galaxy"] <= Vector::$knownGalaxies&& |
|
367 | - isset($coordinates["{$prefix}system"]) && $coordinates["{$prefix}system"] > 0 && $coordinates["{$prefix}system"] <= Vector::$knownSystems&& |
|
366 | + isset($coordinates["{$prefix}galaxy"]) && $coordinates["{$prefix}galaxy"] > 0 && $coordinates["{$prefix}galaxy"] <= Vector::$knownGalaxies && |
|
367 | + isset($coordinates["{$prefix}system"]) && $coordinates["{$prefix}system"] > 0 && $coordinates["{$prefix}system"] <= Vector::$knownSystems && |
|
368 | 368 | isset($coordinates["{$prefix}planet"]) && $coordinates["{$prefix}planet"] > 0 && $coordinates["{$prefix}planet"] <= Vector::$knownPlanets; |
369 | 369 | } |
370 | 370 | |
371 | 371 | function uni_planet_teleport_check($user, $planetrow, $new_coordinates = null) { |
372 | 372 | try { |
373 | - if($planetrow['planet_teleport_next'] && $planetrow['planet_teleport_next'] > SN_TIME_NOW) { |
|
373 | + if ($planetrow['planet_teleport_next'] && $planetrow['planet_teleport_next'] > SN_TIME_NOW) { |
|
374 | 374 | throw new exception(classLocale::$lang['ov_teleport_err_cooldown'], ERR_ERROR); |
375 | 375 | } |
376 | 376 | |
377 | - if(mrc_get_level($user, null, RES_DARK_MATTER) < classSupernova::$config->planet_teleport_cost) { |
|
377 | + if (mrc_get_level($user, null, RES_DARK_MATTER) < classSupernova::$config->planet_teleport_cost) { |
|
378 | 378 | throw new exception(classLocale::$lang['ov_teleport_err_no_dark_matter'], ERR_ERROR); |
379 | 379 | } |
380 | 380 | |
381 | 381 | // TODO: Replace quick-check with using gathered flying fleet data |
382 | - if(FleetList::fleet_count_incoming($planetrow['galaxy'], $planetrow['system'], $planetrow['planet'])) { |
|
382 | + if (FleetList::fleet_count_incoming($planetrow['galaxy'], $planetrow['system'], $planetrow['planet'])) { |
|
383 | 383 | throw new exception(classLocale::$lang['ov_teleport_err_fleet'], ERR_ERROR); |
384 | 384 | } |
385 | 385 | |
386 | - if(is_array($new_coordinates)) { |
|
386 | + if (is_array($new_coordinates)) { |
|
387 | 387 | $new_coordinates['planet_type'] = PT_PLANET; |
388 | 388 | $incoming = DBStaticPlanet::db_planet_by_vector($new_coordinates, '', true, 'id'); |
389 | - if($incoming['id']) { |
|
389 | + if ($incoming['id']) { |
|
390 | 390 | throw new exception(classLocale::$lang['ov_teleport_err_destination_busy'], ERR_ERROR); |
391 | 391 | } |
392 | 392 | } |
@@ -395,7 +395,7 @@ discard block |
||
395 | 395 | 'result' => ERR_NONE, |
396 | 396 | 'message' => '', |
397 | 397 | ); |
398 | - } catch(exception $e) { |
|
398 | + } catch (exception $e) { |
|
399 | 399 | $response = array( |
400 | 400 | 'result' => $e->getCode(), |
401 | 401 | 'message' => $e->getMessage(), |
@@ -22,17 +22,17 @@ discard block |
||
22 | 22 | $sn_group_factories = sn_get_groups('factories'); |
23 | 23 | $planet_density = sn_get_groups('planet_density'); |
24 | 24 | |
25 | - if(sys_get_param('save_production')) { |
|
25 | + if (sys_get_param('save_production')) { |
|
26 | 26 | $production = sys_get_param('percent'); |
27 | - if(is_array($production) && !empty($production)) { |
|
27 | + if (is_array($production) && !empty($production)) { |
|
28 | 28 | // sn_db_transaction_start(); |
29 | 29 | $query = array(); |
30 | 30 | $planet_row_list = db_planet_list_sorted($user, false, '*'); |
31 | 31 | // while($planet = db_fetch($planet_row_list)) |
32 | - foreach($planet_row_list as $planet) { |
|
33 | - foreach($sn_group_factories as $factory_unit_id) { |
|
32 | + foreach ($planet_row_list as $planet) { |
|
33 | + foreach ($sn_group_factories as $factory_unit_id) { |
|
34 | 34 | $unit_db_name_porcent = pname_factory_production_field_name($factory_unit_id); |
35 | - if( |
|
35 | + if ( |
|
36 | 36 | get_unit_param($factory_unit_id, P_MINING_IS_MANAGED) |
37 | 37 | && isset($production[$factory_unit_id][$planet['id']]) |
38 | 38 | && ($actual_porcent = intval($production[$factory_unit_id][$planet['id']] / 10)) >= 0 |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | } |
44 | 44 | } |
45 | 45 | } |
46 | - foreach($query as $planet_id => $query_data) { |
|
46 | + foreach ($query as $planet_id => $query_data) { |
|
47 | 47 | db_planet_set_by_id($planet_id, implode(',', $query_data)); |
48 | 48 | } |
49 | 49 | // sn_db_transaction_commit(); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | |
53 | 53 | $planet_row_list = db_planet_list_sorted($user); |
54 | 54 | // while ($planet = db_fetch($planet_row_list)) |
55 | - foreach($planet_row_list as $planet) { |
|
55 | + foreach ($planet_row_list as $planet) { |
|
56 | 56 | sn_db_transaction_start(); |
57 | 57 | $global_data = sys_o_get_updated($user, $planet['id'], SN_TIME_NOW, false, true); |
58 | 58 | $planets[$planet['id']] = $global_data['planet']; |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | $template = gettemplate('imperium', $template); |
65 | 65 | $template->assign_var('amount', count($planets) + 2); |
66 | 66 | |
67 | - for($i = 100; $i >= 0; $i -= 10) { |
|
67 | + for ($i = 100; $i >= 0; $i -= 10) { |
|
68 | 68 | $template->assign_block_vars('percent', array('PERCENT' => $i)); |
69 | 69 | } |
70 | 70 | |
@@ -74,13 +74,13 @@ discard block |
||
74 | 74 | $total['temp_min'] = 1000; |
75 | 75 | $total['temp_max'] = -999; |
76 | 76 | |
77 | - foreach($planets as $planet_index => &$planet) { |
|
77 | + foreach ($planets as $planet_index => &$planet) { |
|
78 | 78 | $list_planet_que = $ques[$planet_index]; |
79 | 79 | $planet_template = tpl_parse_planet($planet); |
80 | 80 | |
81 | 81 | $planet_fleet_id = 0; |
82 | - $fleet_list = $planet_template['fleet_list'];//flt_get_fleets_to_planet($planet); |
|
83 | - if($fleet_list['own']['count']) { |
|
82 | + $fleet_list = $planet_template['fleet_list']; //flt_get_fleets_to_planet($planet); |
|
83 | + if ($fleet_list['own']['count']) { |
|
84 | 84 | $planet_fleet_id = "p{$fleet_id}"; |
85 | 85 | $fleets[] = tpl_parse_fleet_sn($fleet_list['own']['total'], $planet_fleet_id); |
86 | 86 | $fleet_id++; |
@@ -141,17 +141,17 @@ discard block |
||
141 | 141 | UNIT_DEFENCE => 'defense', |
142 | 142 | ); |
143 | 143 | |
144 | - foreach($show_groups as $unit_group_id => $mode) { |
|
144 | + foreach ($show_groups as $unit_group_id => $mode) { |
|
145 | 145 | $template->assign_block_vars('prods', array( |
146 | 146 | 'NAME' => classLocale::$lang['tech'][$unit_group_id], |
147 | 147 | )); |
148 | 148 | $unit_group = get_unit_param('techtree', $unit_group_id); |
149 | - foreach($unit_group as $unit_id) { |
|
149 | + foreach ($unit_group as $unit_id) { |
|
150 | 150 | $unit_count = $unit_count_abs = 0; |
151 | 151 | $block_vars = array(); |
152 | 152 | $unit_is_factory = in_array($unit_id, $sn_group_factories) && get_unit_param($unit_id, P_MINING_IS_MANAGED); |
153 | 153 | // $unit_db_name = pname_resource_name($unit_id); |
154 | - foreach($planets as $planet) { |
|
154 | + foreach ($planets as $planet) { |
|
155 | 155 | $unit_level_plain = mrc_get_level($user, $planet, $unit_id, false, true); |
156 | 156 | |
157 | 157 | $level_plus['FACTORY'] = $unit_is_factory; |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | $level_plus['LEVEL_PLUS_GREEN'] = 0; |
160 | 160 | |
161 | 161 | $level_plus['PERCENT'] = $unit_is_factory ? ($unit_level_plain ? $planet[pname_factory_production_field_name($unit_id)] * 10 : -1) : -1; |
162 | - switch($mode) { |
|
162 | + switch ($mode) { |
|
163 | 163 | /* |
164 | 164 | case 'structures': |
165 | 165 | $level_plus_build = $ques[$planet['id']]['in_que'][que_get_unit_que($unit_id)][$user['id']][$planet['id']][$unit_id]; |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | case 'structures': |
180 | 180 | case 'defense': |
181 | 181 | $level_plus_build = $ques[$planet['id']]['in_que'][que_get_unit_que($unit_id)][$user['id']][$planet['id']][$unit_id]; |
182 | - if($level_plus_build) { |
|
182 | + if ($level_plus_build) { |
|
183 | 183 | $level_plus['LEVEL_PLUS_GREEN'] = $level_plus_build < 0 ? $level_plus_build : "+{$level_plus_build}"; |
184 | 184 | // $level_plus['LEVEL_PLUS_GREEN'] = "+{$level_plus_build}"; |
185 | 185 | $total['units'][$unit_id]['LEVEL_PLUS_GREEN'] += $level_plus['LEVEL_PLUS_GREEN']; |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | $unit_count_abs += $unit_level_plain + abs($level_plus['LEVEL_PLUS_YELLOW']) + abs($level_plus['LEVEL_PLUS_GREEN']); |
200 | 200 | } |
201 | 201 | |
202 | - if($unit_count_abs) { |
|
202 | + if ($unit_count_abs) { |
|
203 | 203 | $template->assign_block_vars('prods', array( |
204 | 204 | 'ID' => $unit_id, |
205 | 205 | 'FIELD' => 'unit_' . $unit_id, // pname_resource_name($unit_id), // TODO Делать это прямо в темплейте |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | 'MODE' => $mode, |
208 | 208 | )); |
209 | 209 | |
210 | - foreach($block_vars as $block_var) { |
|
210 | + foreach ($block_vars as $block_var) { |
|
211 | 211 | $template->assign_block_vars('prods.planet', $block_var); |
212 | 212 | } |
213 | 213 | $unit_green = $total['units'][$unit_id]['LEVEL_PLUS_GREEN']; |
@@ -16,7 +16,7 @@ |
||
16 | 16 | $query = db_user_list("`authlevel` > 0 ORDER BY `authlevel` ASC"); |
17 | 17 | |
18 | 18 | // while($row = db_fetch($query)) |
19 | - foreach($query as $row) { |
|
19 | + foreach ($query as $row) { |
|
20 | 20 | $template_result['.']['contact'][] = array( |
21 | 21 | 'NAME' => $row['username'], |
22 | 22 | 'LEVEL' => classLocale::$lang['user_level'][$row['authlevel']], |
@@ -2,31 +2,31 @@ discard block |
||
2 | 2 | |
3 | 3 | $classLocale = classLocale::$lang; |
4 | 4 | |
5 | -if(!defined('SN_IN_ALLY') || SN_IN_ALLY !== true) { |
|
5 | +if (!defined('SN_IN_ALLY') || SN_IN_ALLY !== true) { |
|
6 | 6 | $debug->error("Attempt to call ALLIANCE page mode {$mode} directly - not from alliance.php", 'Forbidden', 403); |
7 | 7 | } |
8 | 8 | |
9 | 9 | // Changing rank for single user |
10 | 10 | $id_user = sys_get_param_id('id_user'); |
11 | -if(isset($_GET['id_rank'])) { |
|
11 | +if (isset($_GET['id_rank'])) { |
|
12 | 12 | $id_rank = sys_get_param_int('id_rank'); |
13 | 13 | } |
14 | -if($id_user && isset($id_rank) && $user_admin) { |
|
14 | +if ($id_user && isset($id_rank) && $user_admin) { |
|
15 | 15 | db_user_set_by_id($id_user, "`ally_rank_id` = {$id_rank}"); |
16 | 16 | } |
17 | 17 | |
18 | 18 | $id_kick = sys_get_param_id('kick'); |
19 | 19 | |
20 | -if($id_kick && $user_can_kick) { |
|
20 | +if ($id_kick && $user_can_kick) { |
|
21 | 21 | $u = db_user_by_id($id_kick, true); |
22 | - if($u['ally_id'] == $ally['id'] && $u['id'] != $ally['ally_owner']) { |
|
22 | + if ($u['ally_id'] == $ally['id'] && $u['id'] != $ally['ally_owner']) { |
|
23 | 23 | db_user_set_by_id($id_kick, '`ally_id`= null, `ally_name` = null, `ally_tag` = null, ally_register_time = 0, ally_rank_id = 0'); |
24 | 24 | db_ally_update_member_decrease($ally); |
25 | 25 | } |
26 | 26 | } |
27 | 27 | |
28 | 28 | $sort2 = sys_get_param_int('sort2'); |
29 | -if($sort2) { |
|
29 | +if ($sort2) { |
|
30 | 30 | $sort2s = "DESC"; |
31 | 31 | $sort2 = 0; |
32 | 32 | } else { |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | } |
36 | 36 | |
37 | 37 | $sort1 = sys_get_param_int('sort1'); |
38 | -if($sort1 > 5 || $sort1 < 0) { |
|
38 | +if ($sort1 > 5 || $sort1 < 0) { |
|
39 | 39 | $sort1 = 0; |
40 | 40 | } |
41 | 41 | $sort1s = array( |
@@ -53,21 +53,21 @@ discard block |
||
53 | 53 | 'id, username, galaxy, system, planet, onlinetime, ally_rank_id, ally_register_time, total_points'); |
54 | 54 | |
55 | 55 | // while ($userRow = db_fetch($userList)) |
56 | -foreach($userList as $userRow) { |
|
56 | +foreach ($userList as $userRow) { |
|
57 | 57 | $i++; |
58 | - if(!isset($ranks[$userRow['ally_rank_id']])) { |
|
58 | + if (!isset($ranks[$userRow['ally_rank_id']])) { |
|
59 | 59 | $userRow['ally_rank_id'] = 0; |
60 | 60 | } |
61 | 61 | |
62 | - if($ally['ally_owner'] == $userRow['id']) { |
|
62 | + if ($ally['ally_owner'] == $userRow['id']) { |
|
63 | 63 | $ally_range = ($ally['ally_owner_range']) ? $ally['ally_owner_range'] : classLocale::$lang['Founder']; |
64 | 64 | } else { |
65 | - if($user_admin) { |
|
65 | + if ($user_admin) { |
|
66 | 66 | $ally_range = '<select onchange="window.location=\'alliance.php?mode=admin&edit=members&id_user=' . $userRow['id'] . '&id_rank=\' + this.value">'; |
67 | 67 | |
68 | - foreach($ranks as $rankID => $rankArray) { |
|
68 | + foreach ($ranks as $rankID => $rankArray) { |
|
69 | 69 | $ally_range .= '<option value="' . $rankID . '"'; |
70 | - if($rankID == $userRow['ally_rank_id']) { |
|
70 | + if ($rankID == $userRow['ally_rank_id']) { |
|
71 | 71 | $ally_range .= " selected"; |
72 | 72 | } |
73 | 73 | $ally_range .= '>' . $rankArray['name']; |
@@ -80,20 +80,20 @@ discard block |
||
80 | 80 | } |
81 | 81 | |
82 | 82 | $last_active = time() - $userRow["onlinetime"]; |
83 | - if($user_admin) { |
|
84 | - if($last_active < 60) { |
|
83 | + if ($user_admin) { |
|
84 | + if ($last_active < 60) { |
|
85 | 85 | $tmp = "lime>{$classLocale['On']}"; |
86 | - } elseif($last_active < 60 * 60) { |
|
86 | + } elseif ($last_active < 60 * 60) { |
|
87 | 87 | $last_active = round($last_active / 60); |
88 | 88 | $tmp = "lime>{$last_active} {$classLocale['sys_min_short']}"; |
89 | - } elseif($last_active < 60 * 60 * 24) { |
|
89 | + } elseif ($last_active < 60 * 60 * 24) { |
|
90 | 90 | $last_active = round($last_active / (60 * 60)); |
91 | 91 | $tmp = "green>{$last_active} {$classLocale['sys_hrs_short']}"; |
92 | 92 | } else { |
93 | 93 | $last_active = round($last_active / (60 * 60 * 24)); |
94 | - if($last_active < 7) { |
|
94 | + if ($last_active < 7) { |
|
95 | 95 | $tmp = "yellow"; |
96 | - } elseif($last_active < 30) { |
|
96 | + } elseif ($last_active < 30) { |
|
97 | 97 | $tmp = "orange"; |
98 | 98 | } else { |
99 | 99 | $tmp = "red"; |
@@ -101,10 +101,10 @@ discard block |
||
101 | 101 | $tmp .= ">{$last_active} {$classLocale['sys_day_short']}"; |
102 | 102 | } |
103 | 103 | } else { |
104 | - if($user_onlinestatus) { |
|
105 | - if($last_active < 60 * 5) { |
|
104 | + if ($user_onlinestatus) { |
|
105 | + if ($last_active < 60 * 5) { |
|
106 | 106 | $tmp = "lime>{$classLocale['On']}"; |
107 | - } elseif($last_active < 60 * 15) { |
|
107 | + } elseif ($last_active < 60 * 15) { |
|
108 | 108 | $tmp = "yellow>{$classLocale['ali_lessThen15min']}"; |
109 | 109 | } else { |
110 | 110 | $tmp = "red>{$classLocale['Off']}"; |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | )); |
132 | 132 | } |
133 | 133 | |
134 | -if($i != $ally['ally_members']) { |
|
134 | +if ($i != $ally['ally_members']) { |
|
135 | 135 | db_ally_update_member_set($i, $ally); |
136 | 136 | } |
137 | 137 |