Completed
Push — master ( 993538...3d5db6 )
by Sam
02:07
created
views/steam/dashboard.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 								</div>
42 42
 							</div>
43 43
 						</li>
44
-			<?php }elseif ($row['type'] == 'waste') { ?>
44
+			<?php } elseif ($row['type'] == 'waste') { ?>
45 45
 						<li class="list-danger">
46 46
 							<i class=" fa fa-ellipsis-v"></i>
47 47
 							<div class="task-title">
Please login to merge, or discard this patch.
views/steam/life/dashboard.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -272,7 +272,8 @@  discard block
 block discarded – undo
272 272
                                     </tbody>
273 273
                                 </table>
274 274
                                 <?php echo '<a class="fa fa-caret-right fa-2x" style="float: right; padding-right:15px;" href="' . $settings['url'] . 'houses/' . $player->playerid . '"> More</a>';
275
-                            } else echo $lang['noHouse'] ?>
275
+                            } else {
276
+                                echo $lang['noHouse'] ?>
276 277
                         </div>
277 278
                     </div>
278 279
                 <?php } if ($player->playerid == $_SESSION['playerid']) { ?>
@@ -281,6 +282,7 @@  discard block
 block discarded – undo
281 282
                         <?php
282 283
                             $sql = "SELECT `classname`,`type`,`id`,`plate` FROM `vehicles` WHERE `pid` = '" . $player->playerid . "' ORDER BY `id` DESC LIMIT 8";
283 284
                             }
285
+                            }
284 286
                             $result_of_query = $db_link->query($sql);
285 287
                             if ($result_of_query->num_rows > 0) {
286 288
                                 $veh = $result_of_query->fetch_object();
Please login to merge, or discard this patch.
views/core/servers.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 								</div>
31 31
 							</div>
32 32
 						</li>
33
-					<?php }elseif ($row['type'] == 'waste') { ?>
33
+					<?php } elseif ($row['type'] == 'waste') { ?>
34 34
 						<li class="list-danger">
35 35
 							<i class=" fa fa-ellipsis-v"></i>
36 36
 							<div class="task-title">
Please login to merge, or discard this patch.
views/core/dashboard.php 1 patch
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,10 @@
 block discarded – undo
5 5
         </h1>
6 6
     </div>
7 7
 </div>
8
-<?php if (isset($_SESSION['update'])) echo '<div class="alert alert-info" role="alert">' . $land['updateMessage'] . ' (' . $_SESSION['message']->version . ')</div>'; ?>
8
+<?php if (isset($_SESSION['update'])) {
9
+    echo '<div class="alert alert-info" role="alert">' . $land['updateMessage'] . ' (' . $_SESSION['message']->version . ')</div>';
10
+}
11
+?>
9 12
 
10 13
 <div class="row mt mb">
11 14
   <div class="col-md-12">
Please login to merge, or discard this patch.
views/core/2factor.php 1 patch
Braces   +28 added lines, -10 removed lines patch added patch discarded remove patch
@@ -32,7 +32,9 @@  discard block
 block discarded – undo
32 32
     setcookie('token', '', time() - 3600, '/');
33 33
     message($lang['2factorDeviceRevoke']);
34 34
 } elseif (isset($_GET['revokeToken']) && $_SESSION['2factor'] == 2) {
35
-    if (isset($_COOKIE['token'])) unset($_COOKIE['token']);
35
+    if (isset($_COOKIE['token'])) {
36
+        unset($_COOKIE['token']);
37
+    }
36 38
     $sql = "UPDATE `users` SET `token`='NULL' WHERE `user_id` = '" . $_SESSION['user_id'] . "';";
37 39
     $db_connection->query($sql);
38 40
     message($lang['2factorTokenRevoke']);
@@ -42,8 +44,10 @@  discard block
 block discarded – undo
42 44
     $db_connection->query($sql);
43 45
     $_SESSION['2factor'] = 2;
44 46
     message($lang['2factor1']);
45
-    } else message($lang['2factor2']);
46
-} ?>
47
+    } else {
48
+        message($lang['2factor2']);
49
+    }
50
+    } ?>
47 51
 <div class="row">
