Completed
Push — master ( db7c0d...0a19bb )
by
unknown
02:53
created
views/templates/template.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
                 <?php if (!isset($_SESSION['profile_link'])) {
27 27
                     if (isset($_SESSION['user_email']) && $settings['gravatar']) {
28 28
                         echo '<a href="' . $settings['url'] . 'profile">';
29
-                        echo '<img src="' . get_gravatar($_SESSION['user_email'],64,'retro') . '" class="img-circle" width="60" height="60"></a></p>';
29
+                        echo '<img src="' . get_gravatar($_SESSION['user_email'], 64, 'retro') . '" class="img-circle" width="60" height="60"></a></p>';
30 30
                     } else {
31 31
                         echo '<a href="' . $settings['url'] . 'profile">';
32 32
                         echo '<img src="' . $settings['url'] . 'assets/img/profile/' . $_SESSION['user_profile'] . '.jpg"';
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
             </li>
53 53
 
54 54
 			<?php
55
-                if(isset($_SESSION['server_type']))
55
+                if (isset($_SESSION['server_type']))
56 56
                 {
57
-                    switch($_SESSION['server_type'])
57
+                    switch ($_SESSION['server_type'])
58 58
                     {
59 59
                         case 'life':
60 60
                             include("views/life/nav.php");
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
                 }
63 63
 
64 64
                 foreach ($settings['plugins'] as &$plugin) {
65
-                    if (file_exists("plugins/". $plugin. "/nav.php")) {
66
-                        include("plugins/". $plugin."/nav.php");
65
+                    if (file_exists("plugins/" . $plugin . "/nav.php")) {
66
+                        include("plugins/" . $plugin . "/nav.php");
67 67
                     }
68 68
                 }
69 69
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,9 @@
 block discarded – undo
40 40
                 ?>
41 41
             <h5 class="centered">
42 42
                 <?php
43
-                if ($_SESSION['steamsignon']) echo '<i class="fa fa-steam-square"></i>';
43
+                if ($_SESSION['steamsignon']) {
44
+                    echo '<i class="fa fa-steam-square"></i>';
45
+                }
44 46
                 echo $_SESSION['user_name']; ?>
45 47
             </h5>
46 48
 
Please login to merge, or discard this patch.
views/templates/scripts.php 1 patch
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,10 @@
 block discarded – undo
77 77
     </div>
78 78
 </div>
79 79
 <script async src="<?php echo $settings['url'] ?>assets/js/main.min.js"></script>
80
-<?php if (isset($_SESSION['forum_lang'])) echo '<script async type="text/javascript" src="' . $settings["url"] . 'assets/js/language/' . $_SESSION['forum_lang'] . '.js"></script>'; ?>
80
+<?php if (isset($_SESSION['forum_lang'])) {
81
+    echo '<script async type="text/javascript" src="' . $settings["url"] . 'assets/js/language/' . $_SESSION['forum_lang'] . '.js"></script>';
82
+}
83
+?>
81 84
 <script>
82 85
     function searchpage() {
83 86
         sn = document.getElementById('searchText').value;
Please login to merge, or discard this patch.
views/templates/search.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,9 +15,9 @@
 block discarded – undo
15 15
     <select style="margin-right:15px;" onchange="if (this.value) window.location.href='?items='+this.value" id='items' class="form-control" name='items'>
16 16
         <?php
17 17
         foreach ($settings['item'] as $item) {
18
-            echo '<option value="'.$item.'"';
18
+            echo '<option value="' . $item . '"';
19 19
             if ($item == $_SESSION['items']) echo ' selected';
20
-            echo '>'.$item.'</option>';
20
+            echo '>' . $item . '</option>';
21 21
         }
22 22
         ?>
23 23
     </select>
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,14 +9,18 @@
 block discarded – undo
9 9
 <div class="form-inline pull-right-md">
10 10
     <form name='rows' method="post" action="<?php echo $settings['url'] . $currentPage ?>">
11 11
 
12
-            <input id='searchText' class="form-control" type='text' name='searchText' placeholder="<?php if (isset($search)) echo $search ?>">
12
+            <input id='searchText' class="form-control" type='text' name='searchText' placeholder="<?php if (isset($search)) {
13
+    echo $search ?>">
13 14
             <input style='margin-right: 10px;' class='btn btn-primary' type='button' name='search' onclick='searchpage();' value='<?php echo $lang['search'] ?>'>
14 15
     </form>
15 16
     <select style="margin-right:15px;" onchange="if (this.value) window.location.href='?items='+this.value" id='items' class="form-control" name='items'>
16 17
         <?php
17 18
         foreach ($settings['item'] as $item) {
18 19
             echo '<option value="'.$item.'"';
19
-            if ($item == $_SESSION['items']) echo ' selected';
20
+}
21
+            if ($item == $_SESSION['items']) {
22
+                echo ' selected';
23
+            }
20 24
             echo '>'.$item.'</option>';
21 25
         }
22 26
         ?>
Please login to merge, or discard this patch.
views/life/dashboard.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 $db_link = serverConnect();
3 3
 
4 4
 if ($db_link->connect_error) {
5
-    echo '<h1>'.$lang['dbError'].'</h1>';
5
+    echo '<h1>' . $lang['dbError'] . '</h1>';
6 6
     unset($_SESSION['server_type']);
7 7
     unset($_SESSION['dbid']);
8 8
 } else {
Please login to merge, or discard this patch.
Braces   +8 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,10 @@  discard block
 block discarded – undo
16 16
                     </h1>
17 17
                 </div>
18 18
             </div>
19
-            <?php if (isset($_SESSION['update'])) echo '<div class="alert alert-info" role="alert">' . $land['updateMessage'] . ' (' . $_SESSION['message']->version . ') <a href="https://github.com/Cyberbyte-Studios/CyberWorks/releases">Download Section</a</div>'; ?>
19
+            <?php if (isset($_SESSION['update'])) {
20
+    echo '<div class="alert alert-info" role="alert">' . $land['updateMessage'] . ' (' . $_SESSION['message']->version . ') <a href="https://github.com/Cyberbyte-Studios/CyberWorks/releases">Download Section</a</div>';
21
+}
22
+?>
20 23
             <div class="row">
21 24
                 <div class="col-lg-4">
22 25
                     <div class="content-panel">
@@ -177,7 +180,10 @@  discard block
 block discarded – undo
177 180
                     </h1>
178 181
                 </div>
179 182
             </div>
180
-            <?php if (isset($_SESSION['update'])) echo '<div class="alert alert-info" role="alert">' . $land['updateMessage'] . ' (' . $_SESSION['message']->version . ') <a href="https://github.com/Cyberbyte-Studios/CyberWorks/releases">Download Section</a</div>'; ?>
183
+            <?php if (isset($_SESSION['update'])) {
184
+    echo '<div class="alert alert-info" role="alert">' . $land['updateMessage'] . ' (' . $_SESSION['message']->version . ') <a href="https://github.com/Cyberbyte-Studios/CyberWorks/releases">Download Section</a</div>';
185
+}
186
+?>
181 187
             <div class="row">
182 188
                 <div class="col-lg-3 col-md-4 col-lg-offset-1">
183 189
                     <div class="panel panel-success">
Please login to merge, or discard this patch.
views/life/gangs.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,20 +16,26 @@  discard block
 block discarded – undo
16 16
         $sql = "SELECT `id`,`name`,`owner`,`bank`,`members`,`maxmembers`,`active` FROM `gangs` WHERE `owner` IN ( " . $samepID . " ) OR `name` LIKE '%" . $search . "%' OR `id` = '" . $search . "' OR `owner` LIKE '" . $search . "' OR `members` LIKE '%" . $search . "%' ;";
17 17
         $result_of_query = $db_link->query($sql);
18 18
         $total_records = mysqli_num_rows($result_of_query);
19
-        if ($pageNum > $total_records) $pageNum = $total_records;
19
+        if ($pageNum > $total_records) {
20
+            $pageNum = $total_records;
21
+        }
20 22
         $sql = "SELECT `id`,`name`,`owner`,`bank`,`members`,`maxmembers`,`active` FROM `gangs` WHERE `owner` IN ( " . $samepID . " ) OR `name` LIKE '%" . $search . "%' OR `id` = '" . $search . "' OR `owner` LIKE '" . $search . "' OR `members` LIKE '%" . $search . "%' " . $max . " ;";
21 23
     } else {
22 24
         $sql = "SELECT `id` FROM `gangs` WHERE `name` LIKE '%" . $search . "%'  OR `id` = '" . $search . "' OR `owner` LIKE '" . $search . "' OR `members` LIKE '%" . $search . "%' ;";
23 25
         $result_of_query = $db_link->query($sql);
24 26
         $total_records = mysqli_num_rows($result_of_query);
25
-        if ($pageNum > $total_records) $pageNum = $total_records;
27
+        if ($pageNum > $total_records) {
28
+            $pageNum = $total_records;
29
+        }
26 30
         $sql = "SELECT `id`,`name`,`owner`,`bank`,`members`,`maxmembers`,`active` FROM `gangs` WHERE `name` LIKE '%" . $search . "%' OR `id` = '" . $search . "' OR `owner` LIKE '" . $search . "' OR `members` LIKE '%" . $search . "%' " . $max . " ;";
27 31
     }
28 32
 } else {
29 33
     $sql = "SELECT `id` FROM `gangs`;";
30 34
     $result_of_query = $db_link->query($sql);
31 35
     $total_records = mysqli_num_rows($result_of_query);
32
-    if ($pageNum > $total_records) $pageNum = $total_records;
36
+    if ($pageNum > $total_records) {
37
+        $pageNum = $total_records;
38
+    }
33 39
     $sql = "SELECT `id`,`name`,`owner`,`bank`,`members`,`maxmembers`,`active` FROM `gangs` " . $max . " ;";
34 40
 }
35 41
 $result_of_query = $db_link->query($sql);
@@ -100,4 +106,6 @@  discard block
 block discarded – undo
100 106
 </div>
101 107
 
102 108
 <?php
103
-} else echo errorMessage(3, $lang);
104 109
\ No newline at end of file
110
+} else {
111
+    echo errorMessage(3, $lang);
112
+}
Please login to merge, or discard this patch.
views/life/notes.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,7 +89,8 @@  discard block
 block discarded – undo
89 89
             </div>
90 90
             <div class="col-md-3 pull-right">
91 91
                 <form style="float:right;" name='search'>
92
-                    <input id='searchText' type='text' name='searchText' placeholder="<?php if (isset($search)) echo $search ?>">
92
+                    <input id='searchText' type='text' name='searchText' placeholder="<?php if (isset($search)) {
93
+    echo $search ?>">
93 94
                     <input class='btn btn-sm btn-primary' type='button' name='search'
94 95
                            onclick='searchpage();' value='<?php echo $lang['search'] ?>'>
95 96
                 </form>
@@ -99,7 +100,9 @@  discard block
 block discarded – undo
99 100
         <table class="table table-striped table-advance table-hover">
100 101
             <thead>
101 102
             <tr>
102
-                <th><i class="fa fa-eye"></i> <?php echo $lang['owner']; ?></th>
103
+                <th><i class="fa fa-eye"></i> <?php echo $lang['owner'];
104
+}
105
+?></th>
103 106
                 <th><i class="fa fa-car"></i> <?php echo $lang['class']; ?></th>
