@@ -14,13 +14,13 @@ |
||
14 | 14 | */ |
15 | 15 | |
16 | 16 | $allow_anonymous = true; |
17 | -include('common.' . substr(strrchr(__FILE__, '.'), 1)); |
|
17 | +include('common.'.substr(strrchr(__FILE__, '.'), 1)); |
|
18 | 18 | |
19 | 19 | $template = gettemplate('banned_body', true); |
20 | 20 | |
21 | 21 | $query = db_banned_list_select(); |
22 | 22 | $i = 0; |
23 | -while($ban_row = db_fetch($query)) { |
|
23 | +while ($ban_row = db_fetch($query)) { |
|
24 | 24 | $template->assign_block_vars('banlist', array( |
25 | 25 | 'USER_NAME' => $ban_row['ban_user_name'], |
26 | 26 | 'REASON' => $ban_row['ban_reason'], |
@@ -1,15 +1,15 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if(isset($sn_page_name) || ($sn_page_name = isset($_GET['page']) ? trim(strip_tags($_GET['page'])) : '')) { |
|
4 | - require_once('common.' . substr(strrchr(__FILE__, '.'), 1)); |
|
3 | +if (isset($sn_page_name) || ($sn_page_name = isset($_GET['page']) ? trim(strip_tags($_GET['page'])) : '')) { |
|
4 | + require_once('common.'.substr(strrchr(__FILE__, '.'), 1)); |
|
5 | 5 | |
6 | - if($sn_page_name) { |
|
6 | + if ($sn_page_name) { |
|
7 | 7 | // Loading page-specific language files |
8 | 8 | global $template; |
9 | 9 | !empty(classSupernova::$sn_mvc['model'][$sn_page_name]) ? execute_hooks(classSupernova::$sn_mvc['model'][$sn_page_name], $template, 'model', $sn_page_name) : false; |
10 | 10 | !empty(classSupernova::$sn_mvc['view'][$sn_page_name]) ? execute_hooks(classSupernova::$sn_mvc['view'][$sn_page_name], $template, 'view', $sn_page_name) : false; |
11 | 11 | |
12 | - if(!empty($template_result) && is_object($template)) { |
|
12 | + if (!empty($template_result) && is_object($template)) { |
|
13 | 13 | $template->assign_recursive($template_result); |
14 | 14 | } |
15 | 15 | display($template, '', true, '', defined('IN_ADMIN') && (IN_ADMIN === true), true); |
@@ -1,12 +1,12 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include('common.' . substr(strrchr(__FILE__, '.'), 1)); |
|
3 | +include('common.'.substr(strrchr(__FILE__, '.'), 1)); |
|
4 | 4 | |
5 | 5 | global $user, $planetrow; |
6 | 6 | |
7 | -if(!empty($_POST['return']) && is_array($_POST['return'])) { |
|
8 | - foreach($_POST['return'] as $fleet_id) { |
|
9 | - if($fleet_id = idval($fleet_id)) { |
|
7 | +if (!empty($_POST['return']) && is_array($_POST['return'])) { |
|
8 | + foreach ($_POST['return'] as $fleet_id) { |
|
9 | + if ($fleet_id = idval($fleet_id)) { |
|
10 | 10 | sn_db_transaction_start(); |
11 | 11 | $objFleet = new Fleet(); |
12 | 12 | $objFleet->dbLoad($fleet_id); |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | lng_include('overview'); |
31 | 31 | lng_include('fleet'); |
32 | 32 | |
33 | -if(!$planetrow) { |
|
33 | +if (!$planetrow) { |
|
34 | 34 | message(classLocale::$lang['fl_noplanetrow'], classLocale::$lang['fl_error']); |
35 | 35 | } |
36 | 36 | |
@@ -38,14 +38,14 @@ discard block |
||
38 | 38 | |
39 | 39 | $i = 0; |
40 | 40 | $objFleetList = FleetList::dbGetFleetListByOwnerId($user['id']); |
41 | -if(!empty($objFleetList)) { |
|
42 | - foreach($objFleetList->_container as $fleet_id => $objFleet) { |
|
41 | +if (!empty($objFleetList)) { |
|
42 | + foreach ($objFleetList->_container as $fleet_id => $objFleet) { |
|
43 | 43 | $i++; |
44 | 44 | $fleet_data = tplParseFleetObject($objFleet, $i, $user); |
45 | 45 | |
46 | 46 | $template->assign_block_vars('fleets', $fleet_data['fleet']); |
47 | 47 | |
48 | - foreach($fleet_data['ships'] as $ship_data) { |
|
48 | + foreach ($fleet_data['ships'] as $ship_data) { |
|
49 | 49 | $template->assign_block_vars('fleets.ships', $ship_data); |
50 | 50 | } |
51 | 51 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * |
10 | 10 | */ |
11 | 11 | |
12 | -require_once('common.' . substr(strrchr(__FILE__, '.'), 1)); |
|
12 | +require_once('common.'.substr(strrchr(__FILE__, '.'), 1)); |
|
13 | 13 | |
14 | 14 | define('SN_IN_MARKET', true); |
15 | 15 | |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | $newstock = $stock; |
27 | 27 | $intError = MARKET_DEAL; |
28 | 28 | |
29 | -switch($mode) |
|
29 | +switch ($mode) |
|
30 | 30 | { |
31 | 31 | case MARKET_RESOURCES: // Resource trader |
32 | 32 | require('includes/includes/market_trader.inc'); |
@@ -82,12 +82,12 @@ discard block |
||
82 | 82 | } |
83 | 83 | |
84 | 84 | $message_id = sys_get_param_int('message'); |
85 | -if($message_id != MARKET_NOTHING) |
|
85 | +if ($message_id != MARKET_NOTHING) |
|
86 | 86 | { |
87 | 87 | $template->assign_block_vars('result', array('MESSAGE' => classLocale::$lang['eco_mrk_errors'][$message_id])); |
88 | 88 | } |
89 | 89 | |
90 | -if($message) |
|
90 | +if ($message) |
|
91 | 91 | { |
92 | 92 | $template->assign_block_vars('result', array('MESSAGE' => $message)); |
93 | 93 | } |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | |
15 | 15 | $allow_anonymous = true; |
16 | -include('includes/init.' . substr(strrchr(__FILE__, '.'), 1)); |
|
16 | +include('includes/init.'.substr(strrchr(__FILE__, '.'), 1)); |
|
17 | 17 | |
18 | 18 | lng_include('overview'); |
19 | 19 |
@@ -12,27 +12,27 @@ 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_id('delete')) { |
|
21 | +if ($delete = sys_get_param_id('delete')) { |
|
22 | 22 | db_log_delete_by_id($delete); |
23 | -} elseif(sys_get_param_str('delete_update_info')) { |
|
23 | +} elseif (sys_get_param_str('delete_update_info')) { |
|
24 | 24 | db_log_delete_update_and_stat_calc(); |
25 | -} elseif(sys_get_param_str('deleteall') == 'yes') { |
|
25 | +} elseif (sys_get_param_str('deleteall') == 'yes') { |
|
26 | 26 | // doquery("TRUNCATE TABLE `{{logs}}`"); |
27 | 27 | } |
28 | 28 | |
29 | -if($detail = sys_get_param_id('detail')) { |
|
29 | +if ($detail = sys_get_param_id('detail')) { |
|
30 | 30 | $template = gettemplate('admin/adm_log_main_detail', true); |
31 | 31 | |
32 | 32 | $errorInfo = db_log_get_by_id($detail); |
33 | 33 | $error_dump = unserialize($errorInfo['log_dump']); |
34 | - if(is_array($error_dump)) { |
|
35 | - foreach($error_dump as $key => $value) { |
|
34 | + if (is_array($error_dump)) { |
|
35 | + foreach ($error_dump as $key => $value) { |
|
36 | 36 | $v = array( |
37 | 37 | 'VAR_NAME' => $key, |
38 | 38 | 'VAR_VALUE' => $key == 'query_log' ? $value : dump($value, $key) |
@@ -47,10 +47,10 @@ discard block |
||
47 | 47 | |
48 | 48 | $i = 0; |
49 | 49 | $query = db_log_list_get_last_100(); |
50 | - while($u = db_fetch($query)) { |
|
50 | + while ($u = db_fetch($query)) { |
|
51 | 51 | $i++; |
52 | 52 | $v = array(); |
53 | - foreach($u as $key => $value) { |
|
53 | + foreach ($u as $key => $value) { |
|
54 | 54 | $v[strtoupper($key)] = $value; |
55 | 55 | } |
56 | 56 | $template->assign_block_vars('error', $v); |
@@ -14,9 +14,9 @@ discard block |
||
14 | 14 | define('INSTALL', false); |
15 | 15 | define('IN_ADMIN', true); |
16 | 16 | |
17 | -require('../common.' . substr(strrchr(__FILE__, '.'), 1)); |
|
17 | +require('../common.'.substr(strrchr(__FILE__, '.'), 1)); |
|
18 | 18 | |
19 | -if($user['authlevel'] < 1) { |
|
19 | +if ($user['authlevel'] < 1) { |
|
20 | 20 | AdminMessage(classLocale::$lang['adm_err_denied']); |
21 | 21 | } |
22 | 22 | |
@@ -28,8 +28,8 @@ discard block |
||
28 | 28 | $template = gettemplate("admin/admin_ban", true); |
29 | 29 | |
30 | 30 | $player_banned_row = db_user_by_username($name_unsafe); |
31 | -if($mode == 'banit' && $action) { |
|
32 | - if($player_banned_row) { |
|
31 | +if ($mode == 'banit' && $action) { |
|
32 | + if ($player_banned_row) { |
|
33 | 33 | $reas = $_POST['why']; |
34 | 34 | $days = $_POST['days']; |
35 | 35 | $hour = $_POST['hour']; |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | $adm_bn_thpl = classLocale::$lang['adm_bn_thpl']; |
50 | 50 | $DoneMessage = "{$adm_bn_thpl} {$name_output} {$adm_bn_isbn}"; |
51 | 51 | |
52 | - if($is_vacation) { |
|
52 | + if ($is_vacation) { |
|
53 | 53 | $DoneMessage .= classLocale::$lang['adm_bn_vctn']; |
54 | 54 | } |
55 | 55 | |
@@ -59,10 +59,10 @@ discard block |
||
59 | 59 | } |
60 | 60 | |
61 | 61 | AdminMessage($DoneMessage, classLocale::$lang['adm_ban_title']); |
62 | -} elseif($mode == 'unbanit' && $action) { |
|
62 | +} elseif ($mode == 'unbanit' && $action) { |
|
63 | 63 | sys_admin_player_ban_unset($user, $player_banned_row, ($reason = sys_get_param_str('why')) ? $reason : classLocale::$lang['sys_unbanned']); |
64 | 64 | |
65 | - $DoneMessage = classLocale::$lang['adm_unbn_thpl'] . " " . $name_output . " " . classLocale::$lang['adm_unbn_isbn']; |
|
65 | + $DoneMessage = classLocale::$lang['adm_unbn_thpl']." ".$name_output." ".classLocale::$lang['adm_unbn_isbn']; |
|
66 | 66 | AdminMessage($DoneMessage, classLocale::$lang['adm_unbn_ttle']); |
67 | 67 | }; |
68 | 68 |
@@ -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 | |
@@ -25,8 +25,8 @@ discard block |
||
25 | 25 | ); |
26 | 26 | |
27 | 27 | $query = db_payment_list_payers(); |
28 | -while($row = db_fetch($query)) { |
|
29 | - $payer_list[$row['payment_user_id']] = '[' . $row['payment_user_id'] . '] ' . $row['payment_user_name']; |
|
28 | +while ($row = db_fetch($query)) { |
|
29 | + $payer_list[$row['payment_user_id']] = '['.$row['payment_user_id'].'] '.$row['payment_user_name']; |
|
30 | 30 | } |
31 | 31 | tpl_assign_select($template, 'payer', $payer_list); |
32 | 32 | |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | ); |
36 | 36 | |
37 | 37 | $query = db_payment_list_modules(); |
38 | -while($row = db_fetch($query)) { |
|
38 | +while ($row = db_fetch($query)) { |
|
39 | 39 | $module_list[$row['payment_module_name']] = $row['payment_module_name']; |
40 | 40 | } |
41 | 41 | tpl_assign_select($template, 'module', $module_list); |
@@ -50,9 +50,9 @@ discard block |
||
50 | 50 | |
51 | 51 | $query = db_payment_list_get($flt_payer, $flt_status, $flt_test, $flt_module); |
52 | 52 | |
53 | -while($row = db_fetch($query)) { |
|
53 | +while ($row = db_fetch($query)) { |
|
54 | 54 | $row2 = array(); |
55 | - foreach($row as $key => $value) { |
|
55 | + foreach ($row as $key => $value) { |
|
56 | 56 | $row2[strtoupper($key)] = $value; |
57 | 57 | } |
58 | 58 | $template->assign_block_vars('payment', $row2); |
@@ -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'); |