@@ -4,16 +4,16 @@ discard block |
||
4 | 4 | define('INSTALL', false); |
5 | 5 | define('IN_ADMIN', true); |
6 | 6 | |
7 | -require('../common.' . substr(strrchr(__FILE__, '.'), 1)); |
|
7 | +require('../common.'.substr(strrchr(__FILE__, '.'), 1)); |
|
8 | 8 | |
9 | 9 | // if($user['authlevel'] < 2) |
10 | -if($user['authlevel'] < 3) |
|
10 | +if ($user['authlevel'] < 3) |
|
11 | 11 | { |
12 | 12 | AdminMessage(classLocale::$lang['adm_err_denied']); |
13 | 13 | } |
14 | 14 | AdminMessage('Временно не работает'); |
15 | 15 | |
16 | -require("includes/admin_planet_edit.inc" . DOT_PHP_EX); |
|
16 | +require("includes/admin_planet_edit.inc".DOT_PHP_EX); |
|
17 | 17 | |
18 | 18 | $template = gettemplate('admin/admin_planet_edit', true); |
19 | 19 | |
@@ -21,30 +21,30 @@ discard block |
||
21 | 21 | $planet_id = sys_get_param_id('planet_id'); |
22 | 22 | |
23 | 23 | $unit_list = sys_get_param('unit_list'); |
24 | -if(sys_get_param('change_data') && !empty($unit_list)) |
|
24 | +if (sys_get_param('change_data') && !empty($unit_list)) |
|
25 | 25 | { |
26 | 26 | $query_string = array(); |
27 | - foreach($unit_list as $unit_id => $unit_amount) |
|
27 | + foreach ($unit_list as $unit_id => $unit_amount) |
|
28 | 28 | { |
29 | - if($unit_query_string = admin_planet_edit_query_string($unit_id, $unit_amount, $mode)) |
|
29 | + if ($unit_query_string = admin_planet_edit_query_string($unit_id, $unit_amount, $mode)) |
|
30 | 30 | { |
31 | 31 | $query_string[] = $unit_query_string; |
32 | 32 | } |
33 | 33 | } |
34 | 34 | |
35 | - if(!empty($query_string)) |
|
35 | + if (!empty($query_string)) |
|
36 | 36 | { |
37 | 37 | db_planet_set_by_id($planet_id, implode(', ', $query_string)); |
38 | 38 | } |
39 | 39 | } |
40 | 40 | |
41 | -if($planet_id) |
|
41 | +if ($planet_id) |
|
42 | 42 | { |
43 | 43 | $edit_planet_row = db_planet_by_id($planet_id); |
44 | 44 | admin_planet_edit_template($template, $edit_planet_row, $mode); |
45 | 45 | } |
46 | 46 | |
47 | -foreach($admin_planet_edit_mode_list as $page_mode => $mode_locale) |
|
47 | +foreach ($admin_planet_edit_mode_list as $page_mode => $mode_locale) |
|
48 | 48 | { |
49 | 49 | $template->assign_block_vars('page_menu', array( |
50 | 50 | 'ID' => $page_mode, |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $template->assign_vars(array( |
56 | 56 | 'MODE' => $mode, |
57 | 57 | 'PLANET_ID' => $planet_id, |
58 | - 'PLANET_NAME' => empty($edit_planet_row) ? '' : classLocale::$lang['sys_planet_type'][$edit_planet_row['planet_type']] . ' ' . uni_render_planet($edit_planet_row), |
|
58 | + 'PLANET_NAME' => empty($edit_planet_row) ? '' : classLocale::$lang['sys_planet_type'][$edit_planet_row['planet_type']].' '.uni_render_planet($edit_planet_row), |
|
59 | 59 | 'PAGE_HINT' => classLocale::$lang['adm_planet_edit_hint'], |
60 | 60 | )); |
61 | 61 |
@@ -11,17 +11,17 @@ |
||
11 | 11 | define('INSTALL', false); |
12 | 12 | define('IN_ADMIN', true); |
13 | 13 | |
14 | -require('../common.' . substr(strrchr(__FILE__, '.'), 1)); |
|
14 | +require('../common.'.substr(strrchr(__FILE__, '.'), 1)); |
|
15 | 15 | |
16 | 16 | // if ($user['authlevel'] < 2) |
17 | -if($user['authlevel'] < 3) |
|
17 | +if ($user['authlevel'] < 3) |
|
18 | 18 | { |
19 | 19 | AdminMessage(classLocale::$lang['adm_err_denied']); |
20 | 20 | } |
21 | 21 | |
22 | 22 | $template = gettemplate("admin/add_moon", true); |
23 | 23 | |
24 | -if(sys_get_param_str('mode') == 'addit') |
|
24 | +if (sys_get_param_str('mode') == 'addit') |
|
25 | 25 | { |
26 | 26 | $PlanetID = sys_get_param_id('user'); |
27 | 27 | $MoonName = sys_get_param_str('name'); |
@@ -12,15 +12,15 @@ discard block |
||
12 | 12 | define('INSTALL', false); |
13 | 13 | define('IN_ADMIN', true); |
14 | 14 | |
15 | -require('../common.' . substr(strrchr(__FILE__, '.'), 1)); |
|
15 | +require('../common.'.substr(strrchr(__FILE__, '.'), 1)); |
|
16 | 16 | |
17 | -if($user['authlevel'] < 3) { |
|
17 | +if ($user['authlevel'] < 3) { |
|
18 | 18 | AdminMessage(classLocale::$lang['adm_err_denied']); |
19 | 19 | } |
20 | 20 | |
21 | -if($delete = sys_get_param_str('delete')) { |
|
21 | +if ($delete = sys_get_param_str('delete')) { |
|
22 | 22 | db_chat_message_delete($delete); |
23 | -} elseif(sys_get_param_str('deleteall') == 'yes') { |
|
23 | +} elseif (sys_get_param_str('deleteall') == 'yes') { |
|
24 | 24 | db_chat_message_purge(); |
25 | 25 | } |
26 | 26 | |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | |
29 | 29 | $query = db_chat_message_get_last_25(); |
30 | 30 | $i = 0; |
31 | -while($e = db_fetch($query)) { |
|
31 | +while ($e = db_fetch($query)) { |
|
32 | 32 | $i++; |
33 | 33 | $template->assign_block_vars('messages', array( |
34 | 34 | 'ID' => $e['messageid'], |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | define('INSTALL', false); |
11 | 11 | define('IN_ADMIN', true); |
12 | 12 | |
13 | -require('../common.' . substr(strrchr(__FILE__, '.'), 1)); |
|
13 | +require('../common.'.substr(strrchr(__FILE__, '.'), 1)); |
|
14 | 14 | |
15 | 15 | if ($user['authlevel'] < 3) |
16 | 16 | { |
@@ -26,4 +26,4 @@ discard block |
||
26 | 26 | }); |
27 | 27 | </script>'; |
28 | 28 | |
29 | -AdminMessage($script . '<img src=design/images/progressbar.gif><br>' . classLocale::$lang['sys_wait'], classLocale::$lang['adm_maintenance_title']); |
|
29 | +AdminMessage($script.'<img src=design/images/progressbar.gif><br>'.classLocale::$lang['sys_wait'], classLocale::$lang['adm_maintenance_title']); |
@@ -3,22 +3,22 @@ discard block |
||
3 | 3 | define('INSIDE', true); |
4 | 4 | define('INSTALL', false); |
5 | 5 | define('IN_ADMIN', true); |
6 | -require('../common.' . substr(strrchr(__FILE__, '.'), 1)); |
|
6 | +require('../common.'.substr(strrchr(__FILE__, '.'), 1)); |
|
7 | 7 | |
8 | -if($user['authlevel'] < 3) { |
|
8 | +if ($user['authlevel'] < 3) { |
|
9 | 9 | AdminMessage(classLocale::$lang['adm_err_denied']); |
10 | 10 | } |
11 | 11 | |
12 | 12 | lng_include('admin'); |
13 | 13 | |
14 | 14 | $user_id = sys_get_param_id('uid'); |
15 | -if(!($user_row = db_user_by_id($user_id))) { |
|
15 | +if (!($user_row = db_user_by_id($user_id))) { |
|
16 | 16 | AdminMessage(sprintf(classLocale::$lang['adm_dm_user_none'], $user_id)); |
17 | 17 | } |
18 | 18 | |
19 | 19 | $template = gettemplate('admin/admin_user', true); |
20 | 20 | |
21 | -if(!empty($user_row['user_last_browser_id'])) { |
|
21 | +if (!empty($user_row['user_last_browser_id'])) { |
|
22 | 22 | $user_row['browser_user_agent'] = db_browser_agent_get_by_id($user_row['user_last_browser_id']); |
23 | 23 | } |
24 | 24 | |
@@ -54,10 +54,10 @@ discard block |
||
54 | 54 | 'raidsloose', |
55 | 55 | 'raidswin', |
56 | 56 | 'total_rank', |
57 | - 'total_points', ), |
|
57 | + 'total_points',), |
|
58 | 58 | ); |
59 | -foreach($formats as $callable => $field_list) { |
|
60 | - foreach($field_list as $field_name) { |
|
59 | +foreach ($formats as $callable => $field_list) { |
|
60 | + foreach ($field_list as $field_name) { |
|
61 | 61 | $user_row[$field_name] = call_user_func($callable, $user_row[$field_name]); |
62 | 62 | } |
63 | 63 | } |
@@ -1,20 +1,20 @@ 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 | -require('../common.' . substr(strrchr(__FILE__, '.'), 1)); |
|
7 | +require('../common.'.substr(strrchr(__FILE__, '.'), 1)); |
|
8 | 8 | |
9 | 9 | global $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 { |
@@ -42,9 +42,8 @@ discard block |
||
42 | 42 | } |
43 | 43 | |
44 | 44 | $page_title = |
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']) : '') |
|
45 | + classLocale::$lang['adm_planet_list_title'].': '. |
|
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, |
@@ -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 = 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}"); |
@@ -63,20 +63,20 @@ discard block |
||
63 | 63 | |
64 | 64 | $multi_ip = array(); |
65 | 65 | $ip_query = db_user_list_admin_multiaccounts(); |
66 | -while($ip = db_fetch($ip_query)) { |
|
66 | +while ($ip = db_fetch($ip_query)) { |
|
67 | 67 | $multi_ip[$ip['user_lastip']] = $ip['ip_count']; |
68 | 68 | } |
69 | 69 | |
70 | 70 | $geoip = geoip_status(); |
71 | 71 | |
72 | 72 | $query = db_user_list_admin_sorted($sort_fields[$sort], $is_players_online_page); |
73 | -while($user_row = db_fetch($query)) { |
|
74 | - if($user_row['banaday']) { |
|
73 | +while ($user_row = db_fetch($query)) { |
|
74 | + if ($user_row['banaday']) { |
|
75 | 75 | $ban_details = db_ban_list_get_details($user_row); |
76 | 76 | } |
77 | 77 | |
78 | 78 | $geoip_info = $geoip ? geoip_ip_info(ip2longu($user_row['user_lastip'])) : array(); |
79 | - foreach($geoip_info as $key => $value) { |
|
79 | + foreach ($geoip_info as $key => $value) { |
|
80 | 80 | $geoip_info[strtoupper($key)] = $value; |
81 | 81 | unset($geoip_info[$key]); |
82 | 82 | } |
@@ -8,18 +8,18 @@ discard block |
||
8 | 8 | * @copyright 2008 by ??????? for XNova |
9 | 9 | */ |
10 | 10 | |
11 | -define('INSIDE' , true); |
|
12 | -define('INSTALL' , false); |
|
11 | +define('INSIDE', true); |
|
12 | +define('INSTALL', false); |
|
13 | 13 | define('IN_ADMIN', true); |
14 | -require('../common.' . substr(strrchr(__FILE__, '.'), 1)); |
|
14 | +require('../common.'.substr(strrchr(__FILE__, '.'), 1)); |
|
15 | 15 | |
16 | -if($user['authlevel'] < 3) { |
|
16 | +if ($user['authlevel'] < 3) { |
|
17 | 17 | AdminMessage(classLocale::$lang['adm_err_denied']); |
18 | 18 | } |
19 | 19 | |
20 | 20 | $template = gettemplate('admin/settings', true); |
21 | 21 | |
22 | -if(sys_get_param('save')) { |
|
22 | +if (sys_get_param('save')) { |
|
23 | 23 | classSupernova::$config->game_name = sys_get_param_str_unsafe('game_name'); |
24 | 24 | classSupernova::$config->game_mode = sys_get_param_int('game_mode'); |
25 | 25 | classSupernova::$config->game_speed = sys_get_param_float('game_speed', 1); |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | classSupernova::$config->url_faq = sys_get_param_str_unsafe('url_faq'); |
30 | 30 | classSupernova::$config->url_forum = sys_get_param_str_unsafe('url_forum'); |
31 | 31 | classSupernova::$config->url_rules = sys_get_param_str_unsafe('url_rules'); |
32 | - classSupernova::$config->url_purchase_metamatter = sys_get_param_str_unsafe('url_purchase_metamatter'); |
|
32 | + classSupernova::$config->url_purchase_metamatter = sys_get_param_str_unsafe('url_purchase_metamatter'); |
|
33 | 33 | classSupernova::$config->game_disable = sys_get_param_int('game_disable'); |
34 | 34 | classSupernova::$config->game_disable_reason = sys_get_param_str_unsafe('game_disable_reason'); |
35 | 35 | classSupernova::$config->server_updater_check_auto = sys_get_param_int('server_updater_check_auto'); |
@@ -96,8 +96,8 @@ discard block |
||
96 | 96 | classSupernova::$config->stats_schedule = sys_get_param_str('stats_schedule'); |
97 | 97 | |
98 | 98 | classSupernova::$config->empire_mercenary_base_period = sys_get_param_int('empire_mercenary_base_period'); |
99 | - if(classSupernova::$config->empire_mercenary_temporary != sys_get_param_int('empire_mercenary_temporary')) { |
|
100 | - if(classSupernova::$config->empire_mercenary_temporary) { |
|
99 | + if (classSupernova::$config->empire_mercenary_temporary != sys_get_param_int('empire_mercenary_temporary')) { |
|
100 | + if (classSupernova::$config->empire_mercenary_temporary) { |
|
101 | 101 | db_unit_list_admin_delete_mercenaries_finished(); |
102 | 102 | } else { |
103 | 103 | db_unit_list_admin_set_mercenaries_expire_time(classSupernova::$config->empire_mercenary_base_period); |
@@ -138,21 +138,21 @@ discard block |
||
138 | 138 | 'STATS_HIDE_PM_LINK' => classSupernova::$config->stats_hide_pm_link, |
139 | 139 | )); |
140 | 140 | |
141 | -foreach(classLocale::$lang['sys_game_disable_reason'] as $id => $name) { |
|
141 | +foreach (classLocale::$lang['sys_game_disable_reason'] as $id => $name) { |
|
142 | 142 | $template->assign_block_vars('sys_game_disable_reason', array( |
143 | 143 | 'ID' => $id, |
144 | 144 | 'NAME' => $name, |
145 | 145 | )); |
146 | 146 | } |
147 | 147 | |
148 | -foreach(classLocale::$lang['sys_game_mode'] as $mode_id => $mode_name) { |
|
148 | +foreach (classLocale::$lang['sys_game_mode'] as $mode_id => $mode_name) { |
|
149 | 149 | $template->assign_block_vars('game_modes', array( |
150 | 150 | 'ID' => $mode_id, |
151 | 151 | 'NAME' => $mode_name, |
152 | 152 | )); |
153 | 153 | } |
154 | 154 | |
155 | -foreach(classLocale::$lang['adm_opt_ver_response'] as $ver_id => $ver_response) { |
|
155 | +foreach (classLocale::$lang['adm_opt_ver_response'] as $ver_id => $ver_response) { |
|
156 | 156 | $template->assign_block_vars('ver_response', array( |
157 | 157 | 'ID' => $ver_id, |
158 | 158 | 'NAME' => js_safe_string($ver_response), |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | } |
161 | 161 | |
162 | 162 | $lang_list = lng_get_list(); |
163 | -foreach($lang_list as $lang_id => $lang_data) { |
|
163 | +foreach ($lang_list as $lang_id => $lang_data) { |
|
164 | 164 | $template->assign_block_vars('game_languages', array( |
165 | 165 | 'ID' => $lang_id, |
166 | 166 | 'NAME' => "{$lang_data['LANG_NAME_NATIVE']} ({$lang_data['LANG_NAME_ENGLISH']})", |
@@ -12,9 +12,9 @@ discard block |
||
12 | 12 | define('INSTALL', false); |
13 | 13 | define('IN_ADMIN', true); |
14 | 14 | |
15 | -require('../common.' . substr(strrchr(__FILE__, '.'), 1)); |
|
15 | +require('../common.'.substr(strrchr(__FILE__, '.'), 1)); |
|
16 | 16 | |
17 | -if($user['authlevel'] < 3) { |
|
17 | +if ($user['authlevel'] < 3) { |
|
18 | 18 | AdminMessage(classLocale::$lang['adm_err_denied']); |
19 | 19 | } |
20 | 20 | |
@@ -28,8 +28,8 @@ discard block |
||
28 | 28 | ), |
29 | 29 | ); |
30 | 30 | $template->assign_block_vars('int_type_selected', $allowed_types[-1]); |
31 | -foreach($sn_message_class_list as $key => $value) { |
|
32 | - if($key == MSG_TYPE_NEW || $key == MSG_TYPE_OUTBOX) { |
|
31 | +foreach ($sn_message_class_list as $key => $value) { |
|
32 | + if ($key == MSG_TYPE_NEW || $key == MSG_TYPE_OUTBOX) { |
|
33 | 33 | continue; |
34 | 34 | } |
35 | 35 | |
@@ -41,17 +41,17 @@ discard block |
||
41 | 41 | |
42 | 42 | |
43 | 43 | $message_delete = sys_get_param_id('msg_del'); |
44 | -if(sys_get_param('str_delete_selected') && is_array($message_delete = sys_get_param('selected')) && !empty($message_delete)) { |
|
44 | +if (sys_get_param('str_delete_selected') && is_array($message_delete = sys_get_param('selected')) && !empty($message_delete)) { |
|
45 | 45 | $message_delete = implode(', ', $message_delete); |
46 | 46 | } |
47 | 47 | |
48 | -if($message_delete) { |
|
48 | +if ($message_delete) { |
|
49 | 49 | db_message_list_delete_set($message_delete); |
50 | 50 | $template->assign_block_vars('result', array('MESSAGE' => sprintf(classLocale::$lang['mlst_messages_deleted'], $message_delete))); |
51 | 51 | } |
52 | 52 | |
53 | 53 | |
54 | -if(sys_get_param('str_delete_date') && checkdate($month = sys_get_param_id('delete_month'), $day = sys_get_param_id('delete_day'), $year = sys_get_param_id('delete_year'))) { |
|
54 | +if (sys_get_param('str_delete_date') && checkdate($month = sys_get_param_id('delete_month'), $day = sys_get_param_id('delete_day'), $year = sys_get_param_id('delete_year'))) { |
|
55 | 55 | $delete_date = "{$year}-{$month}-{$day}"; |
56 | 56 | db_message_list_delete_by_date($delete_date, $int_type_selected); |
57 | 57 | $template->assign_block_vars('result', array('MESSAGE' => sprintf(classLocale::$lang['mlst_messages_deleted_date'], $allowed_types[$int_type_selected]['TEXT'], $delete_date))); |
@@ -63,13 +63,13 @@ discard block |
||
63 | 63 | |
64 | 64 | $int_page_current = min(sys_get_param_id('int_page_current', 1), $page_max); |
65 | 65 | |
66 | -if(sys_get_param('page_prev') && $int_page_current > 1) { |
|
66 | +if (sys_get_param('page_prev') && $int_page_current > 1) { |
|
67 | 67 | $int_page_current--; |
68 | -} elseif(sys_get_param('page_next') && $int_page_current < $page_max) { |
|
68 | +} elseif (sys_get_param('page_next') && $int_page_current < $page_max) { |
|
69 | 69 | $int_page_current++; |
70 | 70 | } |
71 | 71 | |
72 | -for($i = 1; $i <= $page_max; $i++) { |
|
72 | +for ($i = 1; $i <= $page_max; $i++) { |
|
73 | 73 | $template->assign_block_vars('page', array('NUMBER' => $i)); |
74 | 74 | } |
75 | 75 | |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $StartRec = ($int_page_current - 1) * 25; |
78 | 78 | |
79 | 79 | $Messages = db_message_list_admin_by_type($int_type_selected, $StartRec); |
80 | -while($row = db_fetch($Messages)) { |
|
80 | +while ($row = db_fetch($Messages)) { |
|
81 | 81 | $row['FROM'] = htmlentities($row['FROM'], ENT_COMPAT, 'UTF-8'); |
82 | 82 | $row['OWNER_NAME'] = htmlentities($row['OWNER_NAME'], ENT_COMPAT, 'UTF-8'); |
83 | 83 | $row['TEXT'] = nl2br($row['TEXT']); |