48 52
     <div class="col-lg-8">
49 53
         <h1 class="page-header">
@@ -53,7 +57,9 @@  discard block
 block discarded – undo
53 57
 </div>
54 58
 <?php
55 59
 if ($_SESSION['2factor'] == 1 || $_SESSION['2factor'] == 5 || $_SESSION['2factor'] == 3) {
56
-    if ($_SESSION['2factor'] == 3) message($lang['2factorError2']);
60
+    if ($_SESSION['2factor'] == 3) {
61
+        message($lang['2factorError2']);
62
+    }
57 63
     echo '<form method="post" action="' . $currentPage . '" class="form-inline">
58 64
   <label for="code">'.$lang['2factorSetup3'] . '<div class="form-group"></label><input class="form-control" id="code" type="text" name="code"></div>
59 65
   <button type="submit" class="btn btn-default">Verify</button></form>';
@@ -61,12 +67,21 @@  discard block
 block discarded – undo
61 67
     echo $lang['2factor1'] . '<br><br><a href="?backup" class="btn btn-default">';
62 68
     $sql = "SELECT `backup`,`token` FROM `users` WHERE `user_id` = '" . $_SESSION['user_id'] . "';";
63 69
     $twoFactor = $db_connection->query($sql)->fetch_object();
64
-    if (isset($twoFactor->backup)) echo $lang['new'] . ' ' . $lang['2factor3']; else echo $lang['2factor3'];
70
+    if (isset($twoFactor->backup)) {
71
+        echo $lang['new'] . ' ' . $lang['2factor3'];
72
+    } else {
73
+        echo $lang['2factor3'];
74
+    }
65 75
     echo '</a>';
66 76
     echo '<a href="?revoke" style="margin-left: 5px;" class="btn btn-danger">' . $lang['2factor4'] . '</a>';
67
-    if (isset($twoFactor->token)) echo '<a href="?revokeToken" style="margin-left: 5px;" class="btn btn-danger">' . $lang['2factorTokenRevoke'] . '</a>';
68
-    if (isset($_COOKIE['token'])) echo '<a href="?revokeDevice" style="margin-left: 5px;" class="btn btn-danger">' . $lang['2factorRevokeRememberDevice'];
69
-    else echo '<a href="?remember" style="margin-left: 5px;" class="btn btn-primary">' . $lang['2factorRememberDevice'];
77
+    if (isset($twoFactor->token)) {
78
+        echo '<a href="?revokeToken" style="margin-left: 5px;" class="btn btn-danger">' . $lang['2factorTokenRevoke'] . '</a>';
79
+    }
80
+    if (isset($_COOKIE['token'])) {
81
+        echo '<a href="?revokeDevice" style="margin-left: 5px;" class="btn btn-danger">' . $lang['2factorRevokeRememberDevice'];
82
+    } else {
83
+        echo '<a href="?remember" style="margin-left: 5px;" class="btn btn-primary">' . $lang['2factorRememberDevice'];
84
+    }
70 85
     echo '</a>';
71 86
 
72 87
 } elseif ($_SESSION['2factor'] == 0 || $_SESSION['2factor'] == 5) {
@@ -76,8 +91,11 @@  discard block
 block discarded – undo
76 91
         echo "<i class='fa fa-info-circle'></i> " . $lang['2factorForce'] . "</div></div>";
77 92
     }
78 93
     $secret = $gauth->createSecret();
79
-    if (isset($settings['communityName'])) $name = urlencode(str_replace(' ', '', $settings['communityName']) . "CyberWorks");
80
-    else $name = 'CyberWorks';
94
+    if (isset($settings['communityName'])) {
95
+        $name = urlencode(str_replace(' ', '', $settings['communityName']) . "CyberWorks");
96
+    } else {
97
+        $name = 'CyberWorks';
98
+    }
81 99
     echo '<div class="col-md-6">' . $lang['2factorSetup1'] . '<br>' . $lang['2factorSetup2'] . ' <b>' . $secret . '</b><br><form method="post" action="2factor" class="form-inline">