104 107
                 <th class="hidden-xs"><i class="fa fa-car"></i> <?php echo $lang['type']; ?></th>
105 108
                 <th class="hidden-xs"><i class="fa fa-car"></i> <?php echo $lang['plate']; ?></th>
Please login to merge, or discard this patch.
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   +13 added lines, -6 removed lines patch added patch discarded remove patch
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
                             logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 1);
240 240
                             $page = "views/life/admins.php";
241 241
                         }
242
-                    }  elseif ($currentPage == 'police') {
242
+                    } elseif ($currentPage == 'police') {
243 243
                         if ($_SESSION['permissions']['view']['player']) {
244 244
                             if ($query) {
245 245
                                 $search = $url['path'][$settings['base'] + 1];
@@ -522,15 +522,20 @@  discard block
 block discarded – undo
522 522
             if ($settings['2factor']) {
523 523
                 if ($_SESSION['2factor'] == 0) {
524 524
                 if ($settings['force2factor'] == 'steam') {
525
-                    if (!$_SESSION['steamsignon']) $_SESSION['2factor'] == 5;
526
-                } elseif ($settings['force2factor'] == 'all') $_SESSION['2factor'] == 5;
525
+                    if (!$_SESSION['steamsignon']) {
526
+                        $_SESSION['2factor'] == 5;
527
+                    }
528
+                } elseif ($settings['force2factor'] == 'all') {
529
+                    $_SESSION['2factor'] == 5;
530
+                }
527 531
                     $page = 'views/core/2factor.php';
528 532
                 } elseif ($_SESSION['2factor'] == 1 || $_SESSION['2factor'] == 3) {
529 533
                 if (isset($_POST['code'])) {
530 534
                     $sql = "SELECT `twoFactor` FROM `users` WHERE `user_id` = '" . $_SESSION['user_id'] . "';";
531 535
                     $user = $db_connection->query($sql)->fetch_object();
532
-                    if ($gauth->verifyCode($user->twoFactor, $_POST['code'])) $_SESSION['2factor'] = 2;
533
-                    else {
536
+                    if ($gauth->verifyCode($user->twoFactor, $_POST['code'])) {
537
+                        $_SESSION['2factor'] = 2;
538
+                    } else {
534 539
                     $sql = "SELECT `backup` FROM `users` WHERE `user_id` = '" . $_SESSION['user_id'] . "';";
535 540
                     $user = $db_connection->query($sql)->fetch_object();
536 541
                     if ($user->backup == $_POST['code']) {
@@ -540,7 +545,9 @@  discard block
 block discarded – undo
540 545
                         $page = 'views/core/2factor.php';
541 546
                     }
542 547
                     }
543
-                } else $page = 'views/core/2factor.php';
548
+                } else {
549
+                    $page = 'views/core/2factor.php';
550
+                }
544 551
                 }
545 552
             }
546 553
 
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.