@@ -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']; |
@@ -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 | |
@@ -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(); |
@@ -115,8 +115,7 @@ |
||
| 115 | 115 | )); |
| 116 | 116 | |
| 117 | 117 | display($template, $lang['tech'][STRUC_MOON_GATE]); |
| 118 | - } |
|
| 119 | - else |
|
| 118 | + } else |
|
| 120 | 119 | { |
| 121 | 120 | messageBox($lang['gate_no_src_ga'], $lang['tech'][STRUC_MOON_GATE], "overview.php", 10); |
| 122 | 121 | } |
@@ -74,14 +74,12 @@ discard block |
||
| 74 | 74 | doquery("UPDATE {{alliance}} SET " . implode(',', $ally_changeset) . " WHERE `id`='{$ally['id']}' LIMIT 1;"); |
| 75 | 75 | sys_redirect('alliance.php?mode=admin&edit=ally'); |
| 76 | 76 | } |
| 77 | -} |
|
| 78 | -elseif(sys_get_param_str('isSaveText')) |
|
| 77 | +} elseif(sys_get_param_str('isSaveText')) |
|
| 79 | 78 | { |
| 80 | 79 | $text = sys_get_param_str_both('text'); |
| 81 | 80 | doquery("UPDATE {{alliance}} SET `{$text_list[$allyTextID]['db_field']}`='{$text['safe']}' WHERE `id`='{$ally['id']}';"); |
| 82 | 81 | $ally[$text_list[$allyTextID]['db_field']] = $text['unsafe']; |
| 83 | -} |
|
| 84 | -elseif(sys_get_param_str('isTransfer') && $idNewLeader = sys_get_param_id('idNewLeader')) |
|
| 82 | +} elseif(sys_get_param_str('isTransfer') && $idNewLeader = sys_get_param_id('idNewLeader')) |
|
| 85 | 83 | { |
| 86 | 84 | if(!$isAllyOwner) |
| 87 | 85 | { |
@@ -98,8 +96,7 @@ discard block |
||
| 98 | 96 | sn_db_transaction_commit(); |
| 99 | 97 | sys_redirect('alliance.php'); |
| 100 | 98 | } |
| 101 | -} |
|
| 102 | -elseif(sys_get_param_str('isDisband') && sys_get_param_str('isConfirmDisband')) |
|
| 99 | +} elseif(sys_get_param_str('isDisband') && sys_get_param_str('isConfirmDisband')) |
|
| 103 | 100 | { |
| 104 | 101 | if(!$isAllyOwner) |
| 105 | 102 | { |
@@ -23,16 +23,14 @@ discard block |
||
| 23 | 23 | $lang['Go_out_welldone'] = str_replace("%s", $ally_name, $lang['Go_out_welldone']); |
| 24 | 24 | messageBox(sprintf($lang['ali_info_leave_success'], $ally['ally_name']), $lang['sys_alliance']); |
| 25 | 25 | } |
| 26 | -} |
|
| 27 | -elseif($mode == 'ainfo') |
|
| 26 | +} elseif($mode == 'ainfo') |
|
| 28 | 27 | { |
| 29 | 28 | $tag = sys_get_param_str('tag'); |
| 30 | 29 | $id_ally = sys_get_param_id('a'); |
| 31 | 30 | if($tag) |
| 32 | 31 | { |
| 33 | 32 | $ally = doquery("SELECT * FROM {{alliance}} WHERE ally_tag='{$tag}' LIMIT 1;", '', true); |
| 34 | - } |
|
| 35 | - elseif($id_ally) |
|
| 33 | + } elseif($id_ally) |
|
| 36 | 34 | { |
| 37 | 35 | $ally = doquery("SELECT * FROM {{alliance}} WHERE id='{$id_ally}' LIMIT 1;", '', true); |
| 38 | 36 | } |
@@ -52,20 +50,17 @@ discard block |
||
| 52 | 50 | 'USER_ALLY_ID' => $user['ally_id'], |
| 53 | 51 | )); |
| 54 | 52 | $page_header = $lang['sys_alliance']; |
| 55 | -} |
|
| 56 | -else |
|
| 53 | +} else |
|
| 57 | 54 | { |
| 58 | 55 | $page_header = $lang['your_alliance']; |
| 59 | 56 | |
| 60 | 57 | if($ally['ally_owner'] == $user['id']) |
| 61 | 58 | { |
| 62 | 59 | $range = $ally['ally_owner_range'] ? $ally['ally_owner_range'] : $lang['Founder']; |
| 63 | - } |
|
| 64 | - elseif($user['ally_rank_id'] != 0 && isset($ranks[$user['ally_rank_id']]['name'])) |
|
| 60 | + } elseif($user['ally_rank_id'] != 0 && isset($ranks[$user['ally_rank_id']]['name'])) |
|
| 65 | 61 | { |
| 66 | 62 | $range = $ranks[$user['ally_rank_id']]['name']; |
| 67 | - } |
|
| 68 | - else |
|
| 63 | + } else |
|
| 69 | 64 | { |
| 70 | 65 | $range = $lang['member']; |
| 71 | 66 | } |
@@ -37,8 +37,7 @@ |
||
| 37 | 37 | </script>'; |
| 38 | 38 | |
| 39 | 39 | messageBoxAdmin("{$script}<img src=\"design/images/progressbar.gif\"><br>{$lang['sys_wait']}", $lang['adm_stat_title'], '', 0); |
| 40 | -} |
|
| 41 | -else |
|
| 40 | +} else |
|
| 42 | 41 | { |
| 43 | 42 | messageBoxAdmin($lang['adm_stat_already_started'], $lang['adm_stat_title'], 'admin/overview.php'); |
| 44 | 43 | } |
@@ -4,8 +4,7 @@ discard block |
||
| 4 | 4 | * |
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | -function sn_chat_model() |
|
| 8 | -{ |
|
| 7 | +function sn_chat_model() { |
|
| 9 | 8 | global $config, $user, $template_result, $lang; |
| 10 | 9 | |
| 11 | 10 | $config->array_set('users', $user['id'], 'chat_last_activity', SN_TIME_MICRO); |
@@ -44,15 +43,13 @@ discard block |
||
| 44 | 43 | |
| 45 | 44 | $template_result['PAGE_HEADER'] = $page_title; |
| 46 | 45 | } |
| 47 | -function sn_chat_view($template = null) |
|
| 48 | -{ |
|
| 46 | +function sn_chat_view($template = null) { |
|
| 49 | 47 | $template = gettemplate('chat_body', $template); |
| 50 | 48 | |
| 51 | 49 | return $template; |
| 52 | 50 | } |
| 53 | 51 | |
| 54 | -function sn_chat_add_model() |
|
| 55 | -{ |
|
| 52 | +function sn_chat_add_model() { |
|
| 56 | 53 | global $config, $user; |
| 57 | 54 | |
| 58 | 55 | define('IN_AJAX', true); |
@@ -76,8 +73,7 @@ discard block |
||
| 76 | 73 | |
| 77 | 74 | die(); |
| 78 | 75 | } |
| 79 | -function sn_chat_msg_view($template = null) |
|
| 80 | -{ |
|
| 76 | +function sn_chat_msg_view($template = null) { |
|
| 81 | 77 | global $config, $user, $lang; |
| 82 | 78 | |
| 83 | 79 | define('IN_AJAX', true); |
@@ -99,8 +95,7 @@ discard block |
||
| 99 | 95 | 'TIME' => date(FMT_DATE_TIME, htmlentities(SN_CLIENT_TIME_LOCAL, ENT_QUOTES, 'utf-8')), |
| 100 | 96 | 'DISABLE' => true, |
| 101 | 97 | ); |
| 102 | - } |
|
| 103 | - else |
|
| 98 | + } else |
|
| 104 | 99 | { |
| 105 | 100 | $alliance = sys_get_param_str('ally') && $user['ally_id'] ? $user['ally_id'] : 0; |
| 106 | 101 | |
@@ -121,8 +116,7 @@ discard block |
||
| 121 | 116 | } |
| 122 | 117 | |
| 123 | 118 | $page = min($page_count, max(0, sys_get_param_int('sheet'))); |
| 124 | - } |
|
| 125 | - else |
|
| 119 | + } else |
|
| 126 | 120 | { |
| 127 | 121 | $last_message = sys_get_param_id('last_message'); |
| 128 | 122 | $where_add = $last_message ? "AND `messageid` > {$last_message}" : ''; |
@@ -171,8 +165,7 @@ discard block |
||
| 171 | 165 | { |
| 172 | 166 | $pageTitle = "{$lang['chat_history']} - {$lang[$alliance ? 'chat_ally' : 'chat_common']}"; |
| 173 | 167 | display($template, $pageTitle); |
| 174 | - } |
|
| 175 | - else |
|
| 168 | + } else |
|
| 176 | 169 | { |
| 177 | 170 | $result['last_message'] = $last_message; |
| 178 | 171 | $result['html'] = templateRenderToHtml($template); |
@@ -1,8 +1,7 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | function admin_planet_edit_mode(&$template, &$admin_planet_edit_mode_list){return sn_function_call('admin_planet_edit_mode', array(&$template, &$admin_planet_edit_mode_list));} |
| 4 | -function sn_admin_planet_edit_mode(&$template, &$admin_planet_edit_mode_list) |
|
| 5 | -{ |
|
| 4 | +function sn_admin_planet_edit_mode(&$template, &$admin_planet_edit_mode_list) { |
|
| 6 | 5 | global $lang; |
| 7 | 6 | |
| 8 | 7 | $admin_planet_edit_mode_list = array_merge(isset($admin_planet_edit_mode_list) ? $admin_planet_edit_mode_list : array(), array( |
@@ -25,8 +24,7 @@ discard block |
||
| 25 | 24 | * @param $edit_planet_row |
| 26 | 25 | * @param $mode |
| 27 | 26 | */ |
| 28 | -function sn_admin_planet_edit_template(&$template, $edit_planet_row, $mode) |
|
| 29 | -{ |
|
| 27 | +function sn_admin_planet_edit_template(&$template, $edit_planet_row, $mode) { |
|
| 30 | 28 | global $lang; |
| 31 | 29 | |
| 32 | 30 | $unit_list = sn_get_groups($mode); |
@@ -48,15 +46,13 @@ discard block |
||
| 48 | 46 | } |
| 49 | 47 | |
| 50 | 48 | function admin_planet_edit_query_string($unit_id, $unit_amount, $mode){return sn_function_call('admin_planet_edit_query_string', array($unit_id, $unit_amount, $mode));} |
| 51 | -function sn_admin_planet_edit_query_string($unit_id, $unit_amount, $mode) |
|
| 52 | -{ |
|
| 49 | +function sn_admin_planet_edit_query_string($unit_id, $unit_amount, $mode) { |
|
| 53 | 50 | if($unit_amount && in_array($unit_id, sn_get_groups($mode))) |
| 54 | 51 | { |
| 55 | 52 | $unit_amount = round($unit_amount); |
| 56 | 53 | $unit_name = get_unit_param($unit_id, P_NAME); |
| 57 | 54 | $result = "{$unit_name} = GREATEST(0, {$unit_name} + ({$unit_amount}))"; |
| 58 | - } |
|
| 59 | - else |
|
| 55 | + } else |
|
| 60 | 56 | { |
| 61 | 57 | $result = ''; |
| 62 | 58 | } |