82 100
   <label for="testCode">'.$lang['2factorSetup3'] . '<div class="form-group"></label><input style="margin-left: 5px;" class="form-control" id="testCode" type="text" name="testCode"></div>
83 101
   <input type="hidden" id="secret" name="secret" value="'.$secret . '"><button type="submit" class="btn btn-default">Verify</button>
Please login to merge, or discard this patch.
views/core/editServer.php 1 patch
Braces   +13 added lines, -5 removed lines patch added patch discarded remove patch
@@ -6,8 +6,7 @@  discard block
 block discarded – undo
6 6
     $sql = "DELETE FROM `servers` WHERE `dbid`='" . $id . "';";
7 7
     $result_of_query = $db_connection->query($sql);
8 8
 
9
-}
10
-elseif (isset($_POST['edit'])) {
9
+} elseif (isset($_POST['edit'])) {
11 10
     if (isset($_POST['sql_host'])) {
12 11
         if ($_SESSION['permissions']['super_admin']) {
13 12
             if (formtoken::validateToken($_POST)) {
@@ -32,8 +31,12 @@  discard block
 block discarded – undo
32 31
                     $sql = "UPDATE `servers` SET `name`= '" . $name . "',`type`= '" . $type . "',`use_sq`= '" . $usegsq . "' WHERE `dbid`='" . $id . "';";
33 32
                 }
34 33
                 $result_of_query = $db_connection->query($sql);
35
-            } else message($lang['expired']);
36
-        } else logAction($_SESSION['user_name'], $lang['failedUpdate'] . ' ' . $lang['gsq'], 3);
34
+            } else {
35
+                message($lang['expired']);
36
+            }
37
+        } else {
38
+            logAction($_SESSION['user_name'], $lang['failedUpdate'] . ' ' . $lang['gsq'], 3);
39
+        }
37 40
     }
38 41
 }
39 42
     $sql = "SELECT * FROM `servers` WHERE `dbid`='" . $id . "';";
@@ -116,7 +119,12 @@  discard block
 block discarded – undo
116 119
 
117 120
 <script>
