@@ -19,8 +19,8 @@ |
||
19 | 19 | $template = SnTemplate::gettemplate('banned_body', true); |
20 | 20 | |
21 | 21 | $query = doquery("SELECT * FROM {{banned}} ORDER BY `ban_id` DESC;"); |
22 | -$i=0; |
|
23 | -while($ban_row = db_fetch($query)) |
|
22 | +$i = 0; |
|
23 | +while ($ban_row = db_fetch($query)) |
|
24 | 24 | { |
25 | 25 | $template->assign_block_vars('banlist', array( |
26 | 26 | 'USER_NAME' => $ban_row['ban_user_name'], |
@@ -26,7 +26,9 @@ |
||
26 | 26 | * DO NOT CHANGE |
27 | 27 | */ |
28 | 28 | |
29 | -if (!defined('INSIDE')) die(); |
|
29 | +if (!defined('INSIDE')) { |
|
30 | + die(); |
|
31 | +} |
|
30 | 32 | |
31 | 33 | |
32 | 34 | $a_lang_array = [ |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | } |
161 | 161 | |
162 | 162 | if (is_array($pay_link) && in_array($pay_link['PAY_LINK_METHOD'], array('POST', 'GET', 'LINK', 'STEP', 'REDIRECT'))) { |
163 | - if($pay_link['PAY_LINK_METHOD'] == 'REDIRECT') { |
|
163 | + if ($pay_link['PAY_LINK_METHOD'] == 'REDIRECT') { |
|
164 | 164 | sys_redirect($pay_link['PAY_LINK_URL']); |
165 | 165 | } |
166 | 166 | |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | 'PLAYER_CURRENCY' => $player_currency, |
235 | 235 | 'PLAYER_CURRENCY_PRICE_PER_MM' => sn_module_payment::currency_convert(1, $player_currency, 'MM_', 10), |
236 | 236 | |
237 | - 'UNIT_AMOUNT' => (float)$request['metamatter'], |
|
237 | + 'UNIT_AMOUNT' => (float) $request['metamatter'], |
|
238 | 238 | 'UNIT_AMOUNT_TEXT' => HelperString::numberFloorAndFormat($request['metamatter']), |
239 | 239 | 'UNIT_AMOUNT_BONUS_PERCENT' => $bonus_percent, |
240 | 240 | 'UNIT_AMOUNT_TEXT_DISCOUNTED' => $income_metamatter_text, |
@@ -160,10 +160,10 @@ |
||
160 | 160 | $paymentMethodId = 0; |
161 | 161 | } |
162 | 162 | |
163 | - if(!$paymentMethodId) { |
|
163 | + if (!$paymentMethodId) { |
|
164 | 164 | $module = $this->modulesInstalled[$moduleName]; |
165 | 165 | $methodsOnModule = $module->getMethodList(); |
166 | - if(count($methodsOnModule) == 1) { |
|
166 | + if (count($methodsOnModule) == 1) { |
|
167 | 167 | $paymentMethodId = HelperArray::array_key_first($methodsOnModule); |
168 | 168 | } |
169 | 169 | } |
@@ -63,7 +63,7 @@ |
||
63 | 63 | $url = HttpUrl::spawn($this->gc) |
64 | 64 | ->parseUrl(SN_ROOT_VIRTUAL) |
65 | 65 | ->addPath('index.php') |
66 | - ->addParams(['page' => 'worker', 'mode' => 'dispatchFleets',]); |
|
66 | + ->addParams(['page' => 'worker', 'mode' => 'dispatchFleets', ]); |
|
67 | 67 | |
68 | 68 | sn_get_url_contents($url->urlSigned()); |
69 | 69 |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | |
24 | 24 | define('IN_AJAX', true); |
25 | 25 | |
26 | - if(!is_object($template)) { |
|
26 | + if (!is_object($template)) { |
|
27 | 27 | $template = SnTemplate::gettemplate('_ajax', true); |
28 | 28 | } |
29 | 29 | |
@@ -51,11 +51,11 @@ discard block |
||
51 | 51 | * @var IPage $page |
52 | 52 | */ |
53 | 53 | $page = new $className(); |
54 | - if(method_exists($page, 'loadParams')) { |
|
54 | + if (method_exists($page, 'loadParams')) { |
|
55 | 55 | $page->loadParams(); |
56 | 56 | } |
57 | 57 | |
58 | - if(method_exists($page, $action = sys_get_param_str('action')) && $page->checkAction($action)) { |
|
58 | + if (method_exists($page, $action = sys_get_param_str('action')) && $page->checkAction($action)) { |
|
59 | 59 | $result = $page->$action(); |
60 | 60 | is_array($result) ? HelperArray::merge($template_result['AJAX'], $result) : false; |
61 | 61 | } |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | } |
86 | 86 | |
87 | 87 | // Checking task lock |
88 | - if (is_object($this->lock) && !$this->lock->attemptLock(function () { |
|
88 | + if (is_object($this->lock) && !$this->lock->attemptLock(function() { |
|
89 | 89 | return $this->proceedLockExpiration(); |
90 | 90 | }, SN_TIME_NOW)) { |
91 | 91 | |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | */ |
153 | 153 | protected function updateTaskLastRunTime($time) { |
154 | 154 | $this->db->transactionWrap( |
155 | - function () use ($time) { |
|
155 | + function() use ($time) { |
|
156 | 156 | $this->config->dateWrite($this->configName, $time, classConfig::DATE_TYPE_SQL_STRING); |
157 | 157 | } |
158 | 158 | ); |
@@ -110,123 +110,123 @@ |
||
110 | 110 | |
111 | 111 | // Services -------------------------------------------------------------------------------------------------------- |
112 | 112 | // Default db |
113 | - $gc->request = function (GlobalContainer $c) { |
|
113 | + $gc->request = function(GlobalContainer $c) { |
|
114 | 114 | $httpRequest = new HttpRequest($c); |
115 | 115 | $httpRequest->fillCurrent(); |
116 | 116 | |
117 | 117 | return $httpRequest; |
118 | 118 | }; |
119 | 119 | |
120 | - $gc->db = function (GlobalContainer $c) { |
|
120 | + $gc->db = function(GlobalContainer $c) { |
|
121 | 121 | SN::$db = new db_mysql($c); |
122 | 122 | |
123 | 123 | return SN::$db; |
124 | 124 | }; |
125 | 125 | |
126 | - $gc->debug = function (/** @noinspection PhpUnusedParameterInspection */ |
|
126 | + $gc->debug = function(/** @noinspection PhpUnusedParameterInspection */ |
|
127 | 127 | GlobalContainer $c) { |
128 | 128 | return new debug(); |
129 | 129 | }; |
130 | 130 | |
131 | - $gc->cache = function (GlobalContainer $gc) { |
|
131 | + $gc->cache = function(GlobalContainer $gc) { |
|
132 | 132 | return new classCache($gc->cachePrefix); |
133 | 133 | }; |
134 | 134 | |
135 | - $gc->config = function (GlobalContainer $gc) { |
|
135 | + $gc->config = function(GlobalContainer $gc) { |
|
136 | 136 | return new classConfig($gc->cachePrefix); |
137 | 137 | }; |
138 | 138 | |
139 | - $gc->crypto = function (GlobalContainer $gc) { |
|
139 | + $gc->crypto = function(GlobalContainer $gc) { |
|
140 | 140 | return new Crypto($gc); |
141 | 141 | }; |
142 | 142 | |
143 | - $gc->worker = function (GlobalContainer $gc) { |
|
143 | + $gc->worker = function(GlobalContainer $gc) { |
|
144 | 144 | return new Worker($gc); |
145 | 145 | }; |
146 | 146 | |
147 | - $gc->repository = function (GlobalContainer $gc) { |
|
147 | + $gc->repository = function(GlobalContainer $gc) { |
|
148 | 148 | /** @noinspection PhpDeprecationInspection */ |
149 | 149 | return new Repository($gc); |
150 | 150 | }; |
151 | 151 | |
152 | - $gc->storage = function (GlobalContainer $gc) { |
|
152 | + $gc->storage = function(GlobalContainer $gc) { |
|
153 | 153 | /** @noinspection PhpDeprecationInspection */ |
154 | 154 | return new Storage($gc); |
155 | 155 | }; |
156 | 156 | |
157 | - $gc->repoV2 = function (GlobalContainer $gc) { |
|
157 | + $gc->repoV2 = function(GlobalContainer $gc) { |
|
158 | 158 | return new RepoV2($gc); |
159 | 159 | }; |
160 | 160 | |
161 | - $gc->storageV2 = function (GlobalContainer $gc) { |
|
161 | + $gc->storageV2 = function(GlobalContainer $gc) { |
|
162 | 162 | return new StorageV2($gc); |
163 | 163 | }; |
164 | 164 | |
165 | - $gc->storageSqlV2 = function (GlobalContainer $gc) { |
|
165 | + $gc->storageSqlV2 = function(GlobalContainer $gc) { |
|
166 | 166 | return new StorageSqlV2($gc); |
167 | 167 | }; |
168 | 168 | |
169 | - $gc->design = function (GlobalContainer $gc) { |
|
169 | + $gc->design = function(GlobalContainer $gc) { |
|
170 | 170 | return new Design($gc); |
171 | 171 | }; |
172 | 172 | |
173 | - $gc->bbCodeParser = function (GlobalContainer $gc) { |
|
173 | + $gc->bbCodeParser = function(GlobalContainer $gc) { |
|
174 | 174 | return new BBCodeParser($gc); |
175 | 175 | }; |
176 | 176 | |
177 | - $gc->fleetDispatcher = function (GlobalContainer $gc) { |
|
177 | + $gc->fleetDispatcher = function(GlobalContainer $gc) { |
|
178 | 178 | return new FleetDispatcher($gc); |
179 | 179 | }; |
180 | 180 | |
181 | - $gc->watchdog = function (GlobalContainer $gc) { |
|
181 | + $gc->watchdog = function(GlobalContainer $gc) { |
|
182 | 182 | return new Watchdog($gc); |
183 | 183 | }; |
184 | 184 | |
185 | - $gc->valueStorage = function (/** @noinspection PhpUnusedParameterInspection */ GlobalContainer $gc) { |
|
185 | + $gc->valueStorage = function(/** @noinspection PhpUnusedParameterInspection */ GlobalContainer $gc) { |
|
186 | 186 | return new ValueStorage([]); |
187 | 187 | }; |
188 | 188 | |
189 | - $gc->bonusCatalog = function (GlobalContainer $gc) { |
|
189 | + $gc->bonusCatalog = function(GlobalContainer $gc) { |
|
190 | 190 | return new BonusCatalog($gc); |
191 | 191 | }; |
192 | 192 | |
193 | - $gc->general = function (GlobalContainer $gc) { |
|
193 | + $gc->general = function(GlobalContainer $gc) { |
|
194 | 194 | return new General($gc); |
195 | 195 | }; |
196 | 196 | |
197 | - $gc->economicHelper = function (GlobalContainer $gc) { |
|
197 | + $gc->economicHelper = function(GlobalContainer $gc) { |
|
198 | 198 | return new EconomicHelper($gc); |
199 | 199 | }; |
200 | 200 | |
201 | - $gc->playerLevelHelper = function (GlobalContainer $gc) { |
|
201 | + $gc->playerLevelHelper = function(GlobalContainer $gc) { |
|
202 | 202 | return new PlayerLevelHelper($gc); |
203 | 203 | }; |
204 | 204 | |
205 | - $gc->pimp = function (GlobalContainer $gc) { |
|
205 | + $gc->pimp = function(GlobalContainer $gc) { |
|
206 | 206 | return new SnPimp($gc); |
207 | 207 | }; |
208 | 208 | |
209 | - $gc->modules = function (GlobalContainer $gc) { |
|
209 | + $gc->modules = function(GlobalContainer $gc) { |
|
210 | 210 | return new ModulesManager($gc); |
211 | 211 | }; |
212 | 212 | |
213 | 213 | // Dummy objects --------------------------------------------------------------------------------------------------- |
214 | - $gc->theUser = function (GlobalContainer $gc) { |
|
214 | + $gc->theUser = function(GlobalContainer $gc) { |
|
215 | 215 | return new TheUser($gc); |
216 | 216 | }; |
217 | 217 | |
218 | 218 | |
219 | 219 | // Models ---------------------------------------------------------------------------------------------------------- |
220 | 220 | $gc->skinEntityClass = SkinV2::class; |
221 | - $gc->skinModel = function (GlobalContainer $gc) { |
|
221 | + $gc->skinModel = function(GlobalContainer $gc) { |
|
222 | 222 | return new SkinModel($gc); |
223 | 223 | }; |
224 | 224 | |
225 | - $gc->textModel = function (GlobalContainer $gc) { |
|
225 | + $gc->textModel = function(GlobalContainer $gc) { |
|
226 | 226 | return new TextModel($gc); |
227 | 227 | }; |
228 | 228 | |
229 | - $gc->ignores = function (GlobalContainer $gc) { |
|
229 | + $gc->ignores = function(GlobalContainer $gc) { |
|
230 | 230 | return new PlayerIgnore($gc); |
231 | 231 | }; |
232 | 232 |
@@ -23,7 +23,9 @@ |
||
23 | 23 | * DO NOT CHANGE |
24 | 24 | */ |
25 | 25 | |
26 | -if (!defined('INSIDE')) die(); |
|
26 | +if (!defined('INSIDE')) { |
|
27 | + die(); |
|
28 | +} |
|
27 | 29 | |
28 | 30 | //$lang = array_merge($lang, |
29 | 31 | //$lang->merge( |