Completed
Push — master ( 3e8c65...634410 )
by Jason
02:26
created
classes/password.php 2 patches
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
-     * A Compatibility library with PHP 5.5's simplified password hashing API.
4
-     *
5
-     * @author Anthony Ferrara <[email protected]>
6
-     * @license http://www.opensource.org/licenses/mit-license.html MIT License
7
-     * @copyright 2012 The Authors
8
-     */
3
+ * A Compatibility library with PHP 5.5's simplified password hashing API.
4
+ *
5
+ * @author Anthony Ferrara <[email protected]>
6
+ * @license http://www.opensource.org/licenses/mit-license.html MIT License
7
+ * @copyright 2012 The Authors
8
+ */
9 9
 
10 10
 if (!defined('PASSWORD_DEFAULT')) {
11 11
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
             return null;
32 32
         }
33 33
         if (!is_int($algo)) {
34
-            trigger_error("password_hash() expects parameter 2 to be long, " . gettype($algo) . " given", E_USER_WARNING);
34
+            trigger_error("password_hash() expects parameter 2 to be long, ".gettype($algo)." given", E_USER_WARNING);
35 35
             return null;
36 36
         }
37 37
         switch ($algo) {
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
         }
123 123
         $salt = substr($salt, 0, $required_salt_len);
124 124
 
125
-        $hash = $hash_format . $salt;
125
+        $hash = $hash_format.$salt;
126 126
 
127 127
         $ret = crypt($password, $hash);
128 128
 
