@@ -15,7 +15,7 @@ |
||
| 15 | 15 | |
| 16 | 16 | $combat_data = sn_ube_report_load(sys_get_param_str('cypher')); |
| 17 | 17 | |
| 18 | - if($combat_data != UBE_REPORT_NOT_FOUND) { |
|
| 18 | + if ($combat_data != UBE_REPORT_NOT_FOUND) { |
|
| 19 | 19 | sn_ube_report_generate($combat_data, $template_result); |
| 20 | 20 | $template = gettemplate('ube_combat_report', $template); |
| 21 | 21 | $template->assign_vars(array( |
@@ -14,14 +14,14 @@ |
||
| 14 | 14 | global $lang, $user, $planetrow; |
| 15 | 15 | |
| 16 | 16 | $tech_tree = array(); |
| 17 | - foreach(get_unit_param('techtree') as $unit_group_id => $unit_list) |
|
| 17 | + foreach (get_unit_param('techtree') as $unit_group_id => $unit_list) |
|
| 18 | 18 | { |
| 19 | 19 | $tech_tree[] = array( |
| 20 | 20 | 'NAME' => $lang['tech'][$unit_group_id], |
| 21 | 21 | 'GROUP_ID' => $unit_group_id, |
| 22 | 22 | ); |
| 23 | 23 | |
| 24 | - foreach($unit_list as $unit_id) |
|
| 24 | + foreach ($unit_list as $unit_id) |
|
| 25 | 25 | { |
| 26 | 26 | $sn_data_unit = get_unit_param($unit_id); |
| 27 | 27 | $level_basic = $sn_data_unit[P_STACKABLE] ? 0 : mrc_get_level($user, $planetrow, $unit_id, false, true); |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -function geoip_status(){return sn_function_call('geoip_status', array(&$result));} |
|
| 3 | +function geoip_status() {return sn_function_call('geoip_status', array(&$result)); } |
|
| 4 | 4 | function sn_geoip_status(&$result) { |
| 5 | 5 | return $result = false; |
| 6 | 6 | } |
| 7 | 7 | |
| 8 | -function geoip_ip_info($ip){return sn_function_call('geoip_ip_info', array($ip, &$result));} |
|
| 8 | +function geoip_ip_info($ip) {return sn_function_call('geoip_ip_info', array($ip, &$result)); } |
|
| 9 | 9 | function sn_geoip_ip_info($ip, &$result) { |
| 10 | 10 | return $result = false; |
| 11 | 11 | } |
@@ -7,8 +7,8 @@ |
||
| 7 | 7 | * |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -define('INSIDE' , true); |
|
| 11 | -define('INSTALL' , false); |
|
| 10 | +define('INSIDE', true); |
|
| 11 | +define('INSTALL', false); |
|
| 12 | 12 | |
| 13 | 13 | require('common.' . substr(strrchr(__FILE__, '.'), 1)); |
| 14 | 14 | |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | |
| 16 | 16 | include('includes/init.' . substr(strrchr(__FILE__, '.'), 1)); |
| 17 | 17 | // die(); |
| 18 | -if($template_result[F_USER_IS_AUTHORIZED]) { |
|
| 18 | +if ($template_result[F_USER_IS_AUTHORIZED]) { |
|
| 19 | 19 | sys_redirect('index' . DOT_PHP_EX); |
| 20 | 20 | } |
| 21 | 21 | lng_include('login'); |
@@ -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' => $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 | } |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | */ |
| 36 | 36 | // OK 4.9 |
| 37 | 37 | public function __construct($filename = __FILE__) { |
| 38 | - if($this->provider_id == ACCOUNT_PROVIDER_NONE) { |
|
| 38 | + if ($this->provider_id == ACCOUNT_PROVIDER_NONE) { |
|
| 39 | 39 | die('У всех провайдеров должен быть $provider_id!'); |
| 40 | 40 | } |
| 41 | 41 | |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | // OK 4.6 |
| 134 | 134 | public function player_name_suggest() { |
| 135 | 135 | $name = ''; |
| 136 | - if(is_object($this->account) && !empty($this->account->account_email)) { |
|
| 136 | + if (is_object($this->account) && !empty($this->account->account_email)) { |
|
| 137 | 137 | list($name) = explode('@', $this->account->account_email); |
| 138 | 138 | } |
| 139 | 139 | |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | // $query = static::$db->doquery("SELECT `id` FROM {{confirmations}} WHERE `code` = '{$confirm_code_safe}' AND `type` = {$confirmation_type_safe} FOR UPDATE", true); |
| 42 | 42 | // Тип не нужен для проверки - код подтверждения должен быть уникален от слова "совсем" |
| 43 | 43 | $query = $this->db->doquery("SELECT `id` FROM {{confirmations}} WHERE `code` = '{$confirm_code_safe}' FOR UPDATE", true); |
| 44 | - } while($query); |
|
| 44 | + } while ($query); |
|
| 45 | 45 | |
| 46 | 46 | $this->db->doquery( |
| 47 | 47 | "REPLACE INTO {{confirmations}} |
@@ -89,15 +89,15 @@ discard block |
||
| 89 | 89 | // Инфа об устройстве и браузере - общая для всех |
| 90 | 90 | sn_db_transaction_start(); |
| 91 | 91 | $this->device_cypher = $_COOKIE[SN_COOKIE_D]; |
| 92 | - if($this->device_cypher) { |
|
| 92 | + if ($this->device_cypher) { |
|
| 93 | 93 | $cypher_safe = db_escape($this->device_cypher); |
| 94 | 94 | $device_id = doquery("SELECT `device_id` FROM {{security_device}} WHERE `device_cypher` = '{$cypher_safe}' LIMIT 1 FOR UPDATE", true); |
| 95 | - if(!empty($device_id['device_id'])) { |
|
| 95 | + if (!empty($device_id['device_id'])) { |
|
| 96 | 96 | $this->device_id = $device_id['device_id']; |
| 97 | 97 | } |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | - if($this->device_id <= 0) { |
|
| 100 | + if ($this->device_id <= 0) { |
|
| 101 | 101 | do { |
| 102 | 102 | $cypher_safe = db_escape($this->device_cypher = sys_random_string()); |
| 103 | 103 | $row = doquery("SELECT `device_id` FROM {{security_device}} WHERE `device_cypher` = '{$cypher_safe}' LIMIT 1 FOR UPDATE", true); |
@@ -118,10 +118,10 @@ discard block |
||
| 118 | 118 | $this->page_address_id = db_get_set_unique_id_value($this->page_address, 'url_id', 'security_url', 'url_string'); |
| 119 | 119 | sn_db_transaction_commit(); |
| 120 | 120 | |
| 121 | - if($this->write_full_url) { |
|
| 121 | + if ($this->write_full_url) { |
|
| 122 | 122 | sn_db_transaction_start(); |
| 123 | 123 | $this->page_url = substr($_SERVER['REQUEST_URI'], strlen(SN_ROOT_RELATIVE)); |
| 124 | - if(strpos($_SERVER['REQUEST_URI'], '/simulator.php') === 0) { |
|
| 124 | + if (strpos($_SERVER['REQUEST_URI'], '/simulator.php') === 0) { |
|
| 125 | 125 | $this->page_url = '/simulator.php'; |
| 126 | 126 | } |
| 127 | 127 | $this->page_url_id = db_get_set_unique_id_value($this->page_url, 'url_id', 'security_url', 'url_string'); |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | */ |
| 145 | 145 | public function db_security_entry_insert($user_id_unsafe) { |
| 146 | 146 | // TODO $user_id = !empty(self::$user['id']) ? self::$user['id'] : 'NULL'; |
| 147 | - if(empty($user_id_unsafe)) { |
|
| 147 | + if (empty($user_id_unsafe)) { |
|
| 148 | 148 | // self::flog('Нет ИД пользователя'); |
| 149 | 149 | return true; |
| 150 | 150 | } |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | public function db_counter_insert($user_id_unsafe) { |
| 168 | 168 | global $config, $sys_stop_log_hit, $is_watching; |
| 169 | 169 | |
| 170 | - if($sys_stop_log_hit || !$config->game_counter) { |
|
| 170 | + if ($sys_stop_log_hit || !$config->game_counter) { |
|
| 171 | 171 | return; |
| 172 | 172 | } |
| 173 | 173 | |
@@ -183,14 +183,14 @@ discard block |
||
| 183 | 183 | // $this->ip_v4_int . ", '{$proxy_safe}', " . $this->page_address_id . ", " . $this->page_url_id . ");"); |
| 184 | 184 | doquery( |
| 185 | 185 | "INSERT INTO {{counter}} SET |
| 186 | - `visit_time` = '" . SN_TIME_SQL. "', |
|
| 186 | + `visit_time` = '" . SN_TIME_SQL . "', |
|
| 187 | 187 | `user_id` = {$user_id_safe}, |
| 188 | 188 | `device_id` = {$this->device_id}, |
| 189 | 189 | `browser_id` = {$this->browser_id}, |
| 190 | 190 | `user_ip` = {$this->ip_v4_int}, |
| 191 | 191 | `user_proxy` = '{$proxy_safe}', |
| 192 | 192 | `page_url_id` = {$this->page_address_id}" . |
| 193 | - ($this->write_full_url ? ", `plain_url_id` = {$this->page_url_id}" : '' ). |
|
| 193 | + ($this->write_full_url ? ", `plain_url_id` = {$this->page_url_id}" : '') . |
|
| 194 | 194 | ";"); |
| 195 | 195 | |
| 196 | 196 | $is_watching = false; |