Completed
Push — master ( f0fa16...974b86 )
by
unknown
03:03
created
views/templates/page.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,9 +13,15 @@  discard block
 block discarded – undo
13 13
     if ($total_pages > 5) {
14 14
         $start = $pageNum - 2;
15 15
         $end = $pageNum + 2;
16
-        if ($pageNum < 4) $start = 1;
17
-        if ($pageNum < 2) $end += 1;
18
-        if ($pageNum < 3) $end += 1;
16
+        if ($pageNum < 4) {
17
+            $start = 1;
18
+        }
19
+        if ($pageNum < 2) {
20
+            $end += 1;
21
+        }
22
+        if ($pageNum < 3) {
23
+            $end += 1;
24
+        }
19 25
         
20 26
         if ($pageNum > $total_pages - 2) {$start -= 1; $end -= 1; }
21 27
         if ($pageNum > $total_pages - 1) {$start -= 1; $end -= 1; }
@@ -26,7 +32,9 @@  discard block
 block discarded – undo
26 32
     
27 33
     for ($i = $start; $i <= $end; $i++) {
28 34
         echo '<li';
29
-        if ($i == $pageNum) echo  ' class="active"';
35
+        if ($i == $pageNum) {
36
+            echo  ' class="active"';
37
+        }
30 38
         echo '><a href="?page=' . $i . '">' . $i . '</a></li>';
31 39
     }; ?>
32 40
 
Please login to merge, or discard this patch.
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   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,10 @@
 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">
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/medics.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 						</ul>
72 72
 					</div>
73 73
 					<?php
74
-                    echo "<a class='btn btn-primary' href='" . $settings['url'] . "medic/".$total_pages."'>" . $lang['last'] . "</a></center>";
74
+                    echo "<a class='btn btn-primary' href='" . $settings['url'] . "medic/" . $total_pages . "'>" . $lang['last'] . "</a></center>";
75 75
                 } ?>
76 76
                 <br>
77 77
                 </tbody>
@@ -79,5 +79,5 @@  discard block
 block discarded – undo
79 79
         </div>
80 80
     </div>
81 81
 <?php } else {
82
-    echo '<h1>'.errorMessage(36,$lang).'</h1>';
82
+    echo '<h1>' . errorMessage(36, $lang) . '</h1>';
83 83
 }
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/life/police.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
 						</div>
75 75
 
76 76
 						<?php
77
-                        echo "<a class='btn btn-primary' href='" . $settings['url'] . "police/".$total_pages."'>" . $lang['last'] . "</a></center>";
77
+                        echo "<a class='btn btn-primary' href='" . $settings['url'] . "police/" . $total_pages . "'>" . $lang['last'] . "</a></center>";
78 78
                     }
79 79
                     ?>
80 80
                     <br>
Please login to merge, or discard this patch.