Please login to merge, or discard this patch.
views/life/vehicles.php 2 patches
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` FROM `vehicles` INNER JOIN `players` ON vehicles.pid=players.playerid 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);
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 vehicles.id,vehicles.pid,vehicles.classname,vehicles.active,vehicles.type,vehicles.plate,vehicles.alive,vehicles.active,players.name FROM `vehicles` INNER JOIN `players` ON vehicles.pid=players.playerid WHERE `pid` LIKE '" . $search . "' OR `vehicles.classname` LIKE '%" . $search . "%' OR `name` LIKE '%" . $search . "%' OR `vehicles.plate` LIKE '" . $search . "' OR `inventory` LIKE '%" . $search . "%' OR `name` LIKE '%" . $search . "%' " . $max . " ;";
15 17
 } else {
16 18
     $sql = "SELECT `id` FROM `vehicles` INNER JOIN `players` ON vehicles.pid=players.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 vehicles.id,vehicles.pid,vehicles.classname,vehicles.active,vehicles.type,vehicles.plate,vehicles.alive,vehicles.active,players.name FROM `vehicles` INNER JOIN `players` ON vehicles.pid=players.playerid " . $max . " ;";
21 25
 }
22 26
 $result_of_query = $db_link->query($sql);
@@ -77,4 +81,6 @@  discard block
 block discarded – undo
77 81
     </table>
78 82
 </div>
79 83
 <?php
80
-} else echo errorMessage(32, $lang);
84
+} else {
85
+    echo errorMessage(32, $lang);
86
+}
Please login to merge, or discard this 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.
views/life/players.php 2 patches
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,14 +7,18 @@  discard block
 block discarded – undo
7 7
     $sql = "SELECT `uid` FROM `players` WHERE `uid` LIKE '" . $search . "' OR `name` LIKE '%" . $search . "%' OR `playerid` LIKE '" . $search . "';";
8 8
     $result_of_query = $db_link->query($sql);
9 9
     $total_records = mysqli_num_rows($result_of_query);
10
-    if ($pageNum > $total_records) $pageNum = $total_records;
10
+    if ($pageNum > $total_records) {
11
+        $pageNum = $total_records;
12
+    }
11 13
     $sql = "SELECT `playerid`,`name`,`bankacc`,`cash`,`coplevel`,`mediclevel`,`adminlevel`,`uid` FROM `players` WHERE `uid` LIKE '" . $search . "' OR `name` LIKE '%" . $search . "%' OR `playerid` LIKE '" . $search . "'" . $max . " ;";
12 14
     logAction($_SESSION['user_name'], $lang['searched'] . ' (' . $search . ') ' . $lang['in'] . ' ' . $lang['players'], 1);
13 15
 } else {
14 16
     $sql = "SELECT `uid` FROM `players`;";
15 17
     $result_of_query = $db_link->query($sql);
16 18
     $total_records = mysqli_num_rows($result_of_query);
17
-    if ($pageNum > $total_records) $pageNum = $total_records;
19
+    if ($pageNum > $total_records) {
20
+        $pageNum = $total_records;
21
+    }
18 22
     $sql = "SELECT `playerid`,`name`,`bankacc`,`cash`,`coplevel`,`mediclevel`,`adminlevel`,`uid` FROM `players` " . $max . " ;";
19 23
 }
20 24
 
@@ -107,4 +111,6 @@  discard block
 block discarded – undo
107 111
                 ?>
108 112
         </div>
109 113
 <?php
110
-} else echo '<h3>' . errorMessage(36, $lang) . '</h3>';
114
+} else {
115
+    echo '<h3>' . errorMessage(36, $lang) . '</h3>';
116
+}
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  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';";
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
     $total_records = mysqli_num_rows($result_of_query);
10 10
     if ($pageNum > $total_records) $pageNum = $total_records;
11 11
     $sql = "SELECT `name`,`bankacc`,`cash`,`coplevel`,`mediclevel`,`adminlevel`,`uid`, $playerIdColumn as `playerid` FROM `players` WHERE `uid` LIKE '$search' OR `name` LIKE '%$search%' OR $playerIdColumn LIKE '$search' $max;";
12
-    logAction($_SESSION['user_name'], $lang['searched'] . ' (' . $search . ') ' . $lang['in'] . ' ' . $lang['players'], 1);
12
+    logAction($_SESSION['user_name'], $lang['searched'].' ('.$search.') '.$lang['in'].' '.$lang['players'], 1);
13 13
 } else {
14 14
     $sql = "SELECT `uid` FROM `players`;";
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);
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
                     <th class="hidden-xs"><i class="fa fa-ambulance"></i> <?php echo $lang['medic']; ?></th>
58 58
                     <th class="hidden-xs"><i class="fa fa-cogs"></i> <?php echo $lang['admin']; ?></th>
59 59
                     <?php if ($_SESSION['permissions']['edit']['player']) {
60
-                            echo '<th class="hidden-xs"><i class="fa fa-pencil"></i> ' . $lang['edit'] . '</th>';
60
+                            echo '<th class="hidden-xs"><i class="fa fa-pencil"></i> '.$lang['edit'].'</th>';
61 61
                         } else {
62
-                            echo '<th class="hidden-xs"><i class="fa fa-eye"></i>' . $lang['view'] . '</th>';
62
+                            echo '<th class="hidden-xs"><i class="fa fa-eye"></i>'.$lang['view'].'</th>';
63 63
                         }
64 64
                     if ($_SESSION['permissions']['view']['steam'] && $steamPlayers > 0) {
65 65
                         echo '<th class="hidden-xs"><i class="fa fa-fw fa-steam"></i> Steam</th>';
@@ -71,30 +71,30 @@  discard block
 block discarded – undo
71 71
                 while ($row = mysqli_fetch_assoc($result_of_query)) {
72 72
                     $playersID = $row["playerid"];
73 73
                     echo "<tr>";
74
-                    echo "<td>" . $row["name"] . "</td>";
75
-                    echo "<td>" . $playersID . "</td>";
76
-                    echo "<td class='hidden-xs'>" . $row["cash"] . "</td>";
77
-                    echo "<td class='hidden-xs'>" . $row["bankacc"] . "</td>";
78
-                    echo "<td class='hidden-xs'>" . $row["coplevel"] . "</td>";
79
-                    echo "<td class='hidden-xs'>" . $row["mediclevel"] . "</td>";
80
-                    echo "<td class='hidden-xs'>" . $row["adminlevel"] . "</td>";
74
+                    echo "<td>".$row["name"]."</td>";
75
+                    echo "<td>".$playersID."</td>";
76
+                    echo "<td class='hidden-xs'>".$row["cash"]."</td>";
77
+                    echo "<td class='hidden-xs'>".$row["bankacc"]."</td>";
78
+                    echo "<td class='hidden-xs'>".$row["coplevel"]."</td>";
79
+                    echo "<td class='hidden-xs'>".$row["mediclevel"]."</td>";
80
+                    echo "<td class='hidden-xs'>".$row["adminlevel"]."</td>";
81 81
                     if ($_SESSION['permissions']['edit']['player']) {
82
-                        echo "<td><a class='btn btn-primary btn-xs' href='" . $settings['url'] . "editPlayer/" . $row["uid"] . "'>";
82
+                        echo "<td><a class='btn btn-primary btn-xs' href='".$settings['url']."editPlayer/".$row["uid"]."'>";
83 83
                         echo "<i class='fa fa-pencil'></i></a></td>";
84 84
                     } else {
85
-                        echo "<td><a class='btn btn-primary btn-xs' href='" . $settings['url'] . "editPlayer/" . $row["uid"] . "'>";
85
+                        echo "<td><a class='btn btn-primary btn-xs' href='".$settings['url']."editPlayer/".$row["uid"]."'>";
86 86
                         echo "<i class='fa fa-eye'></i></a></td>";
87 87
                     }
88 88
                     if ($_SESSION['permissions']['view']['steam'] && $steamPlayers > 0) {
89
-                        echo "<td><a href='http://steamcommunity.com/profiles/" . $row["playerid"] . "' ";
89
+                        echo "<td><a href='http://steamcommunity.com/profiles/".$row["playerid"]."' ";
90 90
                         for ($player = 0; $player <= $steamPlayers; $player++) {
91 91
                             if ($bans[$player]->SteamId == $row['playerid']) {
92 92
                                 if ($bans[$player]->VACBanned == true) {
93
-                                    echo "<td><a href='http://steamcommunity.com/profiles/" . $row["playerid"] . "' ";
93
+                                    echo "<td><a href='http://steamcommunity.com/profiles/".$row["playerid"]."' ";
94 94
                                     echo "class='btn btn-danger btn-xs hidden-xs' target='_blank'><i class='fa fa-steam'></i></a>";
95 95
 
96 96
                                 } else {
97
-                                    echo "<td><a href='http://steamcommunity.com/profiles/" . $row["playerid"] . "' ";
97
+                                    echo "<td><a href='http://steamcommunity.com/profiles/".$row["playerid"]."' ";
98 98
                                     echo "class='btn btn-primary btn-xs hidden-xs' target='_blank'><i class='fa fa-steam'></i></a>"; }
99 99
                             }
100 100
                         }
@@ -107,4 +107,4 @@  discard block
 block discarded – undo
107 107
                 ?>
108 108
         </div>
109 109
 <?php
110
-} else echo '<h3>' . errorMessage(36, $lang) . '</h3>';
110
+} else echo '<h3>'.errorMessage(36, $lang).'</h3>';
Please login to merge, or discard this patch.
views/life/editHouse.php 2 patches
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -233,4 +233,7 @@
 block discarded – undo
233 233
         </div>
234 234
     </div>
235 235
 </div>
236
-<?php } else errorMessage(3, $lang); ?>
236
+<?php } else {
237
+    errorMessage(3, $lang);
238
+}
239
+?>
Please login to merge, or discard this patch.
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -6,37 +6,37 @@  discard block
 block discarded – undo
6 6
     switch ($_POST["editType"]) {
7 7
         case "house_inv":
8 8
             $hInv = $_POST["hInv"];
9
-            $sql = "UPDATE `houses` SET `inventory`='" . $hInv . "' WHERE `houses`.`id` = '" . $hID . "'";
9
+            $sql = "UPDATE `houses` SET `inventory`='".$hInv."' WHERE `houses`.`id` = '".$hID."'";
10 10
             $db_link->query($sql);
11
-            message($lang['house'] . ' ' . $lang['updated']);
11
+            message($lang['house'].' '.$lang['updated']);
12 12
             break;
13 13
 
14 14
         case "house_cont":
15 15
             $hCont = $_POST["hCont"];
16
-            $sql = "UPDATE `houses` SET `containers`='" . $hCont . "' WHERE `houses`.`id` = '" . $hID . "'";
16
+            $sql = "UPDATE `houses` SET `containers`='".$hCont."' WHERE `houses`.`id` = '".$hID."'";
17 17
             $db_link->query($sql);
18
-            message($lang['house'] . ' ' . $lang['updated']);
18
+            message($lang['house'].' '.$lang['updated']);
19 19
             break;
20 20
 
21 21
         case "house_del":
22
-            $sql = "DELETE FROM `houses` WHERE `houses`.`id` = '" . $hID . "'";
22
+            $sql = "DELETE FROM `houses` WHERE `houses`.`id` = '".$hID."'";
23 23
             $db_link->query($sql);
24
-            header("location: " . $settings['url'] . "houses");
24
+            header("location: ".$settings['url']."houses");
25 25
             break;
26 26
 
27 27
         case "house_details":
28 28
             $hPos = $_POST["hPos"];
29 29
             $hOwn = $_POST["hOwn"];
30 30
             $hOwned = $_POST["hOwned"];
31
-            $sql = "UPDATE `houses` SET `pid`='" . $hOwn . "',`pos`='" . $hPos . "',`owned`='" . $hOwned . "' WHERE `id` = '" . $hID . "'";
31
+            $sql = "UPDATE `houses` SET `pid`='".$hOwn."',`pos`='".$hPos."',`owned`='".$hOwned."' WHERE `id` = '".$hID."'";
32 32
             $db_link->query($sql);
33
-            message($lang['house'] . ' ' . $lang['updated']);
33
+            message($lang['house'].' '.$lang['updated']);
34 34
             break;
35 35
         }
36 36
     }
37 37
 }
38 38
 
39
-$sql = "SELECT * FROM `houses` WHERE `id` ='" . $hID . "';";
39
+$sql = "SELECT * FROM `houses` WHERE `id` ='".$hID."';";
40 40
 $result_of_query = $db_link->query($sql);
41 41
 if ($result_of_query->num_rows > 0) {
42 42
     $house = $result_of_query->fetch_object();
@@ -45,15 +45,15 @@  discard block
 block discarded – undo
45 45
     <div class="panel panel-default">
46 46
         <div class="panel-heading">
47 47
             <h2 class="panel-title"><i
48
-                    class="fa fa-child fa-fw"></i><?php echo nameID($house->pid, $db_link) . "'s " . $lang['house']; ?>
48
+                    class="fa fa-child fa-fw"></i><?php echo nameID($house->pid, $db_link)."'s ".$lang['house']; ?>
49 49
             </h2>
50 50
         </div>
51 51
         <div class="panel-body">
52 52
             <?php
53
-            echo '<center><img class="img-responsive" src="' . $settings['url'] . 'assets/img/house/1.jpg"/>';
53
+            echo '<center><img class="img-responsive" src="'.$settings['url'].'assets/img/house/1.jpg"/>';
54 54
 
55
-            echo "<h4>" . $lang['owner'] . ": <a href='" . $settings['url'] . "editPlayer/" . uID($house->pid, $db_link) . "'>" . nameID($house->pid, $db_link) . "</a></h4>";
56
-            echo "<h4>" . $lang['position'] . ": " . $house->pos . "</h4>";
55
+            echo "<h4>".$lang['owner'].": <a href='".$settings['url']."editPlayer/".uID($house->pid, $db_link)."'>".nameID($house->pid, $db_link)."</a></h4>";
56
+            echo "<h4>".$lang['position'].": ".$house->pos."</h4>";
57 57
 
58 58
             if ($_SESSION['permissions']['edit']['houses']) {
59 59
                 echo '
@@ -76,15 +76,15 @@  discard block
 block discarded – undo
76 76
     <?php
77 77
     echo '<div class="panel panel-default" style="float:left; width:100%; margin:0 auto;">';
78 78
     echo '<ul id="myTab" class="nav nav-tabs">';
79
-    echo '<li><a href="#house_inv" data-toggle="tab">' . $lang['inventory'] . '</a></li>';
80
-    echo '<li><a href="#house_cont" data-toggle="tab">' . $lang['containers'] . '</a></li>';
79
+    echo '<li><a href="#house_inv" data-toggle="tab">'.$lang['inventory'].'</a></li>';
80
+    echo '<li><a href="#house_cont" data-toggle="tab">'.$lang['containers'].'</a></li>';
81 81
     echo '</ul>';
82 82
     ?>
83 83
     <div id="myTabContent" class="tab-content">
84 84
         <div class="tab-pane fade active in well" id="house_inv">
85
-            <h4 style="centred"><?php echo $lang['house'] . " " . $lang['inventory']; ?> </h4>
85
+            <h4 style="centred"><?php echo $lang['house']." ".$lang['inventory']; ?> </h4>
86 86
             <?php
87
-                echo "<textarea class='form-control' readonly rows='5' style='width: 100%' id='civ_gear' name='civ_gear'>" . $house->inventory . "</textarea>";
87
+                echo "<textarea class='form-control' readonly rows='5' style='width: 100%' id='civ_gear' name='civ_gear'>".$house->inventory."</textarea>";
88 88
             ?>
89 89
             <br>
90 90
             <?php if ($_SESSION['permissions']['edit']['houses']) { ?>
@@ -95,9 +95,9 @@  discard block
 block discarded – undo
95 95
             <br>
96 96
         </div>
97 97
         <div class="tab-pane fade well" id="house_cont">
98
-            <h4 style="centred"><?php echo $lang['house'] . " " . $lang['containers']; ?> </h4>
98
+            <h4 style="centred"><?php echo $lang['house']." ".$lang['containers']; ?> </h4>
99 99
             <?php
100
-                echo "<textarea class='form-control' readonly rows='5' style='width: 100%' id='house_cont' name='house_cont'>" . $house->containers . "</textarea>";
100
+                echo "<textarea class='form-control' readonly rows='5' style='width: 100%' id='house_cont' name='house_cont'>".$house->containers."</textarea>";
101 101
             ?>
102 102
             <br>
103 103
             <?php if ($_SESSION['permissions']['edit']['houses']) { ?>
@@ -116,10 +116,10 @@  discard block
 block discarded – undo
116 116
         <div class="modal-content">
117 117
             <div class="modal-header">
118 118
                 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
119
-                <h4 class="modal-title"><span class="glyphicon glyphicon-pencil"></span><?php echo $lang['edit'] . " " . $lang['house'] . " " . $lang['inventory'] ?>
119
+                <h4 class="modal-title"><span class="glyphicon glyphicon-pencil"></span><?php echo $lang['edit']." ".$lang['house']." ".$lang['inventory'] ?>
120 120
                 </h4>
121 121
             </div>
122
-                <form method="post" action="<?php echo $settings['url'] . "editHouse/" . $hID ?>" role="form">
122
+                <form method="post" action="<?php echo $settings['url']."editHouse/".$hID ?>" role="form">
123 123
                     <div class="modal-body">
124 124
                         <div class="form-group">
125 125
                             <input type="hidden" name="editType" value="house_inv"/>
@@ -146,10 +146,10 @@  discard block
 block discarded – undo
146 146
                 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
147 147
                 <h4 class="modal-title">
148 148
                     <span
149
-                        class="glyphicon glyphicon-pencil"></span> <?php echo $lang['edit'] . " " . $lang['house'] . " " . $lang['containers'] ?>
149
+                        class="glyphicon glyphicon-pencil"></span> <?php echo $lang['edit']." ".$lang['house']." ".$lang['containers'] ?>
150 150
                 </h4>
151 151
             </div>
152
-                <form method="post" action="<?php echo $settings['url'] . "editHouse/" . $hID ?>" role="form">
152
+                <form method="post" action="<?php echo $settings['url']."editHouse/".$hID ?>" role="form">
153 153
                     <div class="modal-body">
154 154
                         <div class="form-group">
155 155
                             <input type="hidden" name="editType" value="house_cont"/>
@@ -173,10 +173,10 @@  discard block
 block discarded – undo
173 173
         <div class="modal-content">
174 174
             <div class="modal-header">
175 175
                 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
176
-                <h4 class="modal-title"><span class="glyphicon glyphicon-pencil"></span> <?php echo $lang['delete'] . " " . $lang['house'] ?>
176
+                <h4 class="modal-title"><span class="glyphicon glyphicon-pencil"></span> <?php echo $lang['delete']." ".$lang['house'] ?>
177 177
                 </h4>
178 178
             </div>
179
-            <form method="post" action="<?php echo $settings['url'] . "editHouse/" . $hID ?>" role="form">
179
+            <form method="post" action="<?php echo $settings['url']."editHouse/".$hID ?>" role="form">
180 180
                 <div class="modal-body">
181 181
                     <div class="form-group">
182 182
                         <input type="hidden" name="editType" value="house_del"/>
@@ -201,10 +201,10 @@  discard block
 block discarded – undo
201 201
             <div class="modal-header">
202 202
                 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
203 203
                 <h4 class="modal-title">
204
-                    <span class="glyphicon glyphicon-pencil"></span> <?php echo $lang['edit'] . " " . $lang['house'] ?>
204
+                    <span class="glyphicon glyphicon-pencil"></span> <?php echo $lang['edit']." ".$lang['house'] ?>
205 205
                 </h4>
206 206
             </div>
207
-                <form method="post" action="<?php echo $settings['url'] . "editHouse/" . $hID ?>" role="form">
207
+                <form method="post" action="<?php echo $settings['url']."editHouse/".$hID ?>" role="form">
208 208
                     <div class="modal-body">
209 209
                         <div class="form-group">
210 210
                             <input type="hidden" name="editType" value="house_details"/>
@@ -212,12 +212,12 @@  discard block
 block discarded – undo
212 212
                             <div class="row">
213 213
                                 <center>
214 214
                                     <?php
215
-                                    echo "<h4>" . $lang['owner'] . ": <input id='hOwn' name='hOwn' type='text' value='" . $house->pid . "'></td><br/>";
216
-                                    echo "<h4>" . $lang['position'] . ": <input id='hPos' name='hPos' type='text' value='" . $house->pos . "'readonly></td><br/>";
217
-                                    echo "<h4>" . $lang['owned'] . ":  ";
215
+                                    echo "<h4>".$lang['owner'].": <input id='hOwn' name='hOwn' type='text' value='".$house->pid."'></td><br/>";
216
+                                    echo "<h4>".$lang['position'].": <input id='hPos' name='hPos' type='text' value='".$house->pos."'readonly></td><br/>";
217
+                                    echo "<h4>".$lang['owned'].":  ";
218 218
                                     echo "<select id='hOwned' name='hOwned'>";
219
-                                    echo '<option value="0"' . select('0', $house->owned) . '>' . $lang['no'] . '</option>';
220
-                                    echo '<option value="1"' . select('1', $house->owned) . '>' . $lang['yes'] . '</option>';
219
+                                    echo '<option value="0"'.select('0', $house->owned).'>'.$lang['no'].'</option>';
220
+                                    echo '<option value="1"'.select('1', $house->owned).'>'.$lang['yes'].'</option>';
221 221
                                     echo "</select>";
222 222
                                     echo "</center>";
223 223
                                     ?>
Please login to merge, or discard this patch.
views/life/houses.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,4 +69,6 @@
 block discarded – undo
69 69
     </div>
70 70
 
71 71
 <?php
72
-} else echo errorMessage(3, $lang);
72
+} else {
73
+    echo errorMessage(3, $lang);
74
+}
Please login to merge, or discard this 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/medics.php 2 patches
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,14 +7,18 @@  discard block
 block discarded – undo
7 7
     $sql = "SELECT `uid` FROM `players` WHERE `uid` LIKE '" . $search . "' OR `name` LIKE '%" . $search . "%' OR `playerid` LIKE '" . $search . "';";
8 8
     $result_of_query = $db_link->query($sql);
9 9
     $total_records = mysqli_num_rows($result_of_query);
10
-    if ($pageNum > $total_records) $pageNum = $total_records;
10
+    if ($pageNum > $total_records) {
11
+        $pageNum = $total_records;
12
+    }
11 13
     $sql = "SELECT `playerid`,`name`,`bankacc`,`cash`,`coplevel`,`mediclevel`,`adminlevel`,`uid` FROM `players` WHERE `uid` LIKE '" . $search . "' OR `name` LIKE '%" . $search . "%' OR `playerid` LIKE '" . $search . "'" . $max . " ;";
12 14
     logAction($_SESSION['user_name'], $lang['searched'] . ' (' . $search . ') ' . $lang['in'] . ' ' . $lang['players'], 1);
13 15
 } else {
14 16
     $sql = "SELECT `uid` FROM `players`;";
15 17
     $result_of_query = $db_link->query($sql);
16 18
     $total_records = mysqli_num_rows($result_of_query);
17
-    if ($pageNum > $total_records) $pageNum = $total_records;
19
+    if ($pageNum > $total_records) {
20
+        $pageNum = $total_records;
21
+    }
18 22
     $sql = "SELECT `playerid`,`name`,`bankacc`,`cash`,`coplevel`,`mediclevel`,`adminlevel`,`uid` FROM `players` " . $max . " ;";
19 23
 }
20 24
 
@@ -107,4 +111,6 @@  discard block
 block discarded – undo
107 111
                 ?>
108 112
         </div>
109 113
 <?php
110
-} else echo '<h3>' . errorMessage(36, $lang) . '</h3>';
114
+} else {
115
+    echo '<h3>' . errorMessage(36, $lang) . '</h3>';
116
+}
Please login to merge, or discard this 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 `mediclevel` >= '1' ORDER BY `mediclevel` 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`, `mediclevel`, `uid`, $playerIdColumn as `playerid` FROM `players` WHERE `uid` LIKE '" . $search . "' OR `name` LIKE '%$search%' OR $playerIdColumn LIKE '$search' AND `mediclevel` >= '1' ORDER BY `mediclevel` DESC $max;";
12
-    logAction($_SESSION['user_name'], $lang['searched'] . ' (' . $search . ') ' . $lang['in'] . ' ' . $lang['players'], 1);
11
+    $sql = "SELECT `name`, `mediclevel`, `uid`, $playerIdColumn as `playerid` FROM `players` WHERE `uid` LIKE '".$search."' OR `name` LIKE '%$search%' OR $playerIdColumn LIKE '$search' AND `mediclevel` >= '1' ORDER BY `mediclevel` 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 `mediclevel` >= '1' ORDER BY `mediclevel` 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["mediclevel"] . "</td>";
66
+                echo "<td>".$row["name"]."</td>";
67
+                echo "<td>".$row["playerid"]."</td>";
68
+                echo "<td class='hidden-xs'>".$row["mediclevel"]."</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/police.php 2 patches
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,14 +7,18 @@  discard block
 block discarded – undo
