Completed
Push — work-fleets ( abbbcf...8b8b7f )
by SuperNova.WS
05:13
created
admin/admin_locale.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -7,25 +7,25 @@  discard block
 block discarded – undo
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
 
16
-if($user['authlevel'] < 3) {
16
+if ($user['authlevel'] < 3) {
17 17
   AdminMessage($lang['adm_err_denied']);
18 18
 }
19 19
 
20 20
 function adm_lng_assign_string($lang_id, $locale_string_name, $value) {
21 21
   global $locale_string_template, $languages_info, $languages, $domain;
22 22
 
23
-  if(is_array($value)) {
24
-    foreach($value as $sub_key => $sub_value) {
23
+  if (is_array($value)) {
24
+    foreach ($value as $sub_key => $sub_value) {
25 25
       adm_lng_assign_string($lang_id, "{$locale_string_name}[{$sub_key}]", $sub_value);
26 26
     }
27
-  } elseif($value) {
28
-    if(!isset($locale_string_template[$locale_string_name])) {
27
+  } elseif ($value) {
28
+    if (!isset($locale_string_template[$locale_string_name])) {
29 29
       $locale_string_template[$locale_string_name] = array();
30 30
     }
31 31
     $locale_string_template[$locale_string_name] = array_merge($locale_string_template[$locale_string_name], array("[{$lang_id}]" => htmlentities($value, ENT_COMPAT, 'utf-8')));
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
   global $domain, $lang_id;
47 47
 
48 48
   $return = "{$ident}'{$string_name}' => ";
49
-  if(isset($string_value[$lang_id]) && !is_array($string_value[$lang_id])) {
49
+  if (isset($string_value[$lang_id]) && !is_array($string_value[$lang_id])) {
50 50
     $return .= "'" . str_replace(array("\\", "'"), array('\\\\', "\\'"), $string_value[$lang_id]) . "',";
51 51
   } else {
52 52
     $return .= "array(\r\n";
53
-    foreach($string_value as $arr_name => $arr_data) {
53
+    foreach ($string_value as $arr_name => $arr_data) {
54 54
       $return .= adm_lng_parse_string($arr_name, $arr_data, $ident . '  ');
55 55
     }
56 56
     $return .= "{$ident}),\r\n";
@@ -103,12 +103,12 @@  discard block
 block discarded – undo
103 103
 
104 104
   $string_name_new = false;
105 105
 
106
-  if(isset($honor_constants[$domain][$string_name_prefix])) {
106
+  if (isset($honor_constants[$domain][$string_name_prefix])) {
107 107
     $found_constants = array_keys($constants, $string_name);
108
-    foreach($found_constants as $constant_name) {
108
+    foreach ($found_constants as $constant_name) {
109 109
       $honor_prefix_list = is_array($honor_constants[$domain][$string_name_prefix]) ? $honor_constants[$domain][$string_name_prefix] : array($honor_constants[$domain][$string_name_prefix]);
110
-      foreach($honor_prefix_list as $honor_prefix) {
111
-        if(strpos($constant_name, $honor_prefix) === 0) {
110
+      foreach ($honor_prefix_list as $honor_prefix) {
111
+        if (strpos($constant_name, $honor_prefix) === 0) {
112 112
           $string_name_new = $constant_name;
113 113
           break;
114 114
         }
@@ -118,12 +118,12 @@  discard block
 block discarded – undo
118 118
 
119 119
   $string_name_new = $string_name_new ? $string_name_new : "'{$string_name}'";
120 120
   fwrite($file_handler, "{$ident}{$string_name_new} => ");
121
-  if(isset($string_value[$lang_id]) && !is_array($string_value[$lang_id])) {
121
+  if (isset($string_value[$lang_id]) && !is_array($string_value[$lang_id])) {
122 122
     fwrite($file_handler, "'" . str_replace(array("\\", "'"), array('\\\\', "\\'"), $string_value[$lang_id]) . "',");
123 123
   } else {
124 124
     $string_name_prefix = $string_name_prefix . "[{$string_name}]";
125 125
     fwrite($file_handler, "array(\r\n");
126
-    foreach($string_value as $arr_name => $arr_data) {
126
+    foreach ($string_value as $arr_name => $arr_data) {
127 127
       adm_lng_write_string($arr_name, $arr_data, $ident . '  ', $string_name_prefix);
128 128
     }
129 129
     fwrite($file_handler, "{$ident}),\r\n");
@@ -143,13 +143,13 @@  discard block
 block discarded – undo
143 143
 $languages_info = lng_get_list();
144 144
 $domain = sys_get_param_str('domain');
145 145
 
146
-if($domain) {
146
+if ($domain) {
147 147
   $lang_new = sys_get_param('lang_new');
148
-  if(!empty($lang_new)) {
148
+  if (!empty($lang_new)) {
149 149
     $constants = get_defined_constants(true);
150 150
     $constants = $constants['user'];
151 151
     ksort($constants);
152
-    foreach($languages_info as $lang_id => $land_data) {
152
+    foreach ($languages_info as $lang_id => $land_data) {
153 153
       $file_handler = fopen(SN_ROOT_PHYSICAL . "language/{$lang_id}/{$domain}.mo.php.new", 'w');
154 154
       fwrite($file_handler, "<?php\r\n\r\n/*\r\n#############################################################################
155 155
 #  Filename: {$domain}.mo.php
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 #  Website: http://www.supernova.ws
158 158
 #  Description: Massive Multiplayer Online Browser Space Startegy Game\r\n#\r\n");
159 159
 
160
-      foreach($land_data['LANG_COPYRIGHT'] as $lang_copyright) {
160
+      foreach ($land_data['LANG_COPYRIGHT'] as $lang_copyright) {
161 161
         $lang_copyright = str_replace(array('&copy;', '&quot;', '&lt;', '&gt;'), array('©', '"', '<', '>'), $lang_copyright);
162 162
         fwrite($file_handler, "#  {$lang_copyright}\r\n");
163 163
       }
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 /**\r\n*\r\n* @package language\r\n* @system [{$land_data['LANG_NAME_ENGLISH']}]\r\n* @version " . SN_VERSION . "\r\n*\r\n*/\r\n
166 166
 /**\r\n* DO NOT CHANGE\r\n*/\r\n\r\nif (!defined('INSIDE')) die();\r\n
167 167
 \$a_lang_array = array(\r\n");
168
-      foreach($lang_new as $string_name => $string_value) {
168
+      foreach ($lang_new as $string_name => $string_value) {
169 169
         adm_lng_write_string($string_name, $string_value);
170 170
       }
171 171
       fwrite($file_handler, ");\r\n");
@@ -176,21 +176,21 @@  discard block
 block discarded – undo
176 176
     die();
177 177
   }
178 178
 
179
-  foreach($languages_info as $lang_id => $lang_data) {
179
+  foreach ($languages_info as $lang_id => $lang_data) {
180 180
     $template->assign_block_vars('language', $lang_data);
181 181
     $full_filename = SN_ROOT_PHYSICAL . "language/{$lang_id}/{$domain}.mo.php";
182 182
     $languages[$lang_id] = adm_lng_load($full_filename . (file_exists($full_filename . '.new') ? '.new' : ''));
183
-    foreach($languages[$lang_id] as $locale_string_name => $cork) {
183
+    foreach ($languages[$lang_id] as $locale_string_name => $cork) {
184 184
       adm_lng_assign_string($lang_id, "[{$locale_string_name}]", $languages[$lang_id][$locale_string_name]);
185 185
     }
186 186
   }
187 187
 
188
-  foreach($locale_string_template as $locale_string_name => $locale_string_list) {
188
+  foreach ($locale_string_template as $locale_string_name => $locale_string_list) {
189 189
     $template->assign_block_vars('string', array(
190 190
       'NAME' => $locale_string_name,
191 191
     ));
192 192
 
193
-    foreach($languages_info as $lang_id => $cork2) {
193
+    foreach ($languages_info as $lang_id => $cork2) {
194 194
       $template->assign_block_vars('string.locale', array(
195 195
         'LANG' => $lang_id,
196 196
         'VALUE' => $locale_string_list["[{$lang_id}]"],
@@ -206,17 +206,17 @@  discard block
 block discarded – undo
206 206
   $dir = dir($path);
207 207
   while (false !== ($lang_id = $dir->read())) {
208 208
     $full_path = $path . $lang_id;
209
-    if($lang_id[0] != "." && is_dir($full_path)) {
209
+    if ($lang_id[0] != "." && is_dir($full_path)) {
210 210
       $lang_file_list = dir($full_path);
211 211
       while (false !== ($filename = $lang_file_list->read())) {
212 212
         $lang_domain = strtolower(substr($filename, 0, strpos($filename, '.')));
213
-        if(!$lang_domain) {
213
+        if (!$lang_domain) {
214 214
           continue;
215 215
         }
216 216
 
217 217
         $file_ext = strtolower(substr($filename, strpos($filename, '.')));
218
-        if($lang_domain != 'language') {
219
-          if($file_ext == '.mo.php.new' || ($file_ext == '.mo.php' && empty($languages[$lang_id][$lang_domain]))) {
218
+        if ($lang_domain != 'language') {
219
+          if ($file_ext == '.mo.php.new' || ($file_ext == '.mo.php' && empty($languages[$lang_id][$lang_domain]))) {
220 220
             $language_domains[$lang_domain] = $lang_domain;
221 221
             $languages[$lang_id][$lang_domain] = $lang_domain;
222 222
           }
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
   }
227 227
   $dir->close();
228 228
 
229
-  foreach($language_domains as $lang_domain) {
229
+  foreach ($language_domains as $lang_domain) {
230 230
     $template->assign_block_vars('domain', array(
231 231
       'NAME' => $lang_domain,
232 232
     ));
Please login to merge, or discard this patch.
admin/adm_metamatter.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -15,11 +15,11 @@  discard block
 block discarded – undo
15 15
 
16 16
 require('../common.' . substr(strrchr(__FILE__, '.'), 1));
17 17
 
18
-if(!sn_module_get_active_count('payment')) {
18
+if (!sn_module_get_active_count('payment')) {
19 19
   sys_redirect(SN_ROOT_VIRTUAL . 'admin/overview.php');
20 20
 }
21 21
 
22
-if($user['authlevel'] < 3) {
22
+if ($user['authlevel'] < 3) {
23 23
   AdminMessage($lang['adm_err_denied']);
24 24
 }
25 25
 
@@ -28,19 +28,19 @@  discard block
 block discarded – undo
28 28
 $message = '';
29 29
 $message_status = ERR_ERROR;
30 30
 
31
-if($points = sys_get_param_float('points')) {
31
+if ($points = sys_get_param_float('points')) {
32 32
   try {
33 33
     $username = sys_get_param_str_unsafe('id_user');
34
-    if(empty($username)) {
34
+    if (empty($username)) {
35 35
       throw new Exception($lang['adm_mm_no_dest']);
36 36
     }
37 37
 
38 38
     $an_account = new Account(classSupernova::$auth->account->db);
39
-    if(!$an_account->db_get_by_id($username) && !$an_account->db_get_by_name($username) && !$an_account->db_get_by_email($username)) {
39
+    if (!$an_account->db_get_by_id($username) && !$an_account->db_get_by_name($username) && !$an_account->db_get_by_email($username)) {
40 40
       throw new Exception(sprintf($lang['adm_mm_user_none'], $username));
41 41
     }
42 42
 
43
-    if(!$an_account->metamatter_change(RPG_ADMIN, $points, sprintf(
43
+    if (!$an_account->metamatter_change(RPG_ADMIN, $points, sprintf(
44 44
       $lang['adm_matter_change_log_record'],
45 45
       $an_account->account_id, db_escape($an_account->account_name),
46 46
       $user['id'], db_escape($user['username']),
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 //  $message = $lang['adm_mm_no_quant'];
60 60
 }
61 61
 
62
-if($message_status == ERR_ERROR) {
62
+if ($message_status == ERR_ERROR) {
63 63
   $template->assign_vars(array(
64 64
     'ID_USER' => $username,
65 65
     'POINTS' => $points,
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
   ));
68 68
 };
69 69
 
70
-if($message) {
70
+if ($message) {
71 71
   $template->assign_block_vars('result', array('MESSAGE' => $message, 'STATUS' => $message_status ? $message_status : ERR_NONE));
72 72
 }
73 73
 
Please login to merge, or discard this patch.
admin/userlist.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 require('../common.' . substr(strrchr(__FILE__, '.'), 1));
16 16
 
17 17
 global $config, $lang, $user;
18
-if($user['authlevel'] < 3) {
18
+if ($user['authlevel'] < 3) {
19 19
   AdminMessage($lang['adm_err_denied']);
20 20
 }
21 21
 
@@ -39,10 +39,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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 = doquery("SELECT * FROM {{banned}} WHERE `ban_user_id` = {$user_row['id']} ORDER BY ban_id DESC LIMIT 1", true);
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
   }
Please login to merge, or discard this patch.
admin/admin_user.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -5,20 +5,20 @@  discard block
 block discarded – undo
5 5
 define('IN_ADMIN', true);
6 6
 require('../common.' . substr(strrchr(__FILE__, '.'), 1));
7 7
 
8
-if($user['authlevel'] < 3) {
8
+if ($user['authlevel'] < 3) {
9 9
   AdminMessage($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($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
   $temp = doquery("SELECT browser_user_agent FROM {{security_browser}} WHERE `browser_id` = {$user_row['user_last_browser_id']}", true);
23 23
   $user_row['browser_user_agent'] = $temp['browser_user_agent'];
24 24
 }
@@ -55,10 +55,10 @@  discard block
 block discarded – undo
55 55
     'raidsloose',
56 56
     'raidswin',
57 57
     'total_rank',
58
-    'total_points',  ),
58
+    'total_points',),
59 59
 );
60
-foreach($formats as $callable => $field_list) {
61
-  foreach($field_list as $field_name) {
60
+foreach ($formats as $callable => $field_list) {
61
+  foreach ($field_list as $field_name) {
62 62
     $user_row[$field_name] = call_user_func($callable, $user_row[$field_name]);
63 63
   }
64 64
 }
Please login to merge, or discard this patch.
admin/messall.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@  discard block
 block discarded – undo
7 7
  * @copyright 2008 by ??????? for XNova
8 8
  */
9 9
 
10
-define('INSIDE'  , true);
11
-define('INSTALL' , false);
10
+define('INSIDE', true);
11
+define('INSTALL', false);
12 12
 define('IN_ADMIN', true);
13 13
 
14 14
 require('../common.' . substr(strrchr(__FILE__, '.'), 1));
15 15
 
16
-if($user['authlevel'] < 3)
16
+if ($user['authlevel'] < 3)
17 17
 {
18 18
   AdminMessage($lang['adm_err_denied']);
19 19
 }
@@ -37,20 +37,20 @@  discard block
 block discarded – undo
37 37
   }
38 38
   if ($config->tresc != '' and $config->temat) {
39 39
     $Time    = time();
40
-    $From    = '<font color="'. $kolor .'">'. $ranga ." ".$user['username']."</font>";
41
-    $Subject = '<font color="'. $kolor .'">'. $config->temat ."</font>";
42
-    $Message = '<font color="'. $kolor .'"><b>'. $config->tresc ."</b></font>";
40
+    $From    = '<font color="' . $kolor . '">' . $ranga . " " . $user['username'] . "</font>";
41
+    $Subject = '<font color="' . $kolor . '">' . $config->temat . "</font>";
42
+    $Message = '<font color="' . $kolor . '"><b>' . $config->tresc . "</b></font>";
43 43
     $sq      = db_user_list('', false, 'id');
44
-    foreach($sq as $u)
44
+    foreach ($sq as $u)
45 45
     // while ($u = db_fetch($sq))
46 46
     {
47
-      msg_send_simple_message ($u['id'], $user['id'], $Time, MSG_TYPE_ADMIN, $From, $Subject, $Message);
47
+      msg_send_simple_message($u['id'], $user['id'], $Time, MSG_TYPE_ADMIN, $From, $Subject, $Message);
48 48
     }
49 49
     message("<font color=\"lime\">Херня на польском</font>", "Complete", "../overview." . PHP_EX, 3);
50 50
   }
51 51
 } else {
52 52
   $parse['dpath'] = $dpath;
53
-  $parse['debug'] = ($config->debug == 1) ? " checked='checked'/":'';
53
+  $parse['debug'] = ($config->debug == 1) ? " checked='checked'/" : '';
54 54
   $page .= parsetemplate(gettemplate('admin/messall_body'), $parse);
55
-  display($page, '', false,'', true);
55
+  display($page, '', false, '', true);
56 56
 }
Please login to merge, or discard this patch.
admin/overview.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,15 +13,15 @@  discard block
 block discarded – undo
13 13
 require_once('userlist.php');
14 14
 die();
15 15
 
16
-define('INSIDE'  , true);
17
-define('INSTALL' , false);
16
+define('INSIDE', true);
17
+define('INSTALL', false);
18 18
 define('IN_ADMIN', true);
19 19
 
20 20
 require('../common.' . substr(strrchr(__FILE__, '.'), 1));
21 21
 
22
-if($user['authlevel'] < 1) {
22
+if ($user['authlevel'] < 1) {
23 23
   AdminMessage($lang['adm_err_denied']);
24
-} elseif($user['authlevel'] < 3) {
24
+} elseif ($user['authlevel'] < 3) {
25 25
   sys_redirect(SN_ROOT_VIRTUAL . 'admin/banned.php');
26 26
 }
27 27
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 $Last15Mins = db_user_list_online_sorted($TypeSort);
32 32
 
33 33
 $Count      = 0;
34
-while($TheUser = db_fetch($Last15Mins))
34
+while ($TheUser = db_fetch($Last15Mins))
35 35
 {
36 36
   $TheUser['NAME'] = htmlentities($TheUser['NAME'], ENT_COMPAT, 'UTF-8');
37 37
 //  $TheUser['BROWSER'] = htmlentities($TheUser['BROWSER'], ENT_COMPAT, 'UTF-8');
Please login to merge, or discard this patch.
admin/admin_darkmatter.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 
16 16
 require('../common.' . substr(strrchr(__FILE__, '.'), 1));
17 17
 
18
-if($user['authlevel'] < 3) {
18
+if ($user['authlevel'] < 3) {
19 19
   AdminMessage($lang['adm_err_denied']);
20 20
 }
21 21
 
@@ -24,16 +24,16 @@  discard block
 block discarded – undo
24 24
 $message = '';
25 25
 $message_status = ERR_ERROR;
26 26
 
27
-if($points = sys_get_param_float('points')) {
27
+if ($points = sys_get_param_float('points')) {
28 28
 // If points not empty...
29
-  if($username = sys_get_param_str_unsafe('id_user')) {
29
+  if ($username = sys_get_param_str_unsafe('id_user')) {
30 30
     $row = db_user_by_id($username, false, 'id, username', true, true);
31
-    if(!isset($row['id'])) {
31
+    if (!isset($row['id'])) {
32 32
       $row = db_user_by_username($username, false, 'id, username', true, true);
33 33
     }
34
-    if(is_array($row) && isset($row['id'])) {
34
+    if (is_array($row) && isset($row['id'])) {
35 35
       // Does anything post to DB?
36
-      if(rpg_points_change(
36
+      if (rpg_points_change(
37 37
         $row['id'],
38 38
         RPG_ADMIN,
39 39
         $points,
@@ -51,12 +51,12 @@  discard block
 block discarded – undo
51 51
     // Points not empty but destination is not set - this means error
52 52
     $message = $lang['adm_dm_no_dest'];
53 53
   }
54
-} elseif($id_user) {
54
+} elseif ($id_user) {
55 55
   // Points is empty but destination is set - this again means error
56 56
   $message = $lang['adm_dm_no_quant'];
57 57
 }
58 58
 
59
-if(!$isNoError) {
59
+if (!$isNoError) {
60 60
   $template->assign_vars(array(
61 61
     'ID_USER' => $id_user,
62 62
     'POINTS' => $points,
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
   ));
65 65
 };
66 66
 
67
-if($message) {
67
+if ($message) {
68 68
   $template->assign_block_vars('result', array('MESSAGE' => $message, 'STATUS' => $message_status ? $message_status : ERR_NONE));
69 69
 }
70 70
 
Please login to merge, or discard this patch.
admin/paneladmina.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -8,13 +8,13 @@  discard block
 block discarded – undo
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 14
 
15 15
 require('../common.' . substr(strrchr(__FILE__, '.'), 1));
16 16
 
17
-if($user['authlevel'] < 3)
17
+if ($user['authlevel'] < 3)
18 18
 {
19 19
   AdminMessage($lang['adm_err_denied']);
20 20
 }
@@ -34,9 +34,9 @@  discard block
 block discarded – undo
34 34
 
35 35
 // Afficher les templates
36 36
 if (isset($GET_result)) {
37
-  switch ($GET_result){
37
+  switch ($GET_result) {
38 38
     case 'usr_search':
39
-      $SelUser = db_user_by_username('%'. $Pattern .'%', false, '*', true, true);
39
+      $SelUser = db_user_by_username('%' . $Pattern . '%', false, '*', true, true);
40 40
       $UsrMain = db_planet_by_id($SelUser['id_planet'], false, 'name');
41 41
 
42 42
       $bloc                   = $lang;
@@ -44,14 +44,14 @@  discard block
 block discarded – undo
44 44
       $bloc['answer2']        = $SelUser['username'];
45 45
       $bloc['answer3']        = $SelUser['user_lastip'];
46 46
       $bloc['answer4']        = $SelUser['email'];
47
-      $bloc['answer5']        = $lang['adm_usr_level'][ $SelUser['authlevel'] ];
48
-      $bloc['answer6']        = $lang['adm_usr_genre'][ $SelUser['gender'] ];
49
-      $bloc['answer7']        = "[".$SelUser['id_planet']."] ".$UsrMain['name'];
50
-      $bloc['answer8']        = "[".$SelUser['galaxy'].":".$SelUser['system'].":".$SelUser['planet']."] ";
47
+      $bloc['answer5']        = $lang['adm_usr_level'][$SelUser['authlevel']];
48
+      $bloc['answer6']        = $lang['adm_usr_genre'][$SelUser['gender']];
49
+      $bloc['answer7']        = "[" . $SelUser['id_planet'] . "] " . $UsrMain['name'];
50
+      $bloc['answer8']        = "[" . $SelUser['galaxy'] . ":" . $SelUser['system'] . ":" . $SelUser['planet'] . "] ";
51 51
       $bloc['qst_quest_complete'] = get_quest_amount_complete($SelUser['id']);
52 52
       $bloc['user_id'] = $SelUser['id'];
53 53
       $SubPanelTPL            = gettemplate('admin/admin_panel_asw1');
54
-      $parse['adm_sub_form2'] = parsetemplate( $SubPanelTPL, $bloc );
54
+      $parse['adm_sub_form2'] = parsetemplate($SubPanelTPL, $bloc);
55 55
       break;
56 56
 
57 57
     case 'usr_data':
@@ -109,10 +109,10 @@  discard block
 block discarded – undo
109 109
 
110 110
       $selected_user = db_user_by_username($Pattern, false, 'id');
111 111
       $QryUpdate = db_user_set_by_id($selected_user['id'], "`authlevel` = '{$NewLvl}'");
112
-      $Message    = $lang['adm_mess_lvl1']. " ". $Pattern ." ".$lang['adm_mess_lvl2'];
113
-      $Message   .= "<font color=\"red\">".$lang['adm_usr_level'][ $NewLvl ]."</font>!";
112
+      $Message    = $lang['adm_mess_lvl1'] . " " . $Pattern . " " . $lang['adm_mess_lvl2'];
113
+      $Message   .= "<font color=\"red\">" . $lang['adm_usr_level'][$NewLvl] . "</font>!";
114 114
 
115
-      AdminMessage ( $Message, $lang['adm_mod_level'] );
115
+      AdminMessage($Message, $lang['adm_mod_level']);
116 116
       break;
117 117
 
118 118
     case 'ip_search':
@@ -121,12 +121,12 @@  discard block
 block discarded – undo
121 121
       $bloc['adm_this_ip']    = $ip;
122 122
       $SelUser = db_user_list("`user_lastip` = '{$ip}'");
123 123
       //while ( $Usr = db_fetch($SelUser) ) {
124
-      foreach($SelUser as $Usr) {
124
+      foreach ($SelUser as $Usr) {
125 125
         $UsrMain = db_planet_by_id($Usr['id_planet'], false, 'name');
126
-        $bloc['adm_plyer_lst'] .= "<tr><th>".$Usr['username']."</th><th>[".$Usr['galaxy'].":".$Usr['system'].":".$Usr['planet']."] ".$UsrMain['name']."</th></tr>";
126
+        $bloc['adm_plyer_lst'] .= "<tr><th>" . $Usr['username'] . "</th><th>[" . $Usr['galaxy'] . ":" . $Usr['system'] . ":" . $Usr['planet'] . "] " . $UsrMain['name'] . "</th></tr>";
127 127
       }
128 128
       $SubPanelTPL            = gettemplate('admin/admin_panel_asw2');
129
-      $parse['adm_sub_form2'] = parsetemplate( $SubPanelTPL, $bloc );
129
+      $parse['adm_sub_form2'] = parsetemplate($SubPanelTPL, $bloc);
130 130
       break;
131 131
     default:
132 132
       break;
@@ -135,14 +135,14 @@  discard block
 block discarded – undo
135 135
 
136 136
 // Traiter les reponses aux formulaires
137 137
 if (isset($GET_action)) {
138
-  $bloc                   = $lang;
139
-  switch ($GET_action){
138
+  $bloc = $lang;
139
+  switch ($GET_action) {
140 140
     case 'usr_search':
141
-      $SubPanelTPL            = gettemplate('admin/admin_panel_frm1');
141
+      $SubPanelTPL = gettemplate('admin/admin_panel_frm1');
142 142
       break;
143 143
 
144 144
     case 'usr_data':
145
-      $SubPanelTPL            = gettemplate('admin/admin_panel_frm4');
145
+      $SubPanelTPL = gettemplate('admin/admin_panel_frm4');
146 146
       break;
147 147
 
148 148
     case 'usr_level':
@@ -155,21 +155,21 @@  discard block
 block discarded – undo
155 155
 
156 156
 
157 157
       for ($Lvl = 0; $Lvl < 4; $Lvl++) {
158
-        $bloc['adm_level_lst'] .= '<option value="'. $Lvl .'">'. $lang['adm_usr_level'][ $Lvl ] ."</option>";
158
+        $bloc['adm_level_lst'] .= '<option value="' . $Lvl . '">' . $lang['adm_usr_level'][$Lvl] . "</option>";
159 159
       }
160
-      $SubPanelTPL            = gettemplate('admin/admin_panel_frm3');
160
+      $SubPanelTPL = gettemplate('admin/admin_panel_frm3');
161 161
       break;
162 162
 
163 163
     case 'ip_search':
164
-      $SubPanelTPL            = gettemplate('admin/admin_panel_frm2');
164
+      $SubPanelTPL = gettemplate('admin/admin_panel_frm2');
165 165
       break;
166 166
 
167 167
     default:
168 168
       break;
169 169
   }
170
-  $parse['adm_sub_form2'] = parsetemplate( $SubPanelTPL, $bloc );
170
+  $parse['adm_sub_form2'] = parsetemplate($SubPanelTPL, $bloc);
171 171
 }
172 172
 
173
-$page = parsetemplate( $PanelMainTPL, $parse );
174
-display( $page, $lang['panel_mainttl'], false, '', true );
173
+$page = parsetemplate($PanelMainTPL, $parse);
174
+display($page, $lang['panel_mainttl'], false, '', true);
175 175
 ?>
Please login to merge, or discard this patch.
buildings.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@
 block discarded – undo
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($lang['player_option_building_sort'][$building_sort])) {
24
+if ($building_sort = sys_get_param_id('sort_elements')) {
25
+  if (!empty($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
   }
Please login to merge, or discard this patch.