Completed
Pull Request — master (#71)
by Sam
11:59
created
gfunctions.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -286,6 +286,9 @@
 block discarded – undo
286 286
     return substr(str_shuffle('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'), 0, $length);
287 287
 }
288 288
 
289
+/**
290
+ * @param integer $type
291
+ */
289 292
 function stripArray($input, $type)
290 293
 {
291 294
     switch ($type) {
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -174,12 +174,12 @@  discard block
 block discarded – undo
174 174
     echo "<br><div class='row'><div class='col-lg-12'>";
175 175
     echo "<div class='alert alert-danger alert-dismissable'>";
176 176
     echo "<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>";
177
-    echo "<i class='fa fa-info-circle'></i> " . $text . "</div></div></div>";
177
+    echo "<i class='fa fa-info-circle'></i> ".$text."</div></div></div>";
178 178
 }
179 179
 
180 180
 function error($errno, $errstr, $errfile, $errline)
181 181
 {
182
-    echo '<h4><b>PHP ERROR ' . $errno . '</b> ' . $errstr . ' - ' . $errfile . ':' . $errline . '</h4>';
182
+    echo '<h4><b>PHP ERROR '.$errno.'</b> '.$errstr.' - '.$errfile.':'.$errline.'</h4>';
183 183
 }
184 184
 
185 185
 /**
@@ -226,19 +226,19 @@  discard block
 block discarded – undo
226 226
         case 37:
227 227
             return $lang['noLic']; //No License
228 228
         case 371:
229
-            return $lang['no'] . ' ' . $lang['civil'] . ' ' . $lang['licenses']; //No Civillian Licenses
229
+            return $lang['no'].' '.$lang['civil'].' '.$lang['licenses']; //No Civillian Licenses
230 230
         case 372:
231
-            return $lang['no'] . ' ' . $lang['medic'] . ' ' . $lang['licenses']; //No Medic Licenses
231
+            return $lang['no'].' '.$lang['medic'].' '.$lang['licenses']; //No Medic Licenses
232 232
         case 373:
233
-            return $lang['no'] . ' ' . $lang['police'] . ' ' . $lang['licenses']; //No Police Licenses
233
+            return $lang['no'].' '.$lang['police'].' '.$lang['licenses']; //No Police Licenses
234 234
         case 38:
235
-            return $lang['no'] . ' ' . $lang['gear']; //No License
235
+            return $lang['no'].' '.$lang['gear']; //No License
236 236
         case 381:
237
-            return $lang['no'] . ' ' . $lang['civil'] . ' ' . $lang['gear']; //No Civillian Licenses
237
+            return $lang['no'].' '.$lang['civil'].' '.$lang['gear']; //No Civillian Licenses
238 238
         case 382:
239
-            return $lang['no'] . ' ' . $lang['medic'] . ' ' . $lang['gear']; //No Medic Licenses
239
+            return $lang['no'].' '.$lang['medic'].' '.$lang['gear']; //No Medic Licenses
240 240
         case 383:
241
-            return $lang['no'] . ' ' . $lang['police'] . ' ' . $lang['gear']; //No Police Licenses
241
+            return $lang['no'].' '.$lang['police'].' '.$lang['gear']; //No Police Licenses
242 242
     }
243 243
 }
244 244
 
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
     $max = ceil($length / 40);
248 248
     $random = '';
249 249
     for ($i = 0; $i < $max; $i++) {
250
-        $random .= sha1(microtime(true) . mt_rand(10000, 90000));
250
+        $random .= sha1(microtime(true).mt_rand(10000, 90000));
251 251
     }
252 252
     return substr($random, 0, $length);
253 253
 }
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 {
257 257
     $settings = require('config/settings.php');
258 258
     if (!empty($settings['steamAPI'])) {
259
-        $api = "http://api.steampowered.com/ISteamUser/GetPlayerBans/v1/?key=" . $settings['steamAPI'] . "&steamids=" . $PID;
259
+        $api = "http://api.steampowered.com/ISteamUser/GetPlayerBans/v1/?key=".$settings['steamAPI']."&steamids=".$PID;
260 260
         $bans = json_decode(file_get_contents($api), true);
261 261
         if ($bans['players']['0']['VACBanned']) {
262 262
             return '<h4><span class="label label-danger" style="margin-left:3px; line-height:2;">VAC BANNED</span></h4>';
@@ -356,14 +356,14 @@  discard block
 block discarded – undo
356 356
     }
357 357
 }
358 358
 
359
-function getGravatar($email, $s = 80, $d = 'mm', $r = 'x', $img = false, $atts = array() ) {
359
+function getGravatar($email, $s = 80, $d = 'mm', $r = 'x', $img = false, $atts = array()) {
360 360
     $url = 'https://www.gravatar.com/avatar/';
361
-    $url .= md5( strtolower( trim( $email ) ) );
361
+    $url .= md5(strtolower(trim($email)));
362 362
     $url .= "?s=$s&d=$d&r=$r";
363
-    if ( $img ) {
364
-        $url = '<img src="' . $url . '"';
365
-        foreach ( $atts as $key => $val )
366
-            $url .= ' ' . $key . '="' . $val . '"';
363
+    if ($img) {
364
+        $url = '<img src="'.$url.'"';
365
+        foreach ($atts as $key => $val)
366
+            $url .= ' '.$key.'="'.$val.'"';
367 367
         $url .= ' />';
368 368
     }
369 369
     return $url;
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -362,8 +362,9 @@
 block discarded – undo
362 362
     $url .= "?s=$s&d=$d&r=$r";
363 363
     if ( $img ) {
364 364
         $url = '<img src="' . $url . '"';
365
-        foreach ( $atts as $key => $val )
366
-            $url .= ' ' . $key . '="' . $val . '"';
365
+        foreach ( $atts as $key => $val ) {
366
+                    $url .= ' ' . $key . '="' . $val . '"';
367
+        }
367 368
         $url .= ' />';
368 369
     }
369 370
     return $url;
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -37,8 +37,8 @@  discard block
 block discarded – undo
37 37
     }
38 38
 
39 39
     foreach ($settings['plugins'] as &$plugin) {
40
-        if (file_exists("plugins/" . $plugin . "/lang/lang.php")) {
41
-            include("plugins/" . $plugin . "/lang/lang.php");
40
+        if (file_exists("plugins/".$plugin."/lang/lang.php")) {
41
+            include("plugins/".$plugin."/lang/lang.php");
42 42
         }
43 43
     }
44 44
 
@@ -81,9 +81,9 @@  discard block
 block discarded – undo
81 81
 
82 82
     $key = 0;
83 83
     foreach ($settings['plugins'] as &$plugin) {
84
-        if (file_exists("plugins/" . $plugin . "/plugin.json")) {
85
-            if (file_exists("plugins/" . $plugin . "/init.php")) {
86
-                include("plugins/" . $plugin . "/init.php");
84
+        if (file_exists("plugins/".$plugin."/plugin.json")) {
85
+            if (file_exists("plugins/".$plugin."/init.php")) {
86
+                include("plugins/".$plugin."/init.php");
87 87
             }
88 88
         } else {
89 89
             if (array_count_values($settings['plugins']) <= 1) {
@@ -112,8 +112,8 @@  discard block
 block discarded – undo
112 112
             $_SESSION['formtoken'][1] = time();
113 113
 
114 114
             if (isset($_GET['items'])) {
115
-                if (in_array($_GET['items'],$settings['item'])) {
116
-                    $sql = "UPDATE `users` SET `items` = " . $_GET['items'] . " WHERE `user_id` = '" . $_SESSION['user_id'] . "';";
115
+                if (in_array($_GET['items'], $settings['item'])) {
116
+                    $sql = "UPDATE `users` SET `items` = ".$_GET['items']." WHERE `user_id` = '".$_SESSION['user_id']."';";
117 117
                     $db_connection->query($sql);
118 118
                     $_SESSION['items'] = intval($_GET['items']);
119 119
                 }
@@ -163,12 +163,12 @@  discard block
 block discarded – undo
163 163
                                 if ($query) {
164 164
                                     $search = $url['path'][$settings['base'] + 1];
165 165
                                 }
166
-                                logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 1);
166
+                                logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 1);
167 167
                                 $page = "views/life/messages.php";
168 168
                             } else {
169 169
                                 $err = errorMessage(5, $lang);
170 170
                                 $page = "views/templates/error.php";
171
-                                logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'messages'", 3);
171
+                                logAction($_SESSION['user_name'], $lang['failedAccess']." 'messages'", 3);
172 172
                             }
173 173
                         }
174 174
 
@@ -177,19 +177,19 @@  discard block
 block discarded – undo
177 177
                             if ($query) {
178 178
                                 $search = $url['path'][$settings['base'] + 1];
179 179
                             }
180
-                            logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 1);
180
+                            logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 1);
181 181
                             $page = "views/life/players.php";
182 182
                         } else {
183 183
                             $err = errorMessage(5, $lang);
184 184
                             $page = "views/templates/error.php";
185
-                            logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'players'", 3);
185
+                            logAction($_SESSION['user_name'], $lang['failedAccess']." 'players'", 3);
186 186
                         }
187 187
 
188 188
                     } elseif ($currentPage == 'editplayer') {
189 189
                         if ($_SESSION['permissions']['edit']['player']) {
190 190
                             if ($query) {
191 191
                                 $uID = $url['path'][$settings['base'] + 1];
192
-                                logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 1);
192
+                                logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 1);
193 193
                                 $page = "views/life/editPlayer.php";
194 194
                             } else {
195 195
                                 $err = errorMessage(8, $lang);
@@ -205,19 +205,19 @@  discard block
 block discarded – undo
205 205
                             if ($query) {
206 206
                                 $search = $url['path'][$settings['base'] + 1];
207 207
                             }
208
-                            logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 1);
208
+                            logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 1);
209 209
                             $page = "views/life/vehicles.php";
210 210
                         } else {
211 211
                             $err = errorMessage(5, $lang);
212 212
                             $page = "views/templates/error.php";
213
-                            logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'vehicles'", 3);
213
+                            logAction($_SESSION['user_name'], $lang['failedAccess']." 'vehicles'", 3);
214 214
                         }
215 215
 
216 216
                     } elseif ($currentPage == 'editveh') {
217 217
                         if ($_SESSION['permissions']['edit']['vehicles']) {
218 218
                             if ($query) {
219 219
                                 $vehID = $url['path'][$settings['base'] + 1];
220
-                                logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 1);
220
+                                logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 1);
221 221
                                 $page = "views/life/editVeh.php";
222 222
                             } else {
223 223
                                 $err = errorMessage(8, $lang);
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
                         } else {
227 227
                             $err = errorMessage(5, $lang);
228 228
                             $page = "views/templates/error.php";
229
-                            logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'editVeh'", 3);
229
+                            logAction($_SESSION['user_name'], $lang['failedAccess']." 'editVeh'", 3);
230 230
                         }
231 231
 
232 232
                     } elseif ($currentPage == 'medic') {
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
                             if ($query) {
235 235
                                 $search = $url['path'][$settings['base'] + 1];
236 236
                             }
237
-                            logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 1);
237
+                            logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 1);
238 238
                             $page = "views/life/medics.php";
239 239
                         }
240 240
                     } elseif ($currentPage == 'admins') {
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
                             if ($query) {
243 243
                                 $search = $url['path'][$settings['base'] + 1];
244 244
                             }
245
-                            logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 1);
245
+                            logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 1);
246 246
                             $page = "views/life/admins.php";
247 247
                         }
248 248
                     }  elseif ($currentPage == 'police') {
@@ -250,12 +250,12 @@  discard block
 block discarded – undo
250 250
                             if ($query) {
251 251
                                 $search = $url['path'][$settings['base'] + 1];
252 252
                             }
253
-                            logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 1);
253
+                            logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 1);
254 254
                             $page = "views/life/police.php";
255 255
                         } else {
256 256
                             $err = errorMessage(5, $lang);
257 257
                             $page = "views/templates/error.php";
258
-                            logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'houses'", 3);
258
+                            logAction($_SESSION['user_name'], $lang['failedAccess']." 'houses'", 3);
259 259
                         }
260 260
 
261 261
                     } elseif ($currentPage == 'houses') {
@@ -263,19 +263,19 @@  discard block
 block discarded – undo
263 263
                             if ($query) {
264 264
                                 $search = $url['path'][$settings['base'] + 1];
265 265
                             }
266
-                            logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 1);
266
+                            logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 1);
267 267
                             $page = "views/life/houses.php";
268 268
                         } else {
269 269
                             $err = errorMessage(5, $lang);
270 270
                             $page = "views/templates/error.php";
271
-                            logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'houses'", 3);
271
+                            logAction($_SESSION['user_name'], $lang['failedAccess']." 'houses'", 3);
272 272
                         }
273 273
 
274 274
                     } elseif ($currentPage == 'edithouse') {
275 275
                         if ($_SESSION['permissions']['edit']['houses']) {
276 276
                             if ($query) {
277 277
                                 $hID = $url['path'][$settings['base'] + 1];
278
-                                logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 1);
278
+                                logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 1);
279 279
                                 $page = "views/life/editHouse.php";
280 280
                             } else {
281 281
                                 $err = errorMessage(8, $lang);
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
                         } else {
285 285
                             $err = errorMessage(5, $lang);
286 286
                             $page = "views/templates/error.php";
287
-                            logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'editHouse'", 3);
287
+                            logAction($_SESSION['user_name'], $lang['failedAccess']." 'editHouse'", 3);
288 288
                         }
289 289
 
290 290
                     } elseif ($currentPage == 'gangs') {
@@ -292,19 +292,19 @@  discard block
 block discarded – undo
292 292
                             if ($query) {
293 293
                                 $search = $url['path'][$settings['base'] + 1];
294 294
                             }
295
-                            logAction($_SESSION['user_name'], $lang['visited'] . " 'gangs'", 1);
295
+                            logAction($_SESSION['user_name'], $lang['visited']." 'gangs'", 1);
296 296
                             $page = "views/life/gangs.php";
297 297
                         } else {
298 298
                             $err = errorMessage(5, $lang);
299 299
                             $page = "views/templates/error.php";
300
-                            logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'gangs'", 3);
300
+                            logAction($_SESSION['user_name'], $lang['failedAccess']." 'gangs'", 3);
301 301
                         }
302 302
 
303 303
                     } elseif ($currentPage == 'editgang') {
304 304
                         if ($_SESSION['permissions']['edit']['gangs']) {
305 305
                             if ($query) {
306 306
                                 $gID = $url['path'][$settings['base'] + 1];
307
-                                logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 1);
307
+                                logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 1);
308 308
                                 $page = "views/life/editGang.php";
309 309
                             } else {
310 310
                                 $err = errorMessage(8, $lang);
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
                         } else {
314 314
                             $err = errorMessage(5, $lang);
315 315
                             $page = "views/templates/error.php";
316
-                            logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'editGang'", 3);
316
+                            logAction($_SESSION['user_name'], $lang['failedAccess']." 'editGang'", 3);
317 317
                         }
318 318
 
319 319
                     } elseif ($currentPage == 'wanted') {
@@ -321,19 +321,19 @@  discard block
 block discarded – undo
321 321
                             if ($query) {
322 322
                                 $search = $url['path'][$settings['base'] + 1];
323 323
                             }
324
-                            logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 1);
324
+                            logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 1);
325 325
                             $page = "views/life/wanted.php";
326 326
                         } else {
327 327
                             $err = errorMessage(5, $lang);
328 328
                             $page = "views/templates/error.php";
329
-                            logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'wanted'", 3);
329
+                            logAction($_SESSION['user_name'], $lang['failedAccess']." 'wanted'", 3);
330 330
                         }
331 331
 
332 332
                     } elseif ($currentPage == 'editwanted') {
333 333
                         if ($_SESSION['permissions']['edit']['wanted']) {
334 334
                             if ($query) {
335 335
                                 $wantedID = $url['path'][$settings['base'] + 1];
336
-                                logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 1);
336
+                                logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 1);
337 337
                                 $page = "views/life/editWanted.php";
338 338
                             } else {
339 339
                                 $err = errorMessage(8, $lang);
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
                         } else {
343 343
                             $err = errorMessage(5, $lang);
344 344
                             $page = "views/templates/error.php";
345
-                            logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'editWanted'", 3);
345
+                            logAction($_SESSION['user_name'], $lang['failedAccess']." 'editWanted'", 3);
346 346
                         }
347 347
                     }
348 348
 
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
                     } elseif ($currentPage == 'editveh') {
355 355
                         if ($query) {
356 356
                             $vehID = $url['path'][$settings['base'] + 1];
357
-                            logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 1);
357
+                            logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 1);
358 358
                             $page = "views/steam/life/editVeh.php";
359 359
                         } else {
360 360
                             $err = errorMessage(8, $lang);
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
                     } elseif ($currentPage == 'edithouse') {
364 364
                         if ($query) {
365 365
                             $hID = $url['path'][$settings['base'] + 1];
366
-                            logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 1);
366
+                            logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 1);
367 367
                             $page = "views/steam/life/editHouse.php";
368 368
                         } else {
369 369
                             $err = errorMessage(8, $lang);
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
             }
375 375
             if ($currentPage == 'newdb' || $currentPage == 'newserver' || $currentPage == 'settings' || $currentPage == 'editstaff' || $currentPage == 'staff' || $currentPage == 'pluginstore' || $currentPage == 'newuser' || $currentPage == 'logs') {
376 376
                 if (isset($_POST['passTest'])) {
377
-                    $sql = "SELECT user_password_hash FROM users WHERE user_id = '" . $_SESSION['user_id'] . "';";
377
+                    $sql = "SELECT user_password_hash FROM users WHERE user_id = '".$_SESSION['user_id']."';";
378 378
                     $pass = $db_connection->query($sql)->fetch_object()->user_password_hash;
379 379
                     if (password_verify($_POST['passTest'], $pass)) {
380 380
                         $_SESSION['sudo'] = time();
@@ -387,38 +387,38 @@  discard block
 block discarded – undo
387 387
                     } else {
388 388
                         if ($currentPage == 'newdb') {
389 389
                             if ($_SESSION['permissions']['super_admin']) {
390
-                                logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 2);
390
+                                logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 2);
391 391
                                 $page = "views/core/newDB.php";
392 392
                             } else {
393 393
                                 $err = errorMessage(5, $lang);
394 394
                                 $page = "views/templates/error.php";
395
-                                logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'newDB'", 3);
395
+                                logAction($_SESSION['user_name'], $lang['failedAccess']." 'newDB'", 3);
396 396
                             }
397 397
                         } elseif ($currentPage == 'newserver') {
398 398
                             if ($_SESSION['permissions']['super_admin']) {
399
-                                logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 2);
399
+                                logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 2);
400 400
                                 $page = "views/core/newServer.php";
401 401
                             } else {
402 402
                                 $err = errorMessage(5, $lang);
403 403
                                 $page = "views/templates/error.php";
404
-                                logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'newServer'", 3);
404
+                                logAction($_SESSION['user_name'], $lang['failedAccess']." 'newServer'", 3);
405 405
                             }
406 406
 
407 407
                         } elseif ($currentPage == 'settings') {
408 408
                             if ($_SESSION['permissions']['super_admin']) {
409
-                                logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 2);
409
+                                logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 2);
410 410
                                 $page = "views/core/settings.php";
411 411
                             } else {
412 412
                                 $err = errorMessage(5, $lang);
413 413
                                 $page = "views/templates/error.php";
414
-                                logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'settings'", 3);
414
+                                logAction($_SESSION['user_name'], $lang['failedAccess']." 'settings'", 3);
415 415
                             }
416 416
 
417 417
                         } elseif ($currentPage == 'editstaff') {
418 418
                             if ($_SESSION['permissions']['edit']['staff']) {
419 419
                                 if ($query) {
420 420
                                     $uId = $url['path'][$settings['base'] + 1];
421
-                                    logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 2);
421
+                                    logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 2);
422 422
                                     $page = "views/core/editStaff.php";
423 423
                                 } else {
424 424
                                     $err = errorMessage(8, $lang);
@@ -426,38 +426,38 @@  discard block
 block discarded – undo
426 426
                                 }
427 427
                             } else {
428 428
                                 $err = errorMessage(5, $lang); $page = "views/templates/error.php";
429
-                                logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'editStaff'", 3);
429
+                                logAction($_SESSION['user_name'], $lang['failedAccess']." 'editStaff'", 3);
430 430
                             }
431 431
                         } elseif ($currentPage == 'staff') {
432 432
                             if ($_SESSION['permissions']['view']['staff']) {
433 433
                                 if ($query) {
434 434
                                     $search = $url['path'][$settings['base'] + 1];
435 435
                                 }
436
-                                logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 2);
436
+                                logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 2);
437 437
                                 $page = "views/core/staff.php";
438 438
                             } else {
439 439
                                 $err = errorMessage(5, $lang); $page = "views/templates/error.php";
440
-                                logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'staff'", 3);
440
+                                logAction($_SESSION['user_name'], $lang['failedAccess']." 'staff'", 3);
441 441
                             }
442 442
 
443 443
                         } elseif ($currentPage == 'pluginstore') {
444 444
                             if ($_SESSION['permissions']['super_admin']) {
445
-                                logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 2);
445
+                                logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 2);
446 446
                                 $page = "views/core/pluginstore.php";
447 447
                             } else {
448 448
                                 $err = errorMessage(5, $lang); $page = "views/templates/error.php";
449
-                                logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'pluginstore'", 3);
449
+                                logAction($_SESSION['user_name'], $lang['failedAccess']." 'pluginstore'", 3);
450 450
                             }
451 451
 
452 452
                         } elseif ($currentPage == 'newuser') {
453 453
                             if ($_SESSION['permissions']['edit']['staff']) {
454 454
                                 require_once("classes/registration.php");
455 455
                                 $registration = new Registration();
456
-                                logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 2);
456
+                                logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 2);
457 457
                                 $page = "views/core/newUser.php";
458 458
                             } else {
459 459
                                 $err = errorMessage(5, $lang); $page = "views/templates/error.php";
460
-                                logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'newUser'", 3);
460
+                                logAction($_SESSION['user_name'], $lang['failedAccess']." 'newUser'", 3);
461 461
                             }
462 462
 
463 463
                         } elseif ($currentPage == 'logs' && $settings['logging']) {
@@ -465,11 +465,11 @@  discard block
 block discarded – undo
465 465
                                 if ($query) {
466 466
                                     $search = $url['path'][$settings['base'] + 1];
467 467
                                 }
468
-                                logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 2);
468
+                                logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 2);
469 469
                                 $page = "views/core/logs.php";
470 470
                             } else {
471 471
                                 $err = errorMessage(5, $lang); $page = "views/templates/error.php";
472
-                                logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'noPerm'", 3);
472
+                                logAction($_SESSION['user_name'], $lang['failedAccess']." 'noPerm'", 3);
473 473
                             }
474 474
                         }
475 475
                     }
@@ -479,7 +479,7 @@  discard block
 block discarded – undo
479 479
                 if ($_SESSION['permissions']['view']['curplayer']) {
480 480
                     if ($query) {
481 481
                         $sid = $url['path'][$settings['base'] + 1];
482
-                        logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 2);
482
+                        logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 2);
483 483
                         $page = "views/core/curPlayers.php";
484 484
                     } else {
485 485
                         $err = errorMessage(8, $lang);
@@ -488,21 +488,21 @@  discard block
 block discarded – undo
488 488
                 }
489 489
             } elseif ($currentPage == 'servers') {
490 490
                 if ($_SESSION['permissions']['super_admin']) {
491
-                    logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 2);
491
+                    logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 2);
492 492
                     $page = "views/core/servers.php";
493 493
                 }
494 494
             } elseif ($currentPage == 'editserver') {
495 495
                 if ($_SESSION['permissions']['super_admin']) {
496 496
                     if ($query) {
497 497
                         $id = $url['path'][$settings['base'] + 1];
498
-                        logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 2);
498
+                        logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 2);
499 499
                         $page = "views/core/editServer.php";
500 500
                     } else {$err = errorMessage(8, $lang); $page = "views/templates/error.php"; }
501 501
                 } else {$err = errorMessage(5, $lang); $page = "views/templates/error.php"; }
502 502
             }
503 503
             foreach ($settings['plugins'] as &$plugin) {
504
-                if (file_exists("plugins/" . $plugin . "/pageRules.php")) {
505
-                    include("plugins/" . $plugin . "/pageRules.php");
504
+                if (file_exists("plugins/".$plugin."/pageRules.php")) {
505
+                    include("plugins/".$plugin."/pageRules.php");
506 506
                 }
507 507
             }
508 508
 
@@ -533,11 +533,11 @@  discard block
 block discarded – undo
533 533
                     $page = 'views/core/2factor.php';
534 534
                 } elseif ($_SESSION['2factor'] == 1 || $_SESSION['2factor'] == 3) {
535 535
                 if (isset($_POST['code'])) {
536
-                    $sql = "SELECT `twoFactor` FROM `users` WHERE `user_id` = '" . $_SESSION['user_id'] . "';";
536
+                    $sql = "SELECT `twoFactor` FROM `users` WHERE `user_id` = '".$_SESSION['user_id']."';";
537 537
                     $user = $db_connection->query($sql)->fetch_object();
538 538
                     if ($gauth->verifyCode($user->twoFactor, $_POST['code'])) $_SESSION['2factor'] = 2;
539 539
                     else {
540
-                    $sql = "SELECT `backup` FROM `users` WHERE `user_id` = '" . $_SESSION['user_id'] . "';";
540
+                    $sql = "SELECT `backup` FROM `users` WHERE `user_id` = '".$_SESSION['user_id']."';";
541 541
                     $user = $db_connection->query($sql)->fetch_object();
542 542
                     if ($user->backup == $_POST['code']) {
543 543
                         $_SESSION['2factor'] = 2;
Please login to merge, or discard this patch.
views/core/profile.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
         $user_pic = $_POST['user_pic'];
6 6
         $pId = $_POST['player_id'];
7 7
         $_SESSION['user_profile'] = $user_pic;
8
-        $sql = "UPDATE `users` SET `user_email`= '" . $email . "',`playerid`= '" . $pId . "', `user_profile`= '" . $user_pic . "'WHERE `user_id` = '" . $_SESSION['user_id'] . "' ";
8
+        $sql = "UPDATE `users` SET `user_email`= '".$email."',`playerid`= '".$pId."', `user_profile`= '".$user_pic."'WHERE `user_id` = '".$_SESSION['user_id']."' ";
9 9
         $result_of_query = $db_connection->query($sql);
10 10
     } else {
11 11
         message($lang['expired']);
@@ -13,10 +13,10 @@  discard block
 block discarded – undo
13 13
 }
14 14
 if (isset($_POST['user_password'])) {
15 15
     if (formtoken::validateToken($_POST)) {
16
-        $sql = "SELECT `user_password_hash` FROM `users` WHERE `user_id` = '" . $_SESSION['user_id'] . "';";
16
+        $sql = "SELECT `user_password_hash` FROM `users` WHERE `user_id` = '".$_SESSION['user_id']."';";
17 17
         $result = $db_connection->query($sql)->fetch_object();
18
-        if ($_POST['user_password'] == $_POST['user_password_again'] && password_verify($_POST['current_password'],$result->user_password_hash)) {
19
-            $sql = "UPDATE `users` SET `user_password_hash`= '" . password_hash($_POST['user_password'], PASSWORD_DEFAULT) . "' WHERE `user_id` = '" . $_SESSION['user_id'] . "';";
18
+        if ($_POST['user_password'] == $_POST['user_password_again'] && password_verify($_POST['current_password'], $result->user_password_hash)) {
19
+            $sql = "UPDATE `users` SET `user_password_hash`= '".password_hash($_POST['user_password'], PASSWORD_DEFAULT)."' WHERE `user_id` = '".$_SESSION['user_id']."';";
20 20
             $result_of_query = $db_connection->query($sql);
21 21
             message($lang['passChanged']);
22 22
         }
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     }
26 26
 }
27 27
 
28
-$sql = "SELECT * FROM `users` WHERE `user_name` ='" . $_SESSION['user_name'] . "';";
28
+$sql = "SELECT * FROM `users` WHERE `user_name` ='".$_SESSION['user_name']."';";
29 29
 $profile = $db_connection->query($sql)->fetch_object();
30 30
 ?>
31 31
 <div class="row">
@@ -44,14 +44,14 @@  discard block
 block discarded – undo
44 44
     <div class="panel-body">
45 45
         <div class="row">
46 46
             <div  style="padding-top:4%;" class="col-md-3 col-lg-3 " align="center">
47
-                <?php if(!isset($_SESSION['profile_link'])) {
48
-                    if(isset($_SESSION['user_email']) && $settings['gravatar']) { ?>
49
-                        <a href="<?php echo $settings['url'] . 'profile' ?>"> <img alt="User Pic" src="<?php getGravatar($_SESSION['user_email'],64,'retro')  ?>" class="img-circle img-responsive"></a>
47
+                <?php if (!isset($_SESSION['profile_link'])) {
48
+                    if (isset($_SESSION['user_email']) && $settings['gravatar']) { ?>
49
+                        <a href="<?php echo $settings['url'].'profile' ?>"> <img alt="User Pic" src="<?php getGravatar($_SESSION['user_email'], 64, 'retro')  ?>" class="img-circle img-responsive"></a>
50 50
                     <?php } else {?>
51
-                        <a href="<?php echo $settings['url'] . 'profile' ?>"> <img alt="User Pic" src="<?php echo $settings['url'] . 'assets/img/profile/' . $_SESSION['user_profile'] . '.jpg' ?>" class="img-circle img-responsive"></a>
51
+                        <a href="<?php echo $settings['url'].'profile' ?>"> <img alt="User Pic" src="<?php echo $settings['url'].'assets/img/profile/'.$_SESSION['user_profile'].'.jpg' ?>" class="img-circle img-responsive"></a>
52 52
                     <?php } ?>
53 53
                 <?php } else { ?>
54
-                    <img alt="User Pic" src="<?php echo $settings['url'] . 'assets/img/profile/' . $_SESSION['user_profile'] . '.jpg' ?>" class="img-circle img-responsive">
54
+                    <img alt="User Pic" src="<?php echo $settings['url'].'assets/img/profile/'.$_SESSION['user_profile'].'.jpg' ?>" class="img-circle img-responsive">
55 55
                 <?php } ?>
56 56
             </div>
57 57
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
                     <tbody>
61 61
                     <tr>
62 62
                         <td><?php echo $lang['rank'] ?>:</td>
63
-                        <td><?php echo $settings['ranks'][$profile->user_level] . " (" . $profile->user_level . ")" ?></td>
63
+                        <td><?php echo $settings['ranks'][$profile->user_level]." (".$profile->user_level.")" ?></td>
64 64
                     </tr>
65 65
                     <form method="post" action="profile" name="profileEdit" id="profileEdit">
66 66
                         <?php echo formtoken::getField(); ?>
@@ -78,26 +78,26 @@  discard block
 block discarded – undo
78 78
                                 <select id='user_pic' name='user_pic' class='form-control'>";
79 79
                                     <?php
80 80
                                     for ($icon = 1; $icon < 6; $icon++) {
81
-                                        echo '<option value="' . $icon . '" ' . select($icon, $profile->user_profile) . '>' . $settings['names'][$icon] . '</option>';
81
+                                        echo '<option value="'.$icon.'" '.select($icon, $profile->user_profile).'>'.$settings['names'][$icon].'</option>';
82 82
                                     }
83 83
                                     ?>
84 84
                                 </select>
85 85
                             </td>
86 86
                         </tr>
87 87
                         <tr>
88
-                            <td><?php echo $lang['current'] . " " . $lang['password'] ?></td>
88
+                            <td><?php echo $lang['current']." ".$lang['password'] ?></td>
89 89
                             <td>
90 90
                                 <input type="password" id="current_password" name="current_password" class="form-control" autocorrect="off" autocapitalize="off" autocomplete="off">
91 91
                             </td>
92 92
                         </tr>
93 93
                         <tr>
94
-                            <td><?php echo "New " . $lang['password'] ?></td>
94
+                            <td><?php echo "New ".$lang['password'] ?></td>
95 95
                             <td>
96 96
                                 <input type="password" id="user_password" name="user_password" class="form-control" autocorrect="off" autocapitalize="off" autocomplete="off">
97 97
                             </td>
98 98
                         </tr>
99 99
                         <tr>
100
-                            <td><?php echo $lang['repeat'] . " New " . $lang['password'] ?></td>
100
+                            <td><?php echo $lang['repeat']." New ".$lang['password'] ?></td>
101 101
                             <td>
102 102
                                 <input type="password" id="user_password_again" name="user_password_again" autocorrect="off" class="form-control" autocapitalize="off" autocomplete="off">
103 103
                             </td>
Please login to merge, or discard this patch.
views/templates/template.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -21,16 +21,16 @@  discard block
 block discarded – undo
21 21
             <p class="centered">
22 22
                 <?php if (!isset($_SESSION['profile_link'])) {
23 23
                     if (isset($_SESSION['user_email']) && $settings['gravatar']) {
24
-                        echo '<a href="' . $settings['url'] . 'profile">';
25
-                        echo '<img src="' . getGravatar($_SESSION['user_email'],64,'retro') . '" class="img-circle" width="60" height="60"></a></p>';
24
+                        echo '<a href="'.$settings['url'].'profile">';
25
+                        echo '<img src="'.getGravatar($_SESSION['user_email'], 64, 'retro').'" class="img-circle" width="60" height="60"></a></p>';
26 26
                     } else {
27
-                        echo '<a href="' . $settings['url'] . 'profile">';
28
-                        echo '<img src="' . $settings['url'] . 'assets/img/profile/' . $_SESSION['user_profile'] . '.jpg"';
27
+                        echo '<a href="'.$settings['url'].'profile">';
28
+                        echo '<img src="'.$settings['url'].'assets/img/profile/'.$_SESSION['user_profile'].'.jpg"';
29 29
                         echo 'class="img-circle" width="60" height="60"></a></p>';
30 30
                     }
31 31
                 } else {
32
-                    echo '<a href="' . $_SESSION['profile_link'] . '" target="_blank">';
33
-                    echo '<img src="' . $_SESSION['user_profile'] . '"';
32
+                    echo '<a href="'.$_SESSION['profile_link'].'" target="_blank">';
33
+                    echo '<img src="'.$_SESSION['user_profile'].'"';
34 34
                     echo 'class="img-circle" width="64" height="64"></a></p>';
35 35
                 }
36 36
                 ?>
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
             </li>
49 49
 
50 50
 			<?php
51
-                if(isset($_SESSION['server_type']))
51
+                if (isset($_SESSION['server_type']))
52 52
                 {
53
-                    switch($_SESSION['server_type'])
53
+                    switch ($_SESSION['server_type'])
54 54
                     {
55 55
                         case 'life':
56 56
                             include("views/life/nav.php");
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
                 }
59 59
 
60 60
                 foreach ($settings['plugins'] as &$plugin) {
61
-                    if (file_exists("plugins/". $plugin. "/nav.php")) {
62
-                        include("plugins/". $plugin."/nav.php");
61
+                    if (file_exists("plugins/".$plugin."/nav.php")) {
62
+                        include("plugins/".$plugin."/nav.php");
63 63
                     }
64 64
                 }
65 65
 
@@ -135,19 +135,19 @@  discard block
 block discarded – undo
135 135
                         <li>
136 136
                             <a href="<?php echo $settings['url'] ?>newDB">
137 137
                                 <i class="fa fa-fw fa-plus"></i>
138
-                                <span><?php echo $lang['new'] . ' ' . $lang['database'] ?></span>
138
+                                <span><?php echo $lang['new'].' '.$lang['database'] ?></span>
139 139
                             </a>
140 140
                         </li>
141 141
                         <li>
142 142
                             <a href="<?php echo $settings['url'] ?>newServer">
143 143
                                 <i class="fa fa-fw fa-plus"></i>
144
-                                <span><?php echo $lang['new'] . ' ' . $lang['server'] ?></span>
144
+                                <span><?php echo $lang['new'].' '.$lang['server'] ?></span>
145 145
                             </a>
146 146
                         </li>
147 147
                         <li>
148 148
                             <a href="<?php echo $settings['url'] ?>servers">
149 149
                                 <i class="fa fa-fw fa-cogs"></i>
150
-                                <span><?php echo $lang['edit'] . ' ' . $lang['databases'] ?></span>
150
+                                <span><?php echo $lang['edit'].' '.$lang['databases'] ?></span>
151 151
                             </a>
152 152
                         </li>
153 153
                         <li>
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
             <li>
171 171
                 <a data-toggle="modal" href="#changeDB">
172 172
                     <i class="fa fa-fw fa-cogs"></i>
173
-                    <span><?php echo $lang['database'] . 's' ?></span>
173
+                    <span><?php echo $lang['database'].'s' ?></span>
174 174
                 </a>
175 175
             </li>
176 176
             <?php } ?>
@@ -189,10 +189,10 @@  discard block
 block discarded – undo
189 189
     <section class="wrapper">
190 190
         <?php
191 191
         if (isset($error)) {
192
-            echo '<div style="margin-top: 120px;" class="alert alert-danger animated infinite bounce" role="alert">' . $error . '</div>';
192
+            echo '<div style="margin-top: 120px;" class="alert alert-danger animated infinite bounce" role="alert">'.$error.'</div>';
193 193
         }
194 194
         if (isset($message)) {
195
-            echo '<div style="margin-top: 120px;" class="alert alert-info animated infinite bounce" role="alert">' . $message . '</div>';
195
+            echo '<div style="margin-top: 120px;" class="alert alert-info animated infinite bounce" role="alert">'.$message.'</div>';
196 196
         }
197 197
         if (isset($page)) {
198 198
             include($page);
Please login to merge, or discard this patch.
views/life/gangs.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 $db_link = serverConnect();
3 3
 
4
-$max = ' LIMIT ' . ($pageNum - 1) * $_SESSION['items'] . ',' . $_SESSION['items'];
4
+$max = ' LIMIT '.($pageNum - 1) * $_SESSION['items'].','.$_SESSION['items'];
5 5
 
6 6
 if (isset($search)) {
7
-    logAction($_SESSION['user_name'], $lang['searched'] . ' (' . $search . ') ' . $lang['in'] . ' ' . $lang['gangs'], 1);
8
-    $sql = "SELECT $playerIdColumn as playerid FROM `players` WHERE `name` LIKE '%" . $search . "%' ";
7
+    logAction($_SESSION['user_name'], $lang['searched'].' ('.$search.') '.$lang['in'].' '.$lang['gangs'], 1);
8
+    $sql = "SELECT $playerIdColumn as playerid FROM `players` WHERE `name` LIKE '%".$search."%' ";
9 9
     $result_of_query = $db_link->query($sql);
10 10
     if ($result_of_query->num_rows > 0) {
11 11
         while ($row = mysqli_fetch_row($result_of_query)) {
@@ -13,24 +13,24 @@  discard block
 block discarded – undo
13 13
         }
14 14
         $samepID = array_reduce($samepID, 'array_merge', array());
15 15
         $samepID = implode(',', $samepID);
16
-        $sql = "SELECT `id`,`name`,`owner`,`bank`,`members`,`maxmembers`,`active` FROM `gangs` WHERE `owner` IN ( " . $samepID . " ) OR `name` LIKE '%" . $search . "%' OR `id` = '" . $search . "' OR `owner` LIKE '" . $search . "' OR `members` LIKE '%" . $search . "%' ;";
16
+        $sql = "SELECT `id`,`name`,`owner`,`bank`,`members`,`maxmembers`,`active` FROM `gangs` WHERE `owner` IN ( ".$samepID." ) OR `name` LIKE '%".$search."%' OR `id` = '".$search."' OR `owner` LIKE '".$search."' OR `members` LIKE '%".$search."%' ;";
17 17
         $result_of_query = $db_link->query($sql);
18 18
         $total_records = mysqli_num_rows($result_of_query);
19 19
         if ($pageNum > $total_records) $pageNum = $total_records;
20
-        $sql = "SELECT `id`,`name`,`owner`,`bank`,`members`,`maxmembers`,`active` FROM `gangs` WHERE `owner` IN ( " . $samepID . " ) OR `name` LIKE '%" . $search . "%' OR `id` = '" . $search . "' OR `owner` LIKE '" . $search . "' OR `members` LIKE '%" . $search . "%' " . $max . " ;";
20
+        $sql = "SELECT `id`,`name`,`owner`,`bank`,`members`,`maxmembers`,`active` FROM `gangs` WHERE `owner` IN ( ".$samepID." ) OR `name` LIKE '%".$search."%' OR `id` = '".$search."' OR `owner` LIKE '".$search."' OR `members` LIKE '%".$search."%' ".$max." ;";
21 21
     } else {
22
-        $sql = "SELECT `id` FROM `gangs` WHERE `name` LIKE '%" . $search . "%'  OR `id` = '" . $search . "' OR `owner` LIKE '" . $search . "' OR `members` LIKE '%" . $search . "%' ;";
22
+        $sql = "SELECT `id` FROM `gangs` WHERE `name` LIKE '%".$search."%'  OR `id` = '".$search."' OR `owner` LIKE '".$search."' OR `members` LIKE '%".$search."%' ;";
23 23
         $result_of_query = $db_link->query($sql);
24 24
         $total_records = mysqli_num_rows($result_of_query);
25 25
         if ($pageNum > $total_records) $pageNum = $total_records;
26
-        $sql = "SELECT `id`,`name`,`owner`,`bank`,`members`,`maxmembers`,`active` FROM `gangs` WHERE `name` LIKE '%" . $search . "%' OR `id` = '" . $search . "' OR `owner` LIKE '" . $search . "' OR `members` LIKE '%" . $search . "%' " . $max . " ;";
26
+        $sql = "SELECT `id`,`name`,`owner`,`bank`,`members`,`maxmembers`,`active` FROM `gangs` WHERE `name` LIKE '%".$search."%' OR `id` = '".$search."' OR `owner` LIKE '".$search."' OR `members` LIKE '%".$search."%' ".$max." ;";
27 27
     }
28 28
 } else {
29 29
     $sql = "SELECT `id` FROM `gangs`;";
30 30
     $result_of_query = $db_link->query($sql);
31 31
     $total_records = mysqli_num_rows($result_of_query);
32 32
     if ($pageNum > $total_records) $pageNum = $total_records;
33
-    $sql = "SELECT `id`,`name`,`owner`,`bank`,`members`,`maxmembers`,`active` FROM `gangs` " . $max . " ;";
33
+    $sql = "SELECT `id`,`name`,`owner`,`bank`,`members`,`maxmembers`,`active` FROM `gangs` ".$max." ;";
34 34
 }
35 35
 $result_of_query = $db_link->query($sql);
36 36
 if ($result_of_query->num_rows > 0) {
@@ -52,18 +52,18 @@  discard block
 block discarded – undo
52 52
         <thead>
53 53
         <tr>
54 54
             <th class="hidden-xs"><i class="fa fa-eye"></i> <?php echo $lang['id']; ?></th>
55
-            <th><i class="fa fa-user"></i> <?php echo $lang['gang'] . " " . $lang['name']; ?></th>
55
+            <th><i class="fa fa-user"></i> <?php echo $lang['gang']." ".$lang['name']; ?></th>
56 56
             <th class="hidden-xs"><i class="fa fa-user"></i> <?php echo $lang['owner']; ?></th>
57 57
             <th class="hidden-xs"><i class="fa fa-bank"></i> <?php echo $lang['bank']; ?></th>
58 58
             <?php if ($_SESSION['permissions']['edit']['gangs']) {
59
-                echo '<th class="hidden-xs"><i class="fa fa-user"></i> ' . $lang['members'] . '</th>';
59
+                echo '<th class="hidden-xs"><i class="fa fa-user"></i> '.$lang['members'].'</th>';
60 60
             } else {
61
-                echo '<th><i class="fa fa-user"></i> ' . $lang['members'] . '</th>';
61
+                echo '<th><i class="fa fa-user"></i> '.$lang['members'].'</th>';
62 62
             }?>
63 63
             <th class="hidden-xs"><i class="fa fa-user"></i> <?php echo $lang['maxMembers']; ?></th>
64 64
             <th class="hidden-xs"><i class="fa fa-user"></i> <?php echo $lang['active']; ?></th>
65 65
             <?php if ($_SESSION['permissions']['edit']['gangs']) {
66
-                echo '<th><i class="fa fa-pencil"></i>' . $lang['edit'] . '</th>';
66
+                echo '<th><i class="fa fa-pencil"></i>'.$lang['edit'].'</th>';
67 67
             }
68 68
             ?>
69 69
         </tr>
@@ -72,21 +72,21 @@  discard block
 block discarded – undo
72 72
         <?php
73 73
         while ($row = mysqli_fetch_assoc($result_of_query)) {
74 74
             echo "<tr>";
75
-            echo "<td class='hidden-xs'>" . $row["id"] . "</td>";
76
-            echo "<td>" . $row["name"] . "</td>";
77
-            echo "<td class='hidden-xs'>" . nameID($row["owner"], $db_link) . "</td>";
78
-            echo "<td class='hidden-xs'>" . $row["bank"] . "</td>";
75
+            echo "<td class='hidden-xs'>".$row["id"]."</td>";
76
+            echo "<td>".$row["name"]."</td>";
77
+            echo "<td class='hidden-xs'>".nameID($row["owner"], $db_link)."</td>";
78
+            echo "<td class='hidden-xs'>".$row["bank"]."</td>";
79 79
             $members = substr_count($row['members'], ",");
80 80
             $members++;
81 81
             if ($_SESSION['permissions']['edit']['gangs']) {
82
-                echo "<td class='hidden-xs'>" . $members . "</td>";
82
+                echo "<td class='hidden-xs'>".$members."</td>";
83 83
             } else {
84
-                echo "<td>" . $members . "</td>";
84
+                echo "<td>".$members."</td>";
85 85
             }
86
-            echo "<td class='hidden-xs'>" . $row["maxmembers"] . "</td>";
87
-            echo "<td class='hidden-xs'>" . yesNo($row["active"], $lang) . "</td>";
86
+            echo "<td class='hidden-xs'>".$row["maxmembers"]."</td>";
87
+            echo "<td class='hidden-xs'>".yesNo($row["active"], $lang)."</td>";
88 88
             if ($_SESSION['permissions']['edit']['gangs']) {
89
-                echo "<td><a class='btn btn-primary btn-xs' href='" . $settings['url'] . "editGang/" . $row["id"] . "'>";
89
+                echo "<td><a class='btn btn-primary btn-xs' href='".$settings['url']."editGang/".$row["id"]."'>";
90 90
                 echo "<i class='fa fa-pencil'></i></a></td>";
91 91
             }
92 92
             echo "</tr>";
Please login to merge, or discard this patch.
views/life/police.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 $db_link = serverConnect();
3 3
 
4
-$max = 'LIMIT ' . ($pageNum - 1) * $_SESSION['items'] . ',' . $_SESSION['items'];
4
+$max = 'LIMIT '.($pageNum - 1) * $_SESSION['items'].','.$_SESSION['items'];
5 5
 
6 6
 if (isset($search)) {
7 7
     $sql = "SELECT `uid` FROM `players` WHERE `uid` LIKE '$search' OR `name` LIKE '%$search%' OR $playerIdColumn LIKE '$search' AND `coplevel` >= '1' ORDER BY `coplevel` DESC;";
8 8
     $result_of_query = $db_link->query($sql);
9 9
     $total_records = mysqli_num_rows($result_of_query);
10 10
     if ($pageNum > $total_records) $pageNum = $total_records;
11
-    $sql = "SELECT `name`, `coplevel`, `uid`, $playerIdColumn as `playerid` FROM `players` WHERE `uid` LIKE '" . $search . "' OR `name` LIKE '%$search%' OR $playerIdColumn LIKE '$search' AND `coplevel` >= '1' ORDER BY `coplevel` DESC  $max;";
12
-    logAction($_SESSION['user_name'], $lang['searched'] . ' (' . $search . ') ' . $lang['in'] . ' ' . $lang['players'], 1);
11
+    $sql = "SELECT `name`, `coplevel`, `uid`, $playerIdColumn as `playerid` FROM `players` WHERE `uid` LIKE '".$search."' OR `name` LIKE '%$search%' OR $playerIdColumn LIKE '$search' AND `coplevel` >= '1' ORDER BY `coplevel` DESC  $max;";
12
+    logAction($_SESSION['user_name'], $lang['searched'].' ('.$search.') '.$lang['in'].' '.$lang['players'], 1);
13 13
 } else {
14 14
     $sql = "SELECT `uid` FROM `players` WHERE `coplevel` >= '1' ORDER BY `coplevel` DESC;";
15 15
     $result_of_query = $db_link->query($sql);
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     }
26 26
     $pids = implode(',', $pids);
27 27
     if ($settings['steamAPI'] && $_SESSION['permissions']['view']['steam'] && !$settings['performance'] && $settings['vacTest']) {
28
-        $api = "http://api.steampowered.com/ISteamUser/GetPlayerBans/v1/?key=" . $settings['steamAPI'] . "&steamids=" . $pids;
28
+        $api = "http://api.steampowered.com/ISteamUser/GetPlayerBans/v1/?key=".$settings['steamAPI']."&steamids=".$pids;
29 29
         $bans = get_object_vars(json_decode(file_get_contents($api)));
30 30
         $bans = $bans['players'];
31 31
         $steamPlayers = count($bans);
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
                 <th><i class="fa fa-eye"></i><?php echo $lang['playerID']; ?></th>
54 54
                 <th><i class="fa fa-user"></i><?php echo $lang['rank']; ?></th>
55 55
                 <?php if ($_SESSION['permissions']['edit']['player']) {
56
-                    echo '<th><i class="fa fa-pencil"></i> ' . $lang['edit'] . '</th>';
56
+                    echo '<th><i class="fa fa-pencil"></i> '.$lang['edit'].'</th>';
57 57
                 }
58 58
                 ?>
59 59
             </tr>
@@ -63,26 +63,26 @@  discard block
 block discarded – undo
63 63
             while ($row = mysqli_fetch_assoc($result_of_query)) {
64 64
                 $playersID = $row["playerid"];
65 65
                 echo "<tr>";
66
-                echo "<td>" . $row["name"] . "</td>";
67
-                echo "<td>" . $row["playerid"] . "</td>";
68
-                echo "<td class='hidden-xs'>" . $row["coplevel"] . "</td>";
66
+                echo "<td>".$row["name"]."</td>";
67
+                echo "<td>".$row["playerid"]."</td>";
68
+                echo "<td class='hidden-xs'>".$row["coplevel"]."</td>";
69 69
                 if ($_SESSION['permissions']['edit']['player']) {
70
-                    echo "<td><a class='btn btn-primary btn-xs' href='" . $settings['url'] . "editPlayer/" . $row["uid"] . "'>";
70
+                    echo "<td><a class='btn btn-primary btn-xs' href='".$settings['url']."editPlayer/".$row["uid"]."'>";
71 71
                     echo "<i class='fa fa-pencil'></i></a></td>";
72 72
                 } else {
73
-                    echo "<td><a class='btn btn-primary btn-xs' href='" . $settings['url'] . "editPlayer/" . $row["uid"] . "'>";
73
+                    echo "<td><a class='btn btn-primary btn-xs' href='".$settings['url']."editPlayer/".$row["uid"]."'>";
74 74
                     echo "<i class='fa fa-eye'></i></a></td>";
75 75
                 }
76 76
                 if ($_SESSION['permissions']['view']['steam'] && $steamPlayers > 0) {
77
-                    echo "<td><a href='http://steamcommunity.com/profiles/" . $row["playerid"] . "' ";
77
+                    echo "<td><a href='http://steamcommunity.com/profiles/".$row["playerid"]."' ";
78 78
                     for ($player = 0; $player <= $steamPlayers; $player++) {
79 79
                         if ($bans[$player]->SteamId == $row['playerid']) {
80 80
                             if ($bans[$player]->VACBanned == true) {
81
-                                echo "<td><a href='http://steamcommunity.com/profiles/" . $row["playerid"] . "' ";
81
+                                echo "<td><a href='http://steamcommunity.com/profiles/".$row["playerid"]."' ";
82 82
                                 echo "class='btn btn-danger btn-xs hidden-xs' target='_blank'><i class='fa fa-steam'></i></a>";
83 83
 
84 84
                             } else {
85
-                                echo "<td><a href='http://steamcommunity.com/profiles/" . $row["playerid"] . "' ";
85
+                                echo "<td><a href='http://steamcommunity.com/profiles/".$row["playerid"]."' ";
86 86
                                 echo "class='btn btn-primary btn-xs hidden-xs' target='_blank'><i class='fa fa-steam'></i></a>"; }
87 87
                         }
88 88
                     }
@@ -95,4 +95,4 @@  discard block
 block discarded – undo
95 95
             ?>
96 96
     </div>
97 97
     <?php
98
-} else echo '<h3>' . errorMessage(36, $lang) . '</h3>';
98
+} else echo '<h3>'.errorMessage(36, $lang).'</h3>';
Please login to merge, or discard this patch.
views/life/notes.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -9,10 +9,10 @@  discard block
 block discarded – undo
9 9
     $page = 1;
10 10
 }
11 11
 
12
-$max = 'LIMIT ' . ($page - 1) * $_SESSION['items'] . ',' . $_SESSION['items'];
12
+$max = 'LIMIT '.($page - 1) * $_SESSION['items'].','.$_SESSION['items'];
13 13
 
14 14
 if (isset($search)) {
15
-    logAction($_SESSION['user_name'], $lang['searched'] . ' (' . $search . ') ' . $lang['in'] . ' ' . $lang['vehicles'], 1);
15
+    logAction($_SESSION['user_name'], $lang['searched'].' ('.$search.') '.$lang['in'].' '.$lang['vehicles'], 1);
16 16
     $sql = "SELECT $playerIdColumn FROM `players` WHERE `name` LIKE '%$search%' ";
17 17
     $result_of_query = $db_link->query($sql);
18 18
     if ($result_of_query->num_rows > 0) {
@@ -20,10 +20,10 @@  discard block
 block discarded – undo
20 20
             $samepID[] = $row;
21 21
         }
22 22
         $samepID = array_reduce($samepID, 'array_merge', array());
23
-        $sql = "SELECT * FROM `vehicles` WHERE `pid` LIKE '$search' OR `classname` LIKE '%$search%' OR `pid` IN (" . implode(',', $samepID) . ") OR `plate` LIKE '$search' OR `inventory` LIKE '%$search%';";
23
+        $sql = "SELECT * FROM `vehicles` WHERE `pid` LIKE '$search' OR `classname` LIKE '%$search%' OR `pid` IN (".implode(',', $samepID).") OR `plate` LIKE '$search' OR `inventory` LIKE '%$search%';";
24 24
         $result_of_query = $db_link->query($sql);
25 25
         $total_records = mysqli_num_rows($result_of_query);
26
-        $sql = "SELECT * FROM `vehicles` WHERE `pid` LIKE '$search' OR `classname` LIKE '%$search%' OR `pid` IN (" . implode(',', $samepID) . ") OR `plate` LIKE '$search' OR `inventory` LIKE '%$search %' $max;";
26
+        $sql = "SELECT * FROM `vehicles` WHERE `pid` LIKE '$search' OR `classname` LIKE '%$search%' OR `pid` IN (".implode(',', $samepID).") OR `plate` LIKE '$search' OR `inventory` LIKE '%$search %' $max;";
27 27
     } else {
28 28
         $sql = "SELECT * FROM `vehicles` WHERE `pid` LIKE '$search' OR `classname` LIKE '%$search%' OR `plate` LIKE '$search' OR `inventory` LIKE '%$search%';";
29 29
         $result_of_query = $db_link->query($sql);
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     <div class="col-lg-12">
41 41
         <h1 class="page-header">
42 42
             <?php echo $lang['vehicles']; ?>
43
-            <small><?php echo " " . $lang['overview']; ?></small>
43
+            <small><?php echo " ".$lang['overview']; ?></small>
44 44
         </h1>
45 45
     </div>
46 46
 </div>
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     <div class="content-panel">
51 51
         <h4>
52 52
             <i class="fa fa-car"></i>
53
-            <?php echo " " . $lang['vehicles']; ?>
53
+            <?php echo " ".$lang['vehicles']; ?>
54 54
             <div class="col-md-2 pull-right">
55 55
                 <form style="float:right;" name='rows' method="post" action="<?php echo $settings['url'] ?>vehicles">
56 56
                     <select id='items' name='items'>
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
                 <th class="hidden-xs"><i class="fa fa-car"></i> <?php echo $lang['alive']; ?></th>
107 107
                 <th class="hidden-xs"><i class="fa fa-info"></i> <?php echo $lang['active']; ?></th>
108 108
                 <?php if ($_SESSION['user_level'] >= $_SESSION['permission']['edit']['playet']) {
109
-    echo '<th><i class="fa fa-pencil"></i><div class="hidden-xs"> ' . $lang['edit'] . '</div></th>';
109
+    echo '<th><i class="fa fa-pencil"></i><div class="hidden-xs"> '.$lang['edit'].'</div></th>';
110 110
 }
111 111
 ?>
112 112
             </tr>
@@ -115,14 +115,14 @@  discard block
 block discarded – undo
115 115
             <?php
116 116
             while ($row = mysqli_fetch_assoc($result_of_query)) {
117 117
                 echo "<tr>";
118
-                echo "<td>" . nameID($row["pid"]) . "</td>";
119
-                echo "<td>" . carName($row["classname"]) . "</td>";
120
-                echo "<td class='hidden-xs'>" . carType($row["type"], $lang) . "</td>";
121
-                echo "<td class='hidden-xs'>" . $row["plate"] . "</td>";
122
-                echo "<td class='hidden-xs'>" . yesNo($row["alive"], $lang) . "</td>";
123
-                echo "<td class='hidden-xs'>" . yesNo($row["active"], $lang) . "</td>";
118
+                echo "<td>".nameID($row["pid"])."</td>";
119
+                echo "<td>".carName($row["classname"])."</td>";
120
+                echo "<td class='hidden-xs'>".carType($row["type"], $lang)."</td>";
121
+                echo "<td class='hidden-xs'>".$row["plate"]."</td>";
122
+                echo "<td class='hidden-xs'>".yesNo($row["alive"], $lang)."</td>";
123
+                echo "<td class='hidden-xs'>".yesNo($row["active"], $lang)."</td>";
124 124
                 if ($_SESSION['user_level'] >= P_EDIT_VEHICLES) {
125
-                    echo "<td><a class='btn btn-primary btn-xs' href='" . $settings['url'] . "editVeh/" . $row["id"] . "'>";
125
+                    echo "<td><a class='btn btn-primary btn-xs' href='".$settings['url']."editVeh/".$row["id"]."'>";
126 126
                     echo "<i class='fa fa-pencil'></i></a></td>";
127 127
                 }
128 128
                 echo "</tr>";
@@ -134,24 +134,24 @@  discard block
 block discarded – undo
134 134
                 $total_pages = ceil($total_records / $_SESSION['items']);
135 135
                 if ($total_pages > 1) {
136 136
 
137
-                    echo "<center><a class='btn btn-primary' href='" . $settings['url'] . "vehicles/" . $search . "?page=1'>" . $lang['first'] . "</a> ";
137
+                    echo "<center><a class='btn btn-primary' href='".$settings['url']."vehicles/".$search."?page=1'>".$lang['first']."</a> ";
138 138
                     ?>
139 139
                     <div class="btn-group">
140 140
                         <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
141
-                            <?php echo $lang['page'] . " " ?><span class="caret"></span>
141
+                            <?php echo $lang['page']." " ?><span class="caret"></span>
142 142
                         </button>
143 143
 
144 144
                         <ul class="dropdown-menu scrollable-menu" role="menu">
145 145
                             <?php
146 146
                             for ($i = 1; $i <= $total_pages; $i++) {
147 147
                                 ?>
148
-                                <li><?php echo "<a href='" . $settings['url'] . "vehicles/" . $search . "?page=" . $i . "'>" . $i . "</a> "; ?></li>
148
+                                <li><?php echo "<a href='".$settings['url']."vehicles/".$search."?page=".$i."'>".$i."</a> "; ?></li>
149 149
                             <?php }; ?>
150 150
                         </ul>
151 151
                     </div>
152 152
 
153 153
                     <?php
154
-                    echo "<a class='btn btn-primary' href='" . $settings['url'] . "vehicles/" . $search . "?page=" . $total_pages . "'>" . $lang['last'] . "</a></center>";
154
+                    echo "<a class='btn btn-primary' href='".$settings['url']."vehicles/".$search."?page=".$total_pages."'>".$lang['last']."</a></center>";
155 155
                 }
156 156
             } else {
157 157
                 $sql = "SELECT `id` FROM `vehicles`;";
@@ -159,24 +159,24 @@  discard block
 block discarded – undo
159 159
                 $total_records = mysqli_num_rows($result_of_query);
160 160
                 $total_pages = ceil($total_records / $_SESSION['items']);
161 161
                 if ($total_pages > 1) {
162
-                    echo "<center><a class='btn btn-primary' href='" . $settings['url'] . "vehicles?page=1'>" . $lang['first'] . "</a> ";
162
+                    echo "<center><a class='btn btn-primary' href='".$settings['url']."vehicles?page=1'>".$lang['first']."</a> ";
163 163
                     ?>
164 164
                     <div class="btn-group">
165 165
                         <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
166
-                            <?php echo $lang['page'] . " " ?><span class="caret"></span>
166
+                            <?php echo $lang['page']." " ?><span class="caret"></span>
167 167
                         </button>
168 168
 
169 169
                         <ul class="dropdown-menu scrollable-menu" role="menu">
170 170
                             <?php
171 171
                             for ($i = 1; $i <= $total_pages; $i++) {
172 172
                                 ?>
173
-                                <li><?php echo "<a href='" . $settings['url'] . "vehicles?page=" . $i . "'>" . $i . "</a> "; ?></li>
173
+                                <li><?php echo "<a href='".$settings['url']."vehicles?page=".$i."'>".$i."</a> "; ?></li>
174 174
                             <?php }; ?>
175 175
                         </ul>
176 176
                     </div>
177 177
 
178 178
                     <?php
179
-                    echo "<a class='btn btn-primary' href='" . $settings['url'] . "vehicles?page=$total_pages'>" . $lang['last'] . "</a></center>";
179
+                    echo "<a class='btn btn-primary' href='".$settings['url']."vehicles?page=$total_pages'>".$lang['last']."</a></center>";
180 180
                 }
181 181
             }
182 182
             ?>
Please login to merge, or discard this patch.
views/life/houses.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 $db_link = serverConnect();
3
-$max = 'LIMIT ' . ($pageNum - 1) * $_SESSION['items'] . ',' . $_SESSION['items'];
3
+$max = 'LIMIT '.($pageNum - 1) * $_SESSION['items'].','.$_SESSION['items'];
4 4
 
5 5
 if (isset($search)) {
6
-    logAction($_SESSION['user_name'], $lang['searched'] . ' (' . $search . ') ' . $lang['in'] . ' ' . $lang['vehicles'], 1);
6
+    logAction($_SESSION['user_name'], $lang['searched'].' ('.$search.') '.$lang['in'].' '.$lang['vehicles'], 1);
7 7
     $sql = "SELECT h.`id` FROM `houses` h INNER JOIN `players` p ON houses.pid=players.$playerIdColumn WHERE h.`pid` LIKE '$search ' OR p.$playerIdColumn LIKE '$search ' OR h.`pos` LIKE '$search' OR p.`name` LIKE '%$search%';";
8 8
     $result_of_query = $db_link->query($sql);
9 9
     $total_records = mysqli_num_rows($result_of_query);
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
                 <th><i class="fa fa-user"></i> <?php echo $lang['position']; ?></th>
46 46
                 <th class="hidden-xs"><i class="fa fa-user"></i> <?php echo $lang['owned']; ?></th>
47 47
                 <?php if ($_SESSION['permissions']['edit']['houses']) {
48
-    echo '<th>' . $lang['edit'] . '</th>';
48
+    echo '<th>'.$lang['edit'].'</th>';
49 49
 }
50 50
 ?>
51 51
             </tr>
@@ -54,11 +54,11 @@  discard block
 block discarded – undo
54 54
             <?php
55 55
             while ($row = mysqli_fetch_assoc($result_of_query)) {
56 56
                 echo "<tr>";
57
-                echo "<td>" . $row["name"] . "</td>";
58
-                echo "<td>" . substr($row["pos"], 1, -1) . "</td>";
59
-                echo "<td class='hidden-xs'>" . yesNo($row["owned"], $lang) . "</td>";
57
+                echo "<td>".$row["name"]."</td>";
58
+                echo "<td>".substr($row["pos"], 1, -1)."</td>";
59
+                echo "<td class='hidden-xs'>".yesNo($row["owned"], $lang)."</td>";
60 60
                 if ($_SESSION['permissions']['edit']['houses']) {
61
-                    echo "<td><a class='btn btn-primary btn-xs' href='" . $settings['url'] . "editHouse/" . $row["id"] . "'>";
61
+                    echo "<td><a class='btn btn-primary btn-xs' href='".$settings['url']."editHouse/".$row["id"]."'>";
62 62
                     echo "<i class='fa fa-pencil'></i></a></td>";
63 63
                 }
64 64
                 echo "</tr>";
Please login to merge, or discard this patch.
views/life/vehicles.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -2,10 +2,10 @@  discard block
 block discarded – undo
2 2
 $db_link = serverConnect();
3 3
 require_once("config/carNames.php");
4 4
 
5
-$max = 'LIMIT ' . ($pageNum - 1) * $_SESSION['items'] . ',' . $_SESSION['items'];
5
+$max = 'LIMIT '.($pageNum - 1) * $_SESSION['items'].','.$_SESSION['items'];
6 6
 
7 7
 if (isset($search)) {
8
-    logAction($_SESSION['user_name'], $lang['searched'] . ' (' . $search . ') ' . $lang['in'] . ' ' . $lang['vehicles'], 1);
8
+    logAction($_SESSION['user_name'], $lang['searched'].' ('.$search.') '.$lang['in'].' '.$lang['vehicles'], 1);
9 9
 
10 10
     $sql = "SELECT `id` FROM `vehicles` INNER JOIN `players` ON vehicles.pid=players.$playerIdColumn WHERE `pid` LIKE '$search' OR `classname` LIKE '%$search%' OR `name` LIKE '%$search%' OR `plate` LIKE '$search' OR `inventory` LIKE '%$search%' OR `name` LIKE '%$search%';";
11 11
     $result_of_query = $db_link->query($sql);
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
                 <th class="hidden-xs"><i class="fa fa-car"></i> <?php echo $lang['alive']; ?></th>
49 49
                 <th class="hidden-xs"><i class="fa fa-info"></i> <?php echo $lang['active']; ?></th>
50 50
                 <?php if ($_SESSION['permissions']['edit']['vehicles']) {
51
-    echo '<th><i class="fa fa-pencil"></i><span class="hidden-xs"> ' . $lang['edit'] . '</span></th>';
51
+    echo '<th><i class="fa fa-pencil"></i><span class="hidden-xs"> '.$lang['edit'].'</span></th>';
52 52
 }
53 53
 ?>
54 54
             </tr>
@@ -57,14 +57,14 @@  discard block
 block discarded – undo
57 57
             <?php
58 58
             while ($row = mysqli_fetch_assoc($result_of_query)) {
59 59
                 echo "<tr>";
60
-                echo "<td>" . $row["name"] . "</td>";
61
-                echo "<td>" . carName($row["classname"]) . "</td>";
62
-                echo "<td class='hidden-xs'> " . carType($row["type"], $lang) . "</td>";
63
-                echo "<td class='hidden-xs'> " . $row["plate"] . "</td>";
64
-                echo "<td class='hidden-xs'> " . yesNo($row["alive"], $lang) . "</td>";
65
-                echo "<td class='hidden-xs'> " . yesNo($row["active"], $lang) . "</td>";
60
+                echo "<td>".$row["name"]."</td>";
61
+                echo "<td>".carName($row["classname"])."</td>";
62
+                echo "<td class='hidden-xs'> ".carType($row["type"], $lang)."</td>";
63
+                echo "<td class='hidden-xs'> ".$row["plate"]."</td>";
64
+                echo "<td class='hidden-xs'> ".yesNo($row["alive"], $lang)."</td>";
65
+                echo "<td class='hidden-xs'> ".yesNo($row["active"], $lang)."</td>";
66 66
                 if ($_SESSION['permissions']['edit']['vehicles']) {
67
-                    echo "<td><a class='btn btn-primary btn-xs' href='" . $settings['url'] . "editVeh/" . $row["id"] . "'>";
67
+                    echo "<td><a class='btn btn-primary btn-xs' href='".$settings['url']."editVeh/".$row["id"]."'>";
68 68
                     echo "<i class='fa fa-pencil'></i></a></td>";
69 69
                 }
70 70
                 echo "</tr>";
Please login to merge, or discard this patch.