7 7
     $sql = "SELECT `uid` FROM `players` WHERE `uid` LIKE '" . $search . "' OR `name` LIKE '%" . $search . "%' OR `playerid` LIKE '" . $search . "';";
8 8
     $result_of_query = $db_link->query($sql);
9 9
     $total_records = mysqli_num_rows($result_of_query);
10
-    if ($pageNum > $total_records) $pageNum = $total_records;
10
+    if ($pageNum > $total_records) {
11
+        $pageNum = $total_records;
12
+    }
11 13
     $sql = "SELECT `playerid`,`name`,`bankacc`,`cash`,`coplevel`,`mediclevel`,`adminlevel`,`uid` FROM `players` WHERE `uid` LIKE '" . $search . "' OR `name` LIKE '%" . $search . "%' OR `playerid` LIKE '" . $search . "'" . $max . " ;";
12 14
     logAction($_SESSION['user_name'], $lang['searched'] . ' (' . $search . ') ' . $lang['in'] . ' ' . $lang['players'], 1);
13 15
 } else {
14 16
     $sql = "SELECT `uid` FROM `players`;";
15 17
     $result_of_query = $db_link->query($sql);
16 18
     $total_records = mysqli_num_rows($result_of_query);
17
-    if ($pageNum > $total_records) $pageNum = $total_records;
19
+    if ($pageNum > $total_records) {
20
+        $pageNum = $total_records;
21
+    }
18 22
     $sql = "SELECT `playerid`,`name`,`bankacc`,`cash`,`coplevel`,`mediclevel`,`adminlevel`,`uid` FROM `players` " . $max . " ;";
19 23
 }
