Completed
Push — master ( 6aa338...6b6736 )
by Sam
03:14
created
views/databases.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,4 +68,6 @@
 block discarded – undo
68 68
         </div>
69 69
     </div>
70 70
 <?php
71
-} else  echo errorMessage(3, $lang);
72 71
\ No newline at end of file
72
+} else {
73
+    echo errorMessage(3, $lang);
74
+}
Please login to merge, or discard this patch.
index.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
     if (!$db_connection->connect_errno) {
88 88
         if ($login->isUserLoggedIn() == true) {
89 89
 
90
-           if ($_SESSION['multiDB'] && isset($_POST['dbid']) && isset($_POST['type'])) {
90
+            if ($_SESSION['multiDB'] && isset($_POST['dbid']) && isset($_POST['type'])) {
91 91
                 $_SESSION['server_type'] = $_POST['type'];
92 92
                 $_SESSION['dbid'] = $_POST['dbid'];
93 93
             }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@
 block discarded – undo
101 101
             $_SESSION['formtoken'][1] = time();
102 102
 
103 103
             if (isset($_GET['items'])) {
104
-                if (in_array($_GET['items'],$settings['item'])) {
104
+                if (in_array($_GET['items'], $settings['item'])) {
105 105
                     $sql = "UPDATE `users` SET `items` = " . $_GET['items'] . " WHERE `user_id` = '" . $_SESSION['user_id'] . "' ";
106 106
                     $db_connection->query($sql);
107 107
                     $_SESSION['items'] = intval($_GET['items']);
Please login to merge, or discard this patch.
Braces   +12 added lines, -5 removed lines patch added patch discarded remove patch
@@ -514,15 +514,20 @@  discard block
 block discarded – undo
514 514
             if ($settings['2factor']) {
515 515
                 if ($_SESSION['2factor'] == 0) {
516 516
                 if ($settings['force2factor'] == 'steam') {
517
-                    if (!$_SESSION['steamsignon']) $_SESSION['2factor'] == 5;
518
-                } elseif ($settings['force2factor'] == 'all') $_SESSION['2factor'] == 5;
517
+                    if (!$_SESSION['steamsignon']) {
518
+                        $_SESSION['2factor'] == 5;
519
+                    }
520
+                } elseif ($settings['force2factor'] == 'all') {
521
+                    $_SESSION['2factor'] == 5;
522
+                }
519 523
                     $page = 'views/core/2factor.php';
520 524
                 } elseif ($_SESSION['2factor'] == 1 || $_SESSION['2factor'] == 3) {
521 525
                 if (isset($_POST['code'])) {
522 526
                     $sql = "SELECT `twoFactor` FROM `users` WHERE `user_id` = '" . $_SESSION['user_id'] . "';";
523 527
                     $user = $db_connection->query($sql)->fetch_object();
524
-                    if ($gauth->verifyCode($user->twoFactor, $_POST['code'])) $_SESSION['2factor'] = 2;
525
-                    else {
528
+                    if ($gauth->verifyCode($user->twoFactor, $_POST['code'])) {
529
+                        $_SESSION['2factor'] = 2;
530
+                    } else {
526 531
                     $sql = "SELECT `backup` FROM `users` WHERE `user_id` = '" . $_SESSION['user_id'] . "';";
527 532
                     $user = $db_connection->query($sql)->fetch_object();
528 533
                     if ($user->backup == $_POST['code']) {
@@ -532,7 +537,9 @@  discard block
 block discarded – undo
532 537
                         $page = 'views/core/2factor.php';
533 538
                     }
534 539
                     }
535
-                } else $page = 'views/core/2factor.php';
540
+                } else {
541
+                    $page = 'views/core/2factor.php';
542
+                }
536 543
                 }
537 544
             }
538 545
 
Please login to merge, or discard this patch.
hooks/rcon_ban.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,8 +18,7 @@
 block discarded – undo
18 18
         {
19 19
             $cmd = 'ban ' . $rid . ' ' . $time . ' ' . $reason;
20 20
             $answer = rcon(decrypt($server->sq_ip), decrypt($server->sq_port), decrypt($server->rcon_pass), $cmd);
21
-        }
22
-        catch (Exception $e)
21
+        } catch (Exception $e)
23 22
         {
24 23
             echo $e->getMessage( );
25 24
         }
Please login to merge, or discard this patch.
hooks/rcon_players.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,7 +18,9 @@  discard block
 block discarded – undo
18 18
             $array = preg_split('/$\R?^/m', $out);
19 19
             $playersr = array();
20 20
 
21
-            if ($array[0] == '(0 players in total')  $array = array();
21
+            if ($array[0] == '(0 players in total') {
22
+                $array = array();
23
+            }
22 24
 
23 25
             for ($i = 0; $i < count($array); $i++)
24 26
             {
@@ -27,8 +29,7 @@  discard block
 block discarded – undo
27 29
 
28 30
             echo json_encode($playersr);
29 31
 
30
-        }
31
-        catch (Exception $e)
32
+        } catch (Exception $e)
32 33
         {
33 34
             echo $e->getMessage( );
34 35
             var_dump($e);
Please login to merge, or discard this patch.
hooks/rcon_command.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,8 +20,7 @@
 block discarded – undo
20 20
             try
21 21
             {
22 22
                 $answer = rcon(decrypt($server->sq_ip), decrypt($server->sq_port), decrypt($server->rcon_pass), $cmd);
23
-            }
24
-            catch (Exception $e)
23
+            } catch (Exception $e)
25 24
             {
26 25
                 echo $e->getMessage( );
27 26
             }
Please login to merge, or discard this patch.
validators/pid.php 1 patch
Braces   +11 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,18 +11,25 @@
 block discarded – undo
11 11
         $api = "http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=" . $settings['steamAPI'] . "&steamids=" . $_POST['player_id'];
12 12
         $player = json_decode(file_get_contents($api), true);
13 13
         $player = $player['response'];
14
-        if (empty($player['players'])) $isAvailable = false; else {
14
+        if (empty($player['players'])) {
15
+            $isAvailable = false;
16
+        } else {
15 17
             $isAvailable = true;
16 18
             $player = $player['players']['0'];
17 19
         }
18 20
     
19
-        if (isset($isAvailable) && isset($player['personaname'])) echo json_encode(array(
21
+        if (isset($isAvailable) && isset($player['personaname'])) {
22
+            echo json_encode(array(
20 23
             'valid' => $isAvailable,
21 24
             'name' => $player['personaname'],
22 25
             'url' => $player['profileurl']
23 26
         ));
24
-        elseif (isset($isAvailable)) echo json_encode(array(
27
+        } elseif (isset($isAvailable)) {
28
+            echo json_encode(array(
25 29
             'valid' => $isAvailable
26 30
         ));
31
+        }
27 32
     }
28
-} else echo json_encode(array('valid' => false));
29 33
\ No newline at end of file
34
+} else {
35
+    echo json_encode(array('valid' => false));
36
+}
Please login to merge, or discard this patch.
classes/csrf.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * PHP Class for quickly securing forms against CSRF attacks
4
- *
5
- * @author Sam Collins
6
- * @copyright 2015 Sam Collins
7
- * @link https://gist.github.com/MightySCollins/0096d193fdc4160565b3
8
- */
3
+     * PHP Class for quickly securing forms against CSRF attacks
4
+     *
5
+     * @author Sam Collins
6
+     * @copyright 2015 Sam Collins
7
+     * @link https://gist.github.com/MightySCollins/0096d193fdc4160565b3
8
+     */
9 9
 
10 10
 class formToken
11 11
 {
Please login to merge, or discard this patch.
classes/registration.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
                 // escaping, additionally removing everything that could be (html/javascript-) code
87 87
                 $user_name = $this->db_connection->real_escape_string(strip_tags($_POST['user_name'], ENT_QUOTES));
88 88
                 $user_email = $this->db_connection->real_escape_string(strip_tags($_POST['user_email'], ENT_QUOTES));
89
-                if(isset($_POST['player_id'])) {
89
+                if (isset($_POST['player_id'])) {
90 90
                     $playerid = $this->db_connection->real_escape_string(strip_tags($_POST['player_id'], ENT_QUOTES));
91 91
                 }
92 92
                 $user_password = $_POST['user_password_new'];
Please login to merge, or discard this patch.
classes/update.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     $settings['2factor'] = true;
18 18
     $settings['force2factor'] = 'none';
19 19
     $settings['version'] = 0.4;
20
-    $settings['item'] = array(5,10,15,25,50);
20
+    $settings['item'] = array(5, 10, 15, 25, 50);
21 21
     file_put_contents('config/settings.php', '<?php return ' . var_export($settings, true) . ';');
22 22
     $updated = true;
23 23
 }
Please login to merge, or discard this patch.