Completed
Push — master ( db7c0d...0a19bb )
by
unknown
02:53
created
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.
classes/GuestReg.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 require_once("gfunctions.php");
3 3
 /**
4
- * Class registration
5
- * handles the user registration
6
- */
4
+     * Class registration
5
+     * handles the user registration
6
+     */
7 7
 class GuestReg
8 8
 {
9 9
     /**
Please login to merge, or discard this patch.
views/steam/life/houses.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,13 +10,17 @@  discard block
 block discarded – undo
10 10
     $sql = "SELECT `id`,`pid`,`classname`,`active`,`type`,`plate`,`alive`,`active` FROM `vehicles` INNER JOIN `players` ON vehicles.pid=players.playerid WHERE `pid` LIKE '" . $_SESSION['playerid'] . "' OR `classname` LIKE '%" . $search . "%' OR `name` LIKE '%" . $search . "%' OR `plate` LIKE '" . $search . "' OR `inventory` LIKE '%" . $search . "%';";
11 11
     $result_of_query = $db_link->query($sql);
12 12
     $total_records = mysqli_num_rows($result_of_query);
13
-    if ($pageNum > $total_records) $pageNum = $total_records;
13
+    if ($pageNum > $total_records) {
14
+        $pageNum = $total_records;
15
+    }
14 16
     $sql = "SELECT `id`,`pid`,`classname`,`active`,`type`,`plate`,`alive`,`active` FROM `vehicles` INNER JOIN `players` ON vehicles.pid=players.playerid WHERE `pid` LIKE '" . $_SESSION['playerid'] . "' OR `classname` LIKE '%" . $search . "%' OR `name` LIKE '%" . $search . "%' OR `plate` LIKE '" . $search . "' OR `inventory` LIKE '%" . $search . "%'" . $max . " ;";
15 17
 } else {
16 18
     $sql = "SELECT `id` FROM `vehicles` INNER JOIN `players` ON vehicles.pid=players.playerid WHERE `pid` LIKE '" . $_SESSION['playerid'] . "';";
17 19
     $result_of_query = $db_link->query($sql);
18 20
     $total_records = mysqli_num_rows($result_of_query);
19
-    if ($pageNum > $total_records) $pageNum = $total_records;
21
+    if ($pageNum > $total_records) {
22
+        $pageNum = $total_records;
23
+    }
20 24
     $sql = "SELECT `id`,`pid`,`classname`,`active`,`type`,`plate`,`alive`,`active` FROM `vehicles` INNER JOIN `players` ON vehicles.pid=players.playerid WHERE `pid` LIKE '" . $_SESSION['playerid'] . "' " . $max . " ;";
21 25
 }
22 26
 $result_of_query = $db_link->query($sql);
@@ -74,4 +78,6 @@  discard block
 block discarded – undo
74 78
     </table>
75 79
 </div>
76 80
 <?php
77
-} else echo errorMessage(3, $lang);
78 81
\ No newline at end of file
82
+} else {
83
+    echo errorMessage(3, $lang);
84
+}
Please login to merge, or discard this patch.
hooks/rcon_kick.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.
classes/login.php 1 patch
Braces   +8 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,7 +108,9 @@  discard block
 block discarded – undo
108 108
                             //if (!isset($verify->verify)) {
109 109
                                 $_SESSION['2factor'] = 0;
110 110
                                 if (!empty($result_row->twoFactor)) {
111
-                                    if ($settings['2factor']) $_SESSION['2factor'] = 1; else {
111
+                                    if ($settings['2factor']) {
112
+                                        $_SESSION['2factor'] = 1;
113
+                                    } else {
112 114
                                     $sql = "UPDATE `users` SET `backup`=NULL,`twoFactor`=NULL WHERE `userid` = '" . $result_row->user_id . "';";
113 115
                                     $this->db_connection->query($sql);
114 116
                                     $this->errors[] = $lang['2factorForceRevoke'];
@@ -130,7 +132,11 @@  discard block
 block discarded – undo
130 132
                                 $_SESSION['user_id'] = $result_row->user_id;
131 133
                                 $_SESSION['steamsignon'] = false;
132 134
                                 $_SESSION['permissions'] = json_decode($result_row->permissions, true);
133
-                                if (isset($result_row->items))$_SESSION['items'] = $result_row->items; else $_SESSION['items'] = $settings['items'];
135
+                                if (isset($result_row->items)) {
136
+                                    $_SESSION['items'] = $result_row->items;
137
+                                } else {
138
+                                    $_SESSION['items'] = $settings['items'];
139
+                                }
134 140
                                 if (isset($_POST['lang'])) {
135 141
                                     setcookie('lang', $_POST['lang'], time() + (3600 * 24 * 30));
136 142
                                     $_SESSION['lang'] = $_POST['lang'];
Please login to merge, or discard this patch.