20 24
 
@@ -107,4 +111,6 @@  discard block
 block discarded – undo
107 111
                 ?>
108 112
         </div>
109 113
 <?php
110
-} else echo '<h3>' . errorMessage(36, $lang) . '</h3>';
114
+} else {
115
+    echo '<h3>' . errorMessage(36, $lang) . '</h3>';
116
+}
Please login to merge, or discard this 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.
classes/googleAuth.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
-     * PHP Class for handling Google Authenticator 2-factor authentication
4
-     *
5
-     * @author Michael Kliewe
6
-     * @copyright 2012 Michael Kliewe
7
-     * @license http://www.opensource.org/licenses/bsd-license.php BSD License
8
-     * @link http://www.phpgangsta.de/
9
-     */
3
+ * PHP Class for handling Google Authenticator 2-factor authentication
4
+ *
5
+ * @author Michael Kliewe
6
+ * @copyright 2012 Michael Kliewe
7
+ * @license http://www.opensource.org/licenses/bsd-license.php BSD License
8
+ * @link http://www.phpgangsta.de/
9
+ */
10 10
 
11 11
 class PHPGangsta_GoogleAuthenticator
12 12
 {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         $secretkey = $this->_base32Decode($secret);
48 48
 
49 49
         // Pack time into binary string
50
-        $time = chr(0) . chr(0) . chr(0) . chr(0) . pack('N*', $timeSlice);
50
+        $time = chr(0).chr(0).chr(0).chr(0).pack('N*', $timeSlice);
51 51
         // Hash it with users secret key
52 52
         $hm = hash_hmac('SHA1', $time, $secretkey, true);
53 53
         // Use last nipple of result as index/offset
@@ -73,8 +73,8 @@  discard block
 block discarded – undo
73 73
      * @return string
74 74
      */
75 75
     public function getQRCodeGoogleUrl($name, $secret) {
76
-        $urlencoded = urlencode('otpauth://totp/' . $name . '?secret=' . $secret . '');
77
-        return 'https://chart.googleapis.com/chart?chs=200x200&chld=M|0&cht=qr&chl=' . $urlencoded . '';
76
+        $urlencoded = urlencode('otpauth://totp/'.$name.'?secret='.$secret.'');
77
+        return 'https://chart.googleapis.com/chart?chs=200x200&chld=M|0&cht=qr&chl='.$urlencoded.'';
78 78
     }
79 79
 
80 80
     /**
Please login to merge, or discard this patch.
views/life/admins.php 2 patches
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,14 +7,18 @@  discard block
 block discarded – undo
7 7
     $sql = "SELECT `uid` FROM `players` WHERE `uid` LIKE '" . $search . "' OR `name` LIKE '%" . $search . "%' OR `playerid` LIKE '" . $search . "';";
8 8
     $result_of_query = $db_link->query($sql);
9 9
     $total_records = mysqli_num_rows($result_of_query);
10
-    if ($pageNum > $total_records) $pageNum = $total_records;
10
+    if ($pageNum > $total_records) {
11
+        $pageNum = $total_records;
12
+    }
11 13
     $sql = "SELECT `playerid`,`name`,`bankacc`,`cash`,`coplevel`,`mediclevel`,`adminlevel`,`uid` FROM `players` WHERE `uid` LIKE '" . $search . "' OR `name` LIKE '%" . $search . "%' OR `playerid` LIKE '" . $search . "'" . $max . " ;";
12 14
     logAction($_SESSION['user_name'], $lang['searched'] . ' (' . $search . ') ' . $lang['in'] . ' ' . $lang['players'], 1);
13 15
 } else {
14 16
     $sql = "SELECT `uid` FROM `players`;";
15 17
     $result_of_query = $db_link->query($sql);
16 18
     $total_records = mysqli_num_rows($result_of_query);
17
-    if ($pageNum > $total_records) $pageNum = $total_records;
19
+    if ($pageNum > $total_records) {
20
+        $pageNum = $total_records;
21
+    }
18 22
     $sql = "SELECT `playerid`,`name`,`bankacc`,`cash`,`coplevel`,`mediclevel`,`adminlevel`,`uid` FROM `players` " . $max . " ;";
19 23
 }
20 24
 
@@ -107,4 +111,6 @@  discard block
 block discarded – undo
107 111
                 ?>
108 112
         </div>
109 113
 <?php
110
-} else echo '<h3>' . errorMessage(36, $lang) . '</h3>';
114
+} else {
115
+    echo '<h3>' . errorMessage(36, $lang) . '</h3>';
116
+}
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@  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
-    $sql = "SELECT `uid` FROM `players` WHERE `uid` LIKE '" . $search . "' OR `name` LIKE '%" . $search . "%' OR `playerid` LIKE '" . $search . "' AND `adminlevel` >= '1' ORDER BY `adminlevel` DESC;";
7
+    $sql = "SELECT `uid` FROM `players` WHERE `uid` LIKE '".$search."' OR `name` LIKE '%".$search."%' OR `playerid` LIKE '".$search."' AND `adminlevel` >= '1' ORDER BY `adminlevel` 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`,`adminlevel`,`playerid`,`uid` FROM `players` WHERE `uid` LIKE '" . $search . "' OR `name` LIKE '%" . $search . "%' OR `playerid` LIKE '" . $search . "' AND `adminlevel` >= '1' ORDER BY `adminlevel` DESC " . $max . "  ;";
12
-    logAction($_SESSION['user_name'], $lang['searched'] . ' (' . $search . ') ' . $lang['in'] . ' ' . $lang['players'], 1);
11
+    $sql = "SELECT `name`,`adminlevel`,`playerid`,`uid` FROM `players` WHERE `uid` LIKE '".$search."' OR `name` LIKE '%".$search."%' OR `playerid` LIKE '".$search."' AND `adminlevel` >= '1' ORDER BY `adminlevel` 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 `adminlevel` >= '1' ORDER BY `adminlevel` DESC;";
15 15
     $result_of_query = $db_link->query($sql);
16 16
     $total_records = mysqli_num_rows($result_of_query);
17 17
     if ($pageNum > $total_records) $pageNum = $total_records;
18
-    $sql = "SELECT `name`,`adminlevel`,`playerid`,`uid` FROM `players` WHERE `adminlevel` >= '1' ORDER BY `adminlevel` DESC " . $max . " ;";
18
+    $sql = "SELECT `name`,`adminlevel`,`playerid`,`uid` FROM `players` WHERE `adminlevel` >= '1' ORDER BY `adminlevel` DESC ".$max." ;";
19 19
 }
20 20
 
21 21
 $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["adminlevel"] . "</td>";
66
+                echo "<td>".$row["name"]."</td>";
67
+                echo "<td>".$row["playerid"]."</td>";
68
+                echo "<td class='hidden-xs'>".$row["adminlevel"]."</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.