118 121
 $(document).ready(function() {
119
-if (<?php if ($server->usegsq == 1) echo 'false'; else echo 'true'; ?>) {
122
+if (<?php if ($server->usegsq == 1) {
123
+    echo 'false';
124
+} else {
125
+    echo 'true';
126
+}
127
+?>) {
120 128
     $("#sq_details").hide();
121 129
 };
122 130
 $("#usegsq").change(function () {
Please login to merge, or discard this patch.
views/core/pluginstore.php 1 patch
Braces   +16 added lines, -8 removed lines patch added patch discarded remove patch
@@ -117,24 +117,32 @@
 block discarded – undo
117 117
         }
118 118
 
119 119
         $dropIn = array_diff($files, array_column($plugins, 'dirname'));
120
-        if ($dropIn > 0) echo "<h2 style='margin-top: 0;'>" . $lang['dropIn'] . "</h2>";
120
+        if ($dropIn > 0) {
121
+            echo "<h2 style='margin-top: 0;'>" . $lang['dropIn'] . "</h2>";
122
+        }
121 123
         
122 124
         foreach ($dropIn as &$plugin) {
123 125
             $key = array_search($plugin, array_column($installed, 'dirname'));
124 126
             echo '<div class="col-sm-6 col-md-4"><div class="thumbnail"><div class="caption">';
125 127
             echo '<h3>' . $installed[$key]['name'] . ' - ' . $installed[$key]['version'];
126 128
 
127
-            if (in_array($plugin, $settings['plugins']))
128
-            echo '<small style="padding-left: 6px;"><span class="label label-success">' . $lang['active'] . '</span></small>';
129
-            else echo '<small style="padding-left: 6px;"><span class="label label-default">' . $lang['installed'] . '</span></small>';
129
+            if (in_array($plugin, $settings['plugins'])) {
130
+                        echo '<small style="padding-left: 6px;"><span class="label label-success">' . $lang['active'] . '</span></small>';
131
+            } else {
132
+                echo '<small style="padding-left: 6px;"><span class="label label-default">' . $lang['installed'] . '</span></small>';
133
+            }
130 134
 
131 135
             echo '</h3><p><strong>' . $installed[$key]['author'] . '</strong> - ' . $installed[$key]['description'] . '</p>';
132 136
 
133
-            if (in_array($plugin, $settings['plugins']))
134
-            echo '<p><a href="?deactivate=' . $plugin . '" class="btn btn-primary" role="button">' . $lang['deactivate'] . '</a>';
135
-            else echo '<p><a href="?activate=' . $plugin . '" class="btn btn-primary" role="button">' . $lang['activate'] . '</a>';
137
+            if (in_array($plugin, $settings['plugins'])) {
138
+                        echo '<p><a href="?deactivate=' . $plugin . '" class="btn btn-primary" role="button">' . $lang['deactivate'] . '</a>';
139
+            } else {
140
+                echo '<p><a href="?activate=' . $plugin . '" class="btn btn-primary" role="button">' . $lang['activate'] . '</a>';
141
+            }
136 142
 
137
-            if (isset($installed[$key]['authurl'])) echo '<a style="margin-left: 5px;" href="' . $installed[$key]['authurl'] . '" class="btn btn-default" role="button">' . $lang['visitSite'] . '</a>';
143
+            if (isset($installed[$key]['authurl'])) {
144
+                echo '<a style="margin-left: 5px;" href="' . $installed[$key]['authurl'] . '" class="btn btn-default" role="button">' . $lang['visitSite'] . '</a>';
145
+            }
138 146
             echo '<a style="float: right;" href="?delete=' . $plugin . '" class="btn btn-danger" role="button">' . $lang['delete'] . '</a>';
139 147
             echo '</p></div></div></div>';
140 148
         }
Please login to merge, or discard this patch.
views/core/newServer.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,8 @@  discard block
 block discarded – undo
75 75
                     <input placeholder="SQ IP" id="server_SQ_host"
76 76
                        class=" form-control login_input" type="text"
77 77
                        name="server_SQ_host"
78
-                        <?php if (isset($_POST['server_SQ_host'])) echo 'value="' . $_POST['server_SQ_host'] . '"' ?> autocorrect="off" autocapitalize="off">
78
+                        <?php if (isset($_POST['server_SQ_host'])) {
79
+    echo 'value="' . $_POST['server_SQ_host'] . '"' ?> autocorrect="off" autocapitalize="off">
79 80
                     </div>
80 81
                     <div class="form-group">
81 82
                         <label for="server_SQ_port">SQ port: </label>
@@ -93,6 +94,7 @@  discard block
 block discarded – undo
93 94
                             <?php
94 95
                 $sql = "SELECT `dbid`,`sql_name` FROM `db`;";
95 96
 }
97
+}
96 98
                 $result_of_query = $db_connection->query($sql);
97 99
                 if ($result_of_query->num_rows >= 1) {
98 100
                     echo '<div class="form-group"><label for="server_dbid">Database: </label>';
Please login to merge, or discard this patch.
views/core/profile.php 1 patch
Braces   +7 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,7 +103,10 @@  discard block
 block discarded – undo
103 103
                     invalid: 'fa fa-times',
104 104
                     validating: 'fa fa-refresh'
105 105
                 },
106
-                locale: '<?php if (isset($_SESSION['forum_lang'])) echo $_SESSION['forum_lang']; else echo 'en_US' ?>',
106
+                locale: '<?php if (isset($_SESSION['forum_lang'])) {
107
+    echo $_SESSION['forum_lang'];
108
+} else {
109
+    echo 'en_US' ?>',
107 110
                 fields: {
108 111
                     email: {
109 112
                         validators: {
@@ -131,7 +134,9 @@  discard block
 block discarded – undo
131 134
                                 regexp: /^\d{15,25}$/
132 135
                             },
133 136
                             remote: {
134
-                                url: '<?php echo $settings['url']; ?>validators/pid.php',
137
+                                url: '<?php echo $settings['url'];
138
+}
139
+?>validators/pid.php',
135 140
                                 type: 'POST',
136 141
                                 message: '<?php echo $lang['failPID'] ?>'
137 142
                             }
Please login to merge, or discard this patch.