Completed
Push — master ( ffa6fa...3e8c65 )
by Sam
02:16
created
views/core/newUser.php 2 patches
Braces   +14 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,7 +22,10 @@  discard block
 block discarded – undo
22 22
                 <p><?php echo $lang['username'] ?>:</p>
23 23
                 <input id="user_name" type="text" class="form-control"
24 24
                        placeholder="<?php echo $lang['username'] ?>" autofocus
25
-                       name="user_name" <?php if (isset($_POST['user_name'])) echo 'value="' . $_POST['user_name'] . '"'; ?> required>
25
+                       name="user_name" <?php if (isset($_POST['user_name'])) {
26
+    echo 'value="' . $_POST['user_name'] . '"';
27
+}
28
+?> required>
26 29
             </div>
27 30
             <div class="form-group">
28 31
                 <p><?php echo $lang['player'] . " " . $lang['id'] ?>:</p>
@@ -32,7 +35,10 @@  discard block
 block discarded – undo
32 35
             <div class="form-group">
33 36
                 <p><?php echo $lang['emailAdd'] ?>:</p>
34 37
                 <input id="user_email" placeholder="<?php echo $lang['emailAdd'] ?>" class=" form-control" type="email"
35
-                       name="user_email" <?php if (isset($_POST['user_name'])) echo 'value="' . $_POST['user_name'] . '"'; ?> required/>
38
+                       name="user_email" <?php if (isset($_POST['user_name'])) {
39
+    echo 'value="' . $_POST['user_name'] . '"';
40
+}
41
+?> required/>
36 42
             </div>
37 43
             <div class="form-group">
38 44
                 <p><?php echo $lang['password'] ?>:</p>
@@ -52,7 +58,9 @@  discard block
 block discarded – undo
52 58
                 <select class="form-control" name="user_lvl">
53 59
                     <?php for ($rank = 1; $rank <= $settings['staffRanks']; $rank++) {
54 60
                         echo '<option value="' . $rank . '"';
55
-                        if (isset($_POST['user_lvl'])) if ($rank == $_POST['user_lvl']) echo 'selected';
61
+                        if (isset($_POST['user_lvl'])) {
62
+                            if ($rank == $_POST['user_lvl']) echo 'selected';
63
+                        }
56 64
                         echo '>' . $settings['ranks'][$rank] . '</option>';
57 65
                     } ?>
58 66
                 </select>
@@ -63,7 +71,9 @@  discard block
 block discarded – undo
63 71
                 <select class=" form-control" name="profile_pic">
64 72
                     <?php for ($icon = 1; $icon <= 6; $icon++) {
65 73
                         echo '<option value="' . $icon . '" ';
66
-                        if (isset($_POST['user_name'])) if ($icon == $_POST['user_name']) echo 'selected';
74
+                        if (isset($_POST['user_name'])) {
75
+                            if ($icon == $_POST['user_name']) echo 'selected';
76
+                        }
67 77
                         echo '>' . $settings['names'][$icon] . '</option>';
68 78
                     } ?>
69 79
                 </select>
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -22,17 +22,17 @@  discard block
 block discarded – undo
22 22
                 <p><?php echo $lang['username'] ?>:</p>
23 23
                 <input id="user_name" type="text" class="form-control"
24 24
                        placeholder="<?php echo $lang['username'] ?>" autofocus
25
-                       name="user_name" <?php if (isset($_POST['user_name'])) echo 'value="' . $_POST['user_name'] . '"'; ?> required>
25
+                       name="user_name" <?php if (isset($_POST['user_name'])) echo 'value="'.$_POST['user_name'].'"'; ?> required>
26 26
             </div>
27 27
             <div class="form-group">
28
-                <p><?php echo $lang['player'] . " " . $lang['id'] ?>:</p>
28
+                <p><?php echo $lang['player']." ".$lang['id'] ?>:</p>
29 29
                 <input id="player_id" class="form-control" placeholder="<?php echo $lang['playerID'] ?>" type="number" name="player_id">
30 30
                 <p id='steam'></p>
31 31
             </div>
32 32
             <div class="form-group">
33 33
                 <p><?php echo $lang['emailAdd'] ?>:</p>
34 34
                 <input id="user_email" placeholder="<?php echo $lang['emailAdd'] ?>" class=" form-control" type="email"
35
-                       name="user_email" <?php if (isset($_POST['user_name'])) echo 'value="' . $_POST['user_name'] . '"'; ?> required/>
35
+                       name="user_email" <?php if (isset($_POST['user_name'])) echo 'value="'.$_POST['user_name'].'"'; ?> required/>
36 36
             </div>
37 37
             <div class="form-group">
38 38
                 <p><?php echo $lang['password'] ?>:</p>
@@ -41,8 +41,8 @@  discard block
 block discarded – undo
41 41
                        name="user_password_new" required autocorrect="off" autocapitalize="off" autocomplete="off">
42 42
             </div>
43 43
             <div class="form-group">
44
-                <p><?php echo $lang['repeat'] . ' ' . $lang['password']?>:</p>
45
-                <input id="user_password_repeat" placeholder="<?php echo $lang['repeat'] . ' ' . $lang['password']?>" class=" form-control login_input"
44
+                <p><?php echo $lang['repeat'].' '.$lang['password']?>:</p>
45
+                <input id="user_password_repeat" placeholder="<?php echo $lang['repeat'].' '.$lang['password']?>" class=" form-control login_input"
46 46
                        type="password"
47 47
                        name="user_password_repeat" required autocorrect="off" autocapitalize="off" autocomplete="off">
48 48
             </div>
@@ -51,9 +51,9 @@  discard block
 block discarded – undo
51 51
                 <p><?php echo $lang['level'] ?>:</p>
52 52
                 <select class="form-control" name="user_lvl">
53 53
                     <?php for ($rank = 1; $rank <= $_SESSION['user_level']; $rank++) {
54
-                        echo '<option value="' . $rank . '"';
54
+                        echo '<option value="'.$rank.'"';
55 55
                         if (isset($_POST['user_lvl'])) if ($rank == $_POST['user_lvl']) echo 'selected';
56
-                        echo '>' . $settings['ranks'][$rank] . '</option>';
56
+                        echo '>'.$settings['ranks'][$rank].'</option>';
57 57
                     } ?>
58 58
                 </select>
59 59
             </div>
@@ -62,9 +62,9 @@  discard block
 block discarded – undo
62 62
                 <p><?php echo $lang['picture']?>:</p>
63 63
                 <select class=" form-control" name="profile_pic">
64 64
                     <?php for ($icon = 1; $icon <= 6; $icon++) {
65
-                        echo '<option value="' . $icon . '" ';
65
+                        echo '<option value="'.$icon.'" ';
66 66
                         if (isset($_POST['user_name'])) if ($icon == $_POST['user_name']) echo 'selected';
67
-                        echo '>' . $settings['names'][$icon] . '</option>';
67
+                        echo '>'.$settings['names'][$icon].'</option>';
68 68
                     } ?>
69 69
                 </select>
70 70
             </div>
Please login to merge, or discard this patch.
views/core/editServer.php 2 patches
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.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 $id = clean($id, "int");
3 3
 if (isset($_POST['del']) && $id != 1) {
4
-    $sql = "DELETE FROM `db` WHERE `dbid`='" . $id . "';";
4
+    $sql = "DELETE FROM `db` WHERE `dbid`='".$id."';";
5 5
     $result_of_query = $db_connection->query($sql);
6
-    $sql = "DELETE FROM `servers` WHERE `dbid`='" . $id . "';";
6
+    $sql = "DELETE FROM `servers` WHERE `dbid`='".$id."';";
7 7
     $result_of_query = $db_connection->query($sql);
8 8
 
9 9
 }
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
                 $pass = encrypt(clean($_POST['sql_pass'], "string"));
17 17
                 $name = encrypt(clean($_POST['sql_name'], "string"));
18 18
 
19
-                $sql = "UPDATE `db` SET `sql_host` = '" . $host . "',`sql_name` = '" . $name . "',`sql_pass` = '" . $pass . "',`sql_user` = '" . $user . "' WHERE `dbid`='" . $id . "';";
19
+                $sql = "UPDATE `db` SET `sql_host` = '".$host."',`sql_name` = '".$name."',`sql_pass` = '".$pass."',`sql_user` = '".$user."' WHERE `dbid`='".$id."';";
20 20
                 $result_of_query = $db_connection->query($sql);
21 21
 
22 22
                 $type = clean($_POST['type'], "string");
@@ -27,21 +27,21 @@  discard block
 block discarded – undo
27 27
                     $sq_ip = encrypt(clean($_POST['sq_ip'], "string"));
28 28
                     $sq_port = encrypt(clean($_POST['sq_port'], "string"));
29 29
                     $rcon_pass = encrypt(clean($_POST['rcon_pass'], "string"));
30
-                    $sql = "UPDATE `servers` SET `name`= '" . $name . "',`type`= '" . $type . "',`use_sq`= '" . $usegsq . "',`sq_port`= '" . $sq_port . "',`sq_ip`= '" . $sq_ip . "',`rcon_pass`= '" . $rcon_pass . "' WHERE `dbid`='" . $id . "';";
30
+                    $sql = "UPDATE `servers` SET `name`= '".$name."',`type`= '".$type."',`use_sq`= '".$usegsq."',`sq_port`= '".$sq_port."',`sq_ip`= '".$sq_ip."',`rcon_pass`= '".$rcon_pass."' WHERE `dbid`='".$id."';";
31 31
                 } else {
32
-                    $sql = "UPDATE `servers` SET `name`= '" . $name . "',`type`= '" . $type . "',`use_sq`= '" . $usegsq . "' WHERE `dbid`='" . $id . "';";
32
+                    $sql = "UPDATE `servers` SET `name`= '".$name."',`type`= '".$type."',`use_sq`= '".$usegsq."' WHERE `dbid`='".$id."';";
33 33
                 }
34 34
                 $result_of_query = $db_connection->query($sql);
35 35
             } else message($lang['expired']);
36
-        } else logAction($_SESSION['user_name'], $lang['failedUpdate'] . ' ' . $lang['gsq'], 3);
36
+        } else logAction($_SESSION['user_name'], $lang['failedUpdate'].' '.$lang['gsq'], 3);
37 37
     }
38 38
 }
39
-    $sql = "SELECT * FROM `servers` WHERE `dbid`='" . $id . "';";
39
+    $sql = "SELECT * FROM `servers` WHERE `dbid`='".$id."';";
40 40
     $result_of_query = $db_connection->query($sql);
41 41
 
42 42
     if ($result_of_query->num_rows == 1) {
43 43
         $server = $result_of_query->fetch_object();
44
-        $sql = "SELECT `sql_host`,`dbid`,`sql_name`,`sql_pass`,`sql_user` FROM `db` WHERE `dbid`='" . $id . "';";
44
+        $sql = "SELECT `sql_host`,`dbid`,`sql_name`,`sql_pass`,`sql_user` FROM `db` WHERE `dbid`='".$id."';";
45 45
         $result = $db_connection->query($sql);
46 46
         if ($result->num_rows == 1) {
47 47
             $db = $result->fetch_object();
@@ -59,45 +59,45 @@  discard block
 block discarded – undo
59 59
     <form method='post' action='<?php echo $settings['url'] ?>editServer/<?php echo $id ?>' id='updateServer' name='updateServer'>
60 60
         <div class="col-md-6">
61 61
             <?php
62
-            echo "<h3>" . $lang['database'] . "</h3>";
63
-            echo "<div class='form-group'><label for='sql_host'>" . $lang['database'] . " " . $lang['host'] . ": </label><input class='form-control' id='sql_host' type='text' name='sql_host' value='" . decrypt($db->sql_host) . "'></div>";
64
-            echo "<div class='form-group'><label for='sql_user'>" . $lang['database'] . " " . $lang['user'] . ": </label><input class='form-control' id='sql_user' type='text' name='sql_user' value='" . decrypt($db->sql_user) . "'></div>";
65
-            echo "<div class='form-group'><div class='input-group'><label for='sql_pass'>" . $lang['database'] . " " . $lang['password'] . ": </label><input class='form-control pwd' id='sql_pass' type='password' name='sql_pass' value='" . decrypt($db->sql_pass) . "'>";
62
+            echo "<h3>".$lang['database']."</h3>";
63
+            echo "<div class='form-group'><label for='sql_host'>".$lang['database']." ".$lang['host'].": </label><input class='form-control' id='sql_host' type='text' name='sql_host' value='".decrypt($db->sql_host)."'></div>";
64
+            echo "<div class='form-group'><label for='sql_user'>".$lang['database']." ".$lang['user'].": </label><input class='form-control' id='sql_user' type='text' name='sql_user' value='".decrypt($db->sql_user)."'></div>";
65
+            echo "<div class='form-group'><div class='input-group'><label for='sql_pass'>".$lang['database']." ".$lang['password'].": </label><input class='form-control pwd' id='sql_pass' type='password' name='sql_pass' value='".decrypt($db->sql_pass)."'>";
66 66
             echo "<span class='input-group-btn'><button style='margin-top: 23px; background-color: #eee;' ";
67 67
             echo "class='btn btn-default reveal' type='button'><i class='fa fa-eye-slash'></i></button></span></div></div>";
68
-            echo "<div class='form-group'><label for='sql_name'>" . $lang['database'] . " " . $lang['name'] . ": </label><input class='form-control' id='sql_name' type='text' name='sql_name' value='" . decrypt($db->sql_name) . "'></div>";
69
-            echo "<div class='form-group'><label for='name'>" . $lang['name'] . ": </label><input class='form-control' id='name' type='text' name='name' value='" . $server->name . "'></div>";
68
+            echo "<div class='form-group'><label for='sql_name'>".$lang['database']." ".$lang['name'].": </label><input class='form-control' id='sql_name' type='text' name='sql_name' value='".decrypt($db->sql_name)."'></div>";
69
+            echo "<div class='form-group'><label for='name'>".$lang['name'].": </label><input class='form-control' id='name' type='text' name='name' value='".$server->name."'></div>";
70 70
             ?>
71
-            <div class='form-group'><label for="type"><?php echo $lang['database'] . " " . $lang['type'] ?>: </label>
71
+            <div class='form-group'><label for="type"><?php echo $lang['database']." ".$lang['type'] ?>: </label>
72 72
                 <select name="type" id="type" class="form-control">
73 73
                     <option value="life"
74
-                    <?php echo select('life', $server->type) . '>' . $lang['life'] ?></option>
74
+                    <?php echo select('life', $server->type).'>'.$lang['life'] ?></option>
75 75
                     <option value="waste"
76
-                    <?php echo select('waste', $server->type) . '>' . $lang['waste'] ?></option>
76
+                    <?php echo select('waste', $server->type).'>'.$lang['waste'] ?></option>
77 77
                 </select>
78 78
             </div>
79 79
         </div>
80 80
         <div class="col-md-6" style="float:right;">
81 81
                 <h3><?php echo $lang['gsq'] ?></h3>
82
-                <div class='form-group'><label for="usegsq"><?php echo $lang['use'] . " " . $lang['gsq'] ?>: </label>
82
+                <div class='form-group'><label for="usegsq"><?php echo $lang['use']." ".$lang['gsq'] ?>: </label>
83 83
                 <select name="usegsq" id="usegsq" class="form-control">
84 84
                     <option value="1"
85
-                    <?php echo select('1', $server->use_sq) . '>' . $lang['yes'] ?></option>
85
+                    <?php echo select('1', $server->use_sq).'>'.$lang['yes'] ?></option>
86 86
                     <option value="0"
87
-                    <?php echo select('0', $server->use_sq) . '>' . $lang['no'] ?></option>
87
+                    <?php echo select('0', $server->use_sq).'>'.$lang['no'] ?></option>
88 88
                 </select>
89 89
             </div> <?php
90
-                echo "<div id='sq_details'><div class='form-group'><label for='sq_ip'>" . $lang['gsq'] . " " . $lang['gsqa'] . ": </label><input class='form-control' id='sq_ip' type='text' name='sq_ip' value='";
90
+                echo "<div id='sq_details'><div class='form-group'><label for='sq_ip'>".$lang['gsq']." ".$lang['gsqa'].": </label><input class='form-control' id='sq_ip' type='text' name='sq_ip' value='";
91 91
                 if (isset($server->sq_ip)) {
92 92
                     echo decrypt($server->sq_ip);
93 93
                 }
94 94
                 echo "'></div>";
95
-                echo "<div class='form-group'><label for='sq_port'>" . $lang['gsq'] . " " . $lang['gsqp'] . ": </label><input class='form-control' id='sq_port' type='text' name='sq_port' value='";
95
+                echo "<div class='form-group'><label for='sq_port'>".$lang['gsq']." ".$lang['gsqp'].": </label><input class='form-control' id='sq_port' type='text' name='sq_port' value='";
96 96
                 if (isset($server->sq_port)) {
97 97
                     echo decrypt($server->sq_port);
98 98
                 }
99 99
                 echo "'></div>";
100
-                echo "<div class='form-group'><div class='input-group'><label for='rcon_pass'>" . $lang['gsq'] . " " . $lang['gsrc'] . ": </label><input class='form-control pwd' id='rcon_pass' type='password' name='rcon_pass' value='";
100
+                echo "<div class='form-group'><div class='input-group'><label for='rcon_pass'>".$lang['gsq']." ".$lang['gsrc'].": </label><input class='form-control pwd' id='rcon_pass' type='password' name='rcon_pass' value='";
101 101
                 if (isset($server->rcon_pass)) {
102 102
                     echo decrypt($server->rcon_pass);
103 103
                 }
Please login to merge, or discard this patch.
views/core/pluginstore.php 2 patches
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.
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 if (file_exists("plugins")) {
3
-    $plugins = json_decode(file_get_contents('http://cyberbyte.org.uk/hooks/cyberworks/plugins.php?id=' . $settings['id']), true);
3
+    $plugins = json_decode(file_get_contents('http://cyberbyte.org.uk/hooks/cyberworks/plugins.php?id='.$settings['id']), true);
4 4
 
5 5
     function downloadFile($url) {
6
-        $newfname = realpath('downloading') . '/plugin.zip';
6
+        $newfname = realpath('downloading').'/plugin.zip';
7 7
         $folder = realpath('plugins');
8 8
         $file = fopen($url, "rb");
9 9
         if ($file) {
@@ -37,10 +37,10 @@  discard block
 block discarded – undo
37 37
             $objects = scandir($dir);
38 38
             foreach ($objects as $object) {
39 39
                 if ($object != "." && $object != "..") {
40
-                    if (filetype($dir . "/" . $object) == "dir") {
41
-                        rrmdir($dir . "/" . $object);
40
+                    if (filetype($dir."/".$object) == "dir") {
41
+                        rrmdir($dir."/".$object);
42 42
                     } else {
43
-                        unlink($dir . "/" . $object);
43
+                        unlink($dir."/".$object);
44 44
                     }
45 45
                 }
46 46
             }
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     if (isset($_GET['activate'])) {
59 59
         if (!in_array($_GET['activate'], $settings['plugins'])) {
60 60
             array_push($settings['plugins'], $_GET['activate']);
61
-            $json = json_decode(file_get_contents('plugins/' . $_GET['activate'] . '/plugin.json'), true);
61
+            $json = json_decode(file_get_contents('plugins/'.$_GET['activate'].'/plugin.json'), true);
62 62
             if (isset($json['language']) && isset($json['short'])) {
63 63
                 $lang = array($json['language'], $json['short']);
64 64
                 array_push($settings['installedLanguage'], $lang);
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 
70 70
                 }
71 71
             }
72
-            file_put_contents('config/settings.php', '<?php return ' . var_export($settings, true) . ';');
72
+            file_put_contents('config/settings.php', '<?php return '.var_export($settings, true).';');
73 73
             message($lang['pluginActivated']);
74 74
         } message($lang['activeAlready']);
75 75
     }
@@ -82,17 +82,17 @@  discard block
 block discarded – undo
82 82
                 $settings['plugins'] = array_diff($settings['plugins'], array($_GET['deactivate']));
83 83
             }
84 84
             
85
-            $json = json_decode(file_get_contents('plugins/' . $_GET['deactivate'] . '/plugin.json'), true);
85
+            $json = json_decode(file_get_contents('plugins/'.$_GET['deactivate'].'/plugin.json'), true);
86 86
             if (isset($json['language']) && isset($json['short'])) {
87 87
                 $key = array_search($_GET['deactivate'], array_column($settings['installedLanguage'], 0));
88 88
                 unset($settings['installedLanguage'][$key]);
89 89
             }
90
-            file_put_contents('config/settings.php', '<?php return ' . var_export($settings, true) . ';');
90
+            file_put_contents('config/settings.php', '<?php return '.var_export($settings, true).';');
91 91
         } message($lang['notActive']);
92 92
     }
93 93
 
94 94
     if (isset($_GET['delete'])) {
95
-        rrmdir(realpath('plugins') . '/' . $_GET['delete']);
95
+        rrmdir(realpath('plugins').'/'.$_GET['delete']);
96 96
     }
97 97
     ?>
98 98
 
@@ -112,91 +112,91 @@  discard block
 block discarded – undo
112 112
         unset($files[1]);
113 113
 
114 114
         foreach ($files as &$file) {
115
-            $path = 'plugins/' . $file . '/plugin.json';
115
+            $path = 'plugins/'.$file.'/plugin.json';
116 116
             $installed[] = json_decode(file_get_contents($path), true);
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) echo "<h2 style='margin-top: 0;'>".$lang['dropIn']."</h2>";
121 121
         
122 122
         foreach ($dropIn as &$plugin) {
123 123
             $key = array_search($plugin, array_column($installed, 'dirname'));
124 124
             echo '<div class="col-sm-6 col-md-4"><div class="thumbnail"><div class="caption">';
125
-            echo '<h3>' . $installed[$key]['name'] . ' - ' . $installed[$key]['version'];
125
+            echo '<h3>'.$installed[$key]['name'].' - '.$installed[$key]['version'];
126 126
 
127 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>';
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>';
130 130
 
131
-            echo '</h3><p><strong>' . $installed[$key]['author'] . '</strong> - ' . $installed[$key]['description'] . '</p>';
131
+            echo '</h3><p><strong>'.$installed[$key]['author'].'</strong> - '.$installed[$key]['description'].'</p>';
132 132
 
133 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>';
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>';
136 136
 
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>';
138
-            echo '<a style="float: right;" href="?delete=' . $plugin . '" class="btn btn-danger" role="button">' . $lang['delete'] . '</a>';
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>';
138
+            echo '<a style="float: right;" href="?delete='.$plugin.'" class="btn btn-danger" role="button">'.$lang['delete'].'</a>';
139 139
             echo '</p></div></div></div>';
140 140
         }
141
-        echo "<div class='row'></div><h2>" . $lang['pluginstore'] . "</h2>";
141
+        echo "<div class='row'></div><h2>".$lang['pluginstore']."</h2>";
142 142
 
143 143
         foreach ($plugins as &$plugin) {
144 144
             echo '<div class="col-sm-6 col-md-4"><div class="thumbnail">';
145
-            echo '<img  src="' . $plugin['image'] . '" alt="' . $plugin['name'] . '">';
145
+            echo '<img  src="'.$plugin['image'].'" alt="'.$plugin['name'].'">';
146 146
             echo '<div class="caption">';
147
-            echo '<h3>' . $plugin['name'] . ' - ' . $plugin['version'];
147
+            echo '<h3>'.$plugin['name'].' - '.$plugin['version'];
148 148
 
149 149
             $key = array_search($plugin['dirname'], array_column($installed, 'dirname'));
150 150
 
151 151
             if ($key !== false) {
152 152
                 if (in_array($plugin['dirname'], $settings['plugins'])) {
153 153
                     if ($plugin['version'] > $installed[$key]['version']) {
154
-                        echo '<small style="padding-left: 6px;"><span class="label label-info">' . $lang['updateAvalible'] . '</span></small>';
154
+                        echo '<small style="padding-left: 6px;"><span class="label label-info">'.$lang['updateAvalible'].'</span></small>';
155 155
                     }
156 156
                     // Update avalible
157 157
                     else {
158
-                        echo '<small style="padding-left: 6px;"><span class="label label-success">' . $lang['active'] . '</span>';
158
+                        echo '<small style="padding-left: 6px;"><span class="label label-success">'.$lang['active'].'</span>';
159 159
                     }
160 160
                     // Active plugin
161 161
                 } elseif (in_array($plugin['dirname'], $files)) {
162
-                    echo '<small style="padding-left: 6px;"><span class="label label-default">' . $lang['installed'] . '</span></small>';
162
+                    echo '<small style="padding-left: 6px;"><span class="label label-default">'.$lang['installed'].'</span></small>';
163 163
                 }
164 164
                 // Installed not active
165 165
             }
166
-            echo '</h3><p><strong>' . $plugin['author'] . '</strong> - ' . $plugin['description'] . '</p>';
166
+            echo '</h3><p><strong>'.$plugin['author'].'</strong> - '.$plugin['description'].'</p>';
167 167
 
168 168
             if ($key !== false) {
169 169
                 if (in_array($plugin['dirname'], $settings['plugins'])) {
170 170
                     if ($plugin['version'] > $installed[$key]['version']) {
171
-                        echo '<div><a href="?install=' . $plugin['dirname'] . '" class="btn btn-primary" role="button">' . $lang['update'] . '</a>';
171
+                        echo '<div><a href="?install='.$plugin['dirname'].'" class="btn btn-primary" role="button">'.$lang['update'].'</a>';
172 172
                     }
173 173
                     // Update avalible
174 174
                     else {
175
-                        echo '<p><a href="?deactivate=' . $plugin['dirname'] . '" class="btn btn-primary" role="button">' . $lang['deactivate'] . '</a>';
175
+                        echo '<p><a href="?deactivate='.$plugin['dirname'].'" class="btn btn-primary" role="button">'.$lang['deactivate'].'</a>';
176 176
                     }
177 177
                     // Active plugin
178 178
                 } elseif (in_array($plugin['dirname'], $files)) {
179
-                    echo '<p><a href="?activate=' . $plugin['dirname'] . '" class="btn btn-primary" role="button">' . $lang['activate'] . '</a>';
179
+                    echo '<p><a href="?activate='.$plugin['dirname'].'" class="btn btn-primary" role="button">'.$lang['activate'].'</a>';
180 180
                 }
181 181
                 // Installed not active
182 182
             } else {
183
-                echo '<p><a href="?install=' . $plugin['dirname'] . '" class="btn btn-primary" role="button">' . $lang['install'] . '</a>';
183
+                echo '<p><a href="?install='.$plugin['dirname'].'" class="btn btn-primary" role="button">'.$lang['install'].'</a>';
184 184
             }
185 185
             // Not installed
186 186
 
187 187
             if (isset($plugin['authurl'])) {
188
-                echo '<a style="margin-left: 5px;" href="' . $plugin['authurl'] . '" class="btn btn-default" role="button">' . $lang['visitSite'] . '</a>';
188
+                echo '<a style="margin-left: 5px;" href="'.$plugin['authurl'].'" class="btn btn-default" role="button">'.$lang['visitSite'].'</a>';
189 189
             }
190 190
             if (in_array($plugin['dirname'], $files)) {
191
-                echo '<a style="float: right;" href="?delete=' . $plugin['dirname'] . '" class="btn btn-danger" role="button">' . $lang['delete'] . '</a></div>';
191
+                echo '<a style="float: right;" href="?delete='.$plugin['dirname'].'" class="btn btn-danger" role="button">'.$lang['delete'].'</a></div>';
192 192
             }
193 193
             echo '</div></div></div>';
194 194
         }
195 195
 
196 196
         echo '</div></div></form>';
197 197
     } else {
198
-        echo '<h2>' . $lang['notverified'] . '</h2>';
198
+        echo '<h2>'.$lang['notverified'].'</h2>';
199 199
     }
200 200
     } else {
201
-    echo '<h2>' . $lang['noPlugin'] . '</h2>';
201
+    echo '<h2>'.$lang['noPlugin'].'</h2>';
202 202
 }
Please login to merge, or discard this patch.
views/core/newServer.php 2 patches
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.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -5,10 +5,10 @@  discard block
 block discarded – undo
5 5
         if ($dbid == 'none') {
6 6
             $server_type = 'life';
7 7
 
8
-            $sql = "INSERT INTO `db` (`type`, `sql_host`, `sql_user`, `sql_pass`, `sql_name`) VALUES ('" . $server_type . "', '" . $settings['db']['host'] . "', '" . $settings['db']['user'] . "', '" . $settings['db']['pass'] . "', '" . $settings['db']['name'] . "');";
8
+            $sql = "INSERT INTO `db` (`type`, `sql_host`, `sql_user`, `sql_pass`, `sql_name`) VALUES ('".$server_type."', '".$settings['db']['host']."', '".$settings['db']['user']."', '".$settings['db']['pass']."', '".$settings['db']['name']."');";
9 9
             $result_of_query = $db_connection->query($sql);
10 10
 
11
-            $sql = "SELECT `dbid` FROM `db` WHERE `sql_name` = '" . $SQL_name . "';";
11
+            $sql = "SELECT `dbid` FROM `db` WHERE `sql_name` = '".$SQL_name."';";
12 12
             $result_of_query = $db_connection->query($sql);
13 13
             while ($row = mysqli_fetch_assoc($result_of_query)) {
14 14
                 $dbid = $row['dbid'];
@@ -27,11 +27,11 @@  discard block
 block discarded – undo
27 27
                 $server_RCON_pass = encrypt($_POST['server_RCON_pass']);
28 28
 
29 29
                 $sql = "INSERT INTO `servers` (`name`, `dbid`, `type`, `use_sq`, `sq_port`,`sq_ip`, `rcon_pass`) VALUES
30
-                ('" . $server_name . "', '" . $dbid . "', '" . $server_type . "', '" . $server_SQ . "', '" . $server_SQ_port . "', '" . $server_SQ_host . "', '" . $server_RCON_pass . "');";
30
+                ('" . $server_name."', '".$dbid."', '".$server_type."', '".$server_SQ."', '".$server_SQ_port."', '".$server_SQ_host."', '".$server_RCON_pass."');";
31 31
             }
32 32
         } else {
33 33
             $sql = "INSERT INTO `servers` (`name`, `dbid`, `type`, `use_sq`) VALUES
34
-                ('" . $server_name . "', '" . $dbid . "', '" . $server_type . "', '" . $server_SQ . "');";
34
+                ('" . $server_name."', '".$dbid."', '".$server_type."', '".$server_SQ."');";
35 35
         }
36 36
 
37 37
         $result_of_query = $db_connection->query($sql);
@@ -46,13 +46,13 @@  discard block
 block discarded – undo
46 46
         <form method="post" action="newServer" name="newServer" id="newServer">
47 47
             <?php echo formtoken::getField() ?>
48 48
             <h2 class="form-login-heading">
49
-                <?php echo $lang['new'] . ' ' . $lang['gameServers'] ?>
49
+                <?php echo $lang['new'].' '.$lang['gameServers'] ?>
50 50
             </h2>
51 51
             <div class="form-group">
52 52
                 <label for="server_name">Server Name: </label>
53 53
                 <input placeholder="Server Name" id="server_name" class=" form-control login_input" type="text" name="server_name"
54 54
                     <?php if (isset($_POST['server_name'])) {
55
-    echo 'value="' . $_POST['server_name'] . '"' ?>
55
+    echo 'value="'.$_POST['server_name'].'"' ?>
56 56
                        autocorrect="off" required>
57 57
                 </div>
58 58
                 <div class="form-group">
@@ -75,19 +75,19 @@  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'])) echo 'value="'.$_POST['server_SQ_host'].'"' ?> autocorrect="off" autocapitalize="off">
79 79
                     </div>
80 80
                     <div class="form-group">
81 81
                         <label for="server_SQ_port">SQ port: </label>
82 82
                         <input placeholder="SQ Port" id="server_SQ_port"
83 83
                        class=" form-control login_input" type="text"
84 84
                        name="server_SQ_port"
85
-                            <?php if (isset($_POST['server_SQ_port'])) echo 'value="' . $_POST['server_SQ_port'] . '"' ?> autocorrect="off" autocapitalize="off" autocomplete="off">
85
+                            <?php if (isset($_POST['server_SQ_port'])) echo 'value="'.$_POST['server_SQ_port'].'"' ?> autocorrect="off" autocapitalize="off" autocomplete="off">
86 86
                         </div>
87 87
                         <div class="form-group">
88 88
                             <label for="server_RCON_pass">RCON Password: </label>
89 89
                             <input placeholder="RCON Password" id="server_RCON_pass" class=" form-control login_input" type="password" name="server_RCON_pass"
90
-                                <?php if (isset($_POST['server_RCON_pass'])) echo 'value="' . $_POST['server_RCON_pass'] . '"' ?> autocorrect="off" autocapitalize="off" autocomplete="off">
90
+                                <?php if (isset($_POST['server_RCON_pass'])) echo 'value="'.$_POST['server_RCON_pass'].'"' ?> autocorrect="off" autocapitalize="off" autocomplete="off">
91 91
                             </div>
92 92
                             </div>
93 93
                             <?php
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
                     echo '<div class="form-group"><label for="server_dbid">Database: </label>';
99 99
                     echo '<select id="server_dbid" name="server_dbid" class="form-control login_input">';
100 100
                     while ($row = mysqli_fetch_assoc($result_of_query)) {
101
-                        echo '<option value="' . $row['dbid'] . '">' . decrypt($row['sql_name'], $settings['key']) . '</option>';
101
+                        echo '<option value="'.$row['dbid'].'">'.decrypt($row['sql_name'], $settings['key']).'</option>';
102 102
                     }
103 103
                     echo '</select></div>';
104 104
                 } else {
Please login to merge, or discard this patch.
views/core/profile.php 2 patches
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.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
         $user_pic = $_POST['user_pic'];
6 6
         $pId = $_POST['player_id'];
7 7
         $_SESSION['user_profile'] = $user_pic;
8
-        $sql = "UPDATE `users` SET `user_email`= '" . $email . "',`playerid`= '" . $pId . "', `user_profile`= '" . $user_pic . "'WHERE `user_id` = '" . $_SESSION['user_id'] . "' ";
8
+        $sql = "UPDATE `users` SET `user_email`= '".$email."',`playerid`= '".$pId."', `user_profile`= '".$user_pic."'WHERE `user_id` = '".$_SESSION['user_id']."' ";
9 9
         $result_of_query = $db_connection->query($sql);
10 10
     } else {
11 11
         message($lang['expired']);
@@ -13,10 +13,10 @@  discard block
 block discarded – undo
13 13
 }
14 14
 if (isset($_POST['user_password'])) {
15 15
     if (formtoken::validateToken($_POST)) {
16
-        $sql = "SELECT `user_password_hash` FROM `users` WHERE `user_id` = '" . $_SESSION['user_id'] . "';";
16
+        $sql = "SELECT `user_password_hash` FROM `users` WHERE `user_id` = '".$_SESSION['user_id']."';";
17 17
         $result = $db_connection->query($sql)->fetch_object();
18
-        if ($_POST['user_password'] == $_POST['user_password_again'] && password_verify($_POST['current_password'],$result->user_password_hash)) {
19
-            $sql = "UPDATE `users` SET `user_password_hash`= '" . password_hash($_POST['user_password'], PASSWORD_DEFAULT) . "' WHERE `user_id` = '" . $_SESSION['user_id'] . "';";
18
+        if ($_POST['user_password'] == $_POST['user_password_again'] && password_verify($_POST['current_password'], $result->user_password_hash)) {
19
+            $sql = "UPDATE `users` SET `user_password_hash`= '".password_hash($_POST['user_password'], PASSWORD_DEFAULT)."' WHERE `user_id` = '".$_SESSION['user_id']."';";
20 20
             $result_of_query = $db_connection->query($sql);
21 21
             message($lang['passChanged']);
22 22
         }
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     }
26 26
 }
27 27
 
28
-$sql = "SELECT * FROM `users` WHERE `user_name` ='" . $_SESSION['user_name'] . "';";
28
+$sql = "SELECT * FROM `users` WHERE `user_name` ='".$_SESSION['user_name']."';";
29 29
 $profile = $db_connection->query($sql)->fetch_object();
30 30
 ?>
31 31
 <div class="row">
@@ -44,14 +44,14 @@  discard block
 block discarded – undo
44 44
     <div class="panel-body">
45 45
         <div class="row">
46 46
             <div  style="padding-top:4%;" class="col-md-3 col-lg-3 " align="center">
47
-                <?php if(!isset($_SESSION['profile_link'])) {
48
-                    if(isset($_SESSION['user_email']) && $settings['gravatar']) { ?>
49
-                        <a href="<?php echo $settings['url'] . 'profile' ?>"> <img alt="User Pic" src="<?php getGravatar($_SESSION['user_email'],64,'retro')  ?>" class="img-circle img-responsive"></a>
47
+                <?php if (!isset($_SESSION['profile_link'])) {
48
+                    if (isset($_SESSION['user_email']) && $settings['gravatar']) { ?>
49
+                        <a href="<?php echo $settings['url'].'profile' ?>"> <img alt="User Pic" src="<?php getGravatar($_SESSION['user_email'], 64, 'retro')  ?>" class="img-circle img-responsive"></a>
50 50
                     <?php } else {?>
51
-                        <a href="<?php echo $settings['url'] . 'profile' ?>"> <img alt="User Pic" src="<?php echo $settings['url'] . 'assets/img/profile/' . $_SESSION['user_profile'] . '.jpg' ?>" class="img-circle img-responsive"></a>
51
+                        <a href="<?php echo $settings['url'].'profile' ?>"> <img alt="User Pic" src="<?php echo $settings['url'].'assets/img/profile/'.$_SESSION['user_profile'].'.jpg' ?>" class="img-circle img-responsive"></a>
52 52
                     <?php } ?>
53 53
                 <?php } else { ?>
54
-                    <img alt="User Pic" src="<?php echo $settings['url'] . 'assets/img/profile/' . $_SESSION['user_profile'] . '.jpg' ?>" class="img-circle img-responsive">
54
+                    <img alt="User Pic" src="<?php echo $settings['url'].'assets/img/profile/'.$_SESSION['user_profile'].'.jpg' ?>" class="img-circle img-responsive">
55 55
                 <?php } ?>
56 56
             </div>
57 57
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
                     <tbody>
61 61
                     <tr>
62 62
                         <td><?php echo $lang['rank'] ?>:</td>
63
-                        <td><?php echo $settings['ranks'][$profile->user_level] . " (" . $profile->user_level . ")" ?></td>
63
+                        <td><?php echo $settings['ranks'][$profile->user_level]." (".$profile->user_level.")" ?></td>
64 64
                     </tr>
65 65
                     <form method="post" action="profile" name="profileEdit" id="profileEdit">
66 66
                         <?php echo formtoken::getField(); ?>
@@ -78,26 +78,26 @@  discard block
 block discarded – undo
78 78
                                 <select id='user_pic' name='user_pic' class='form-control'>";
79 79
                                     <?php
80 80
                                     for ($icon = 1; $icon < 6; $icon++) {
81
-                                        echo '<option value="' . $icon . '" ' . select($icon, $profile->user_profile) . '>' . $settings['names'][$icon] . '</option>';
81
+                                        echo '<option value="'.$icon.'" '.select($icon, $profile->user_profile).'>'.$settings['names'][$icon].'</option>';
82 82
                                     }
83 83
                                     ?>
84 84
                                 </select>
85 85
                             </td>
86 86
                         </tr>
87 87
                         <tr>
88
-                            <td><?php echo $lang['current'] . " " . $lang['password'] ?></td>
88
+                            <td><?php echo $lang['current']." ".$lang['password'] ?></td>
89 89
                             <td>
90 90
                                 <input type="password" id="current_password" name="current_password" class="form-control" autocorrect="off" autocapitalize="off" autocomplete="off">
91 91
                             </td>
92 92
                         </tr>
93 93
                         <tr>
94
-                            <td><?php echo "New " . $lang['password'] ?></td>
94
+                            <td><?php echo "New ".$lang['password'] ?></td>
95 95
                             <td>
96 96
                                 <input type="password" id="user_password" name="user_password" class="form-control" autocorrect="off" autocapitalize="off" autocomplete="off">
97 97
                             </td>
98 98
                         </tr>
99 99
                         <tr>
100
-                            <td><?php echo $lang['repeat'] . " New " . $lang['password'] ?></td>
100
+                            <td><?php echo $lang['repeat']." New ".$lang['password'] ?></td>
101 101
                             <td>
102 102
                                 <input type="password" id="user_password_again" name="user_password_again" autocorrect="off" class="form-control" autocapitalize="off" autocomplete="off">
103 103
                             </td>
Please login to merge, or discard this patch.
views/core/register.php 2 patches
Braces   +11 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,13 +22,19 @@  discard block
 block discarded – undo
22 22
                 <p>Username:</p>
23 23
                 <input id="user_name" type="text" class="form-control"
24 24
                        placeholder="Username (only letters and numbers, 2 to 30 characters)" autofocus
25
-                       name="user_name" <?php if (isset($_POST['user_name'])) echo 'value="' . $_POST['user_name'] . '"'; ?> required>
25
+                       name="user_name" <?php if (isset($_POST['user_name'])) {
26
+    echo 'value="' . $_POST['user_name'] . '"';
27
+}
28
+?> required>
26 29
             </div>
27 30
 
28 31
             <div class="form-group">
29 32
                 <p>Email Address:</p>
30 33
                 <input id="user_email" placeholder="User's email" class=" form-control" type="email"
31
-                       name="user_email" <?php if (isset($_POST['user_name'])) echo 'value="' . $_POST['user_name'] . '"'; ?> required/>
34
+                       name="user_email" <?php if (isset($_POST['user_name'])) {
35
+    echo 'value="' . $_POST['user_name'] . '"';
36
+}
37
+?> required/>
32 38
             </div>
33 39
             <div class="form-group">
34 40
                 <p>Password:</p>
@@ -47,7 +53,9 @@  discard block
 block discarded – undo
47 53
                 <select class=" form-control" name="profile_pic">
48 54
                     <?php for ($icon = 1; $icon <= 6; $icon++) {
49 55
                         echo '<option value="' . $icon . '" ';
50
-                        if (isset($_POST['user_name'])) if ($icon == $_POST['user_name']) echo 'selected';
56
+                        if (isset($_POST['user_name'])) {
57
+                            if ($icon == $_POST['user_name']) echo 'selected';
58
+                        }
51 59
                         echo '>' . $settings['names'][$icon] . '</option>';
52 60
                     } ?>
53 61
                 </select>
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,13 +22,13 @@  discard block
 block discarded – undo
22 22
                 <p>Username:</p>
23 23
                 <input id="user_name" type="text" class="form-control"
24 24
                        placeholder="Username (only letters and numbers, 2 to 30 characters)" autofocus
25
-                       name="user_name" <?php if (isset($_POST['user_name'])) echo 'value="' . $_POST['user_name'] . '"'; ?> required>
25
+                       name="user_name" <?php if (isset($_POST['user_name'])) echo 'value="'.$_POST['user_name'].'"'; ?> required>
26 26
             </div>
27 27
 
28 28
             <div class="form-group">
29 29
                 <p>Email Address:</p>
30 30
                 <input id="user_email" placeholder="User's email" class=" form-control" type="email"
31
-                       name="user_email" <?php if (isset($_POST['user_name'])) echo 'value="' . $_POST['user_name'] . '"'; ?> required/>
31
+                       name="user_email" <?php if (isset($_POST['user_name'])) echo 'value="'.$_POST['user_name'].'"'; ?> required/>
32 32
             </div>
33 33
             <div class="form-group">
34 34
                 <p>Password:</p>
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
                 <p>Profile Picture:</p>
47 47
                 <select class=" form-control" name="profile_pic">
48 48
                     <?php for ($icon = 1; $icon <= 6; $icon++) {
49
-                        echo '<option value="' . $icon . '" ';
49
+                        echo '<option value="'.$icon.'" ';
50 50
                         if (isset($_POST['user_name'])) if ($icon == $_POST['user_name']) echo 'selected';
51
-                        echo '>' . $settings['names'][$icon] . '</option>';
51
+                        echo '>'.$settings['names'][$icon].'</option>';
52 52
                     } ?>
53 53
                 </select>
54 54
             </div>
Please login to merge, or discard this patch.
views/firstTime.php 2 patches
Braces   +8 added lines, -3 removed lines patch added patch discarded remove patch
@@ -295,7 +295,8 @@  discard block
 block discarded – undo
295 295
                             <br>
296 296
                             <label for="community_name">Community Name: </label>
297 297
                             <input placeholder="Community Name" id="community_name"
298
-                                   class="form-control login_input" type="text" name="community_name" <?php if (isset($_POST['community_name'])) echo 'value="' . $_POST['community_name'] . '"'?>>
298
+                                   class="form-control login_input" type="text" name="community_name" <?php if (isset($_POST['community_name'])) {
299
+    echo 'value="' . $_POST['community_name'] . '"'?>>
299 300
                             <br><h4>User Setup</h4>
300 301
                             <label for="user_name">Username: </label>
301 302
                             <input placeholder="Username" id="user_name"
@@ -317,10 +318,14 @@  discard block
 block discarded – undo
317 318
 
318 319
                             <select id='user_pic' name='user_pic' class=" form-control login_input">
319 320
                             <?php
320
-                            for ($icon = 1; $icon < 7; $icon++) {
321
+                            for ($icon = 1;
322
+}
323
+$icon < 7; $icon++) {
321 324
                                 echo '<option value="' . $icon . '"';
322 325
                                 if (isset($_POST['user_pic'])) {
323
-                                    if ($icon == $_POST['user_pic']) echo ' selected';
326
+                                    if ($icon == $_POST['user_pic']) {
327
+                                        echo ' selected';
328
+                                    }
324 329
                                 }
325 330
                                 echo '>' . $icon . '</option>';
326 331
                             } ?>
Please login to merge, or discard this patch.
Spacing   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
     $max = ceil($length / 40);
7 7
     $random = '';
8 8
     for ($i = 0; $i < $max; $i++) {
9
-        $random .= sha1(microtime(true) . mt_rand(10000, 90000));
9
+        $random .= sha1(microtime(true).mt_rand(10000, 90000));
10 10
     }
11 11
     return substr($random, 0, $length);
12 12
 }
@@ -22,16 +22,16 @@  discard block
 block discarded – undo
22 22
 }
23 23
 
24 24
 if (isset($_POST['user_name'])) {
25
-    $last = str_replace(strrchr($_SERVER['REQUEST_URI'], '/'), '', $_SERVER['REQUEST_URI']) . '/';
26
-    $settings['url'] = 'http://' . $_SERVER['HTTP_HOST'] . $last;
25
+    $last = str_replace(strrchr($_SERVER['REQUEST_URI'], '/'), '', $_SERVER['REQUEST_URI']).'/';
26
+    $settings['url'] = 'http://'.$_SERVER['HTTP_HOST'].$last;
27 27
     $base = substr($last, 1);
28 28
     $settings['base'] = substr_count($settings['url'], "/") - 2;
29 29
 
30 30
     $hta = 'RewriteEngine On
31
-RewriteBase /'.$base . '
31
+RewriteBase /'.$base.'
32 32
 RewriteCond %{REQUEST_FILENAME} !-f
33
-RewriteRule . /'.$base . 'index.php [L]';
34
-    file_put_contents('.htaccess',$hta);
33
+RewriteRule . /'.$base.'index.php [L]';
34
+    file_put_contents('.htaccess', $hta);
35 35
 
36 36
     $settings['id'] = 1001;
37 37
     $settings['community'] = $_POST['community_name'];
@@ -111,21 +111,21 @@  discard block
 block discarded – undo
111 111
     $settings['communityBansTest'] = false;
112 112
     $settings['communityBansAPI'] = '';
113 113
 
114
-    $settings['item'] = array(5,10,15,25,50);
114
+    $settings['item'] = array(5, 10, 15, 25, 50);
115 115
 
116
-    $settings['installedLanguage']=array();
117
-    $langEn = array('English','en');
118
-    $langDe = array('German','de');
116
+    $settings['installedLanguage'] = array();
117
+    $langEn = array('English', 'en');
118
+    $langDe = array('German', 'de');
119 119
     array_push($settings['installedLanguage'], $langEn);
120 120
     array_push($settings['installedLanguage'], $langDe);
121 121
 
122 122
     $settings['names'] = array('', 'Dave', 'Sam', 'Joe', 'Kerry', 'Connie', 'Jess');
123
-    $settings['ranks'] = array('Banned','Player','Member','Moderator','Server Admin','Super Admin');
123
+    $settings['ranks'] = array('Banned', 'Player', 'Member', 'Moderator', 'Server Admin', 'Super Admin');
124 124
 
125 125
     $permissions = include 'config/permissions.php';
126 126
     $userPerms = json_encode($permissions['5']);
127 127
 
128
-    $link = mysqli_connect($server_SQL_host,$server_SQL_user,$server_SQL_pass,$server_SQL_name);
128
+    $link = mysqli_connect($server_SQL_host, $server_SQL_user, $server_SQL_pass, $server_SQL_name);
129 129
     if (mysqli_connect_errno()) {
130 130
         printf("Connect failed: %s\n", mysqli_connect_error());
131 131
         exit();
@@ -133,31 +133,31 @@  discard block
 block discarded – undo
133 133
 
134 134
     $user_password_hash = password_hash($user_password, PASSWORD_DEFAULT);
135 135
 
136
-    mysqli_query($link, "USE `" . $server_SQL_name . "`;") or die('LINK: ' . mysqli_error($link));
136
+    mysqli_query($link, "USE `".$server_SQL_name."`;") or die('LINK: '.mysqli_error($link));
137 137
 
138
-    $query = mysqli_query($link, "SHOW TABLES LIKE 'users'") or die('TEST 1: ' . mysqli_error($link));
138
+    $query = mysqli_query($link, "SHOW TABLES LIKE 'users'") or die('TEST 1: '.mysqli_error($link));
139 139
     if (mysqli_num_rows($query) == 1) {
140
-        mysqli_query($link, "DROP TABLE `users`") or die('DROP 1: ' . mysqli_error($link));
140
+        mysqli_query($link, "DROP TABLE `users`") or die('DROP 1: '.mysqli_error($link));
141 141
     }
142 142
 
143
-    $query = mysqli_query($link, "SHOW TABLES LIKE 'notes'") or die('TEST 2: ' . mysqli_error($link));
143
+    $query = mysqli_query($link, "SHOW TABLES LIKE 'notes'") or die('TEST 2: '.mysqli_error($link));
144 144
     if (mysqli_num_rows($query) == 1) {
145
-        mysqli_query($link, "DROP TABLE `notes`") or die('DROP 2: ' . mysqli_error($link));
145
+        mysqli_query($link, "DROP TABLE `notes`") or die('DROP 2: '.mysqli_error($link));
146 146
     }
147 147
 
148
-    $query = mysqli_query($link, "SHOW TABLES LIKE 'db'") or die('TEST 3: ' . mysqli_error($link));
148
+    $query = mysqli_query($link, "SHOW TABLES LIKE 'db'") or die('TEST 3: '.mysqli_error($link));
149 149
     if (mysqli_num_rows($query) == 1) {
150
-        mysqli_query($link, "DROP TABLE `db`") or die('DROP 3: ' . mysqli_error($link));
150
+        mysqli_query($link, "DROP TABLE `db`") or die('DROP 3: '.mysqli_error($link));
151 151
     }
152 152
 
153
-    $query = mysqli_query($link, "SHOW TABLES LIKE 'servers'") or die('TEST 4: ' . mysqli_error($link));
153
+    $query = mysqli_query($link, "SHOW TABLES LIKE 'servers'") or die('TEST 4: '.mysqli_error($link));
154 154
     if (mysqli_num_rows($query) == 1) {
155
-        mysqli_query($link, "DROP TABLE `servers`") or die('DROP 4: ' . mysqli_error($link));
155
+        mysqli_query($link, "DROP TABLE `servers`") or die('DROP 4: '.mysqli_error($link));
156 156
     }
157 157
 
158
-    $query = mysqli_query($link, "SHOW TABLES LIKE 'logs'") or die('TEST 5: ' . mysqli_error($link));
158
+    $query = mysqli_query($link, "SHOW TABLES LIKE 'logs'") or die('TEST 5: '.mysqli_error($link));
159 159
     if (mysqli_num_rows($query) == 1) {
160
-        mysqli_query($link, "DROP TABLE `logs`") or die('DROP 5: ' . mysqli_error($link));
160
+        mysqli_query($link, "DROP TABLE `logs`") or die('DROP 5: '.mysqli_error($link));
161 161
     }
162 162
 
163 163
     mysqli_query($link, "CREATE TABLE IF NOT EXISTS `users` (
@@ -173,19 +173,19 @@  discard block
 block discarded – undo
173 173
   `twoFactor` VARCHAR(25) NULL,
174 174
   `backup` VARCHAR(255) NULL,
175 175
   `token` VARCHAR(64) NULL
176
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='user data';") or die('1: ' . mysqli_error($link));
176
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='user data';") or die('1: '.mysqli_error($link));
177 177
 
178 178
     if (isset($_POST['user_pid'])) {
179 179
         $user_pid = $_POST['user_pid'];
180 180
         mysqli_query($link, "INSERT INTO `users` (`user_id`, `user_name`, `user_password_hash`, `user_email`, `playerid`, `user_level`, `permissions`,
181 181
 
182 182
 `user_profile`) VALUES
183
-    (1, '" . $user_name . "', '" . $user_password_hash . "', '" . $user_email . "', '" . $user_pid . "', 5, '" . $userPerms . "', '" . $user_pic . "');") or die('2: ' . mysqli_error($link));
183
+    (1, '" . $user_name."', '".$user_password_hash."', '".$user_email."', '".$user_pid."', 5, '".$userPerms."', '".$user_pic."');") or die('2: '.mysqli_error($link));
184 184
     } else { mysqli_query($link, "INSERT INTO `users` (`user_id`, `user_name`, `user_password_hash`, `user_email`, `user_level`, `permissions`, `user_profile`) VALUES
185
-    (1, '" . $user_name . "', '" . $user_password_hash . "', '" . $user_email . "', 5, '" . $userPerms . "', '" . $user_pic . "');") or die('2: ' . mysqli_error($link)); }
185
+    (1, '" . $user_name."', '".$user_password_hash."', '".$user_email."', 5, '".$userPerms."', '".$user_pic."');") or die('2: '.mysqli_error($link)); }
186 186
 
187 187
     mysqli_query($link, "ALTER TABLE `users`
188
-    MODIFY `user_id` INT(11) NOT NULL AUTO_INCREMENT COMMENT 'auto incrementing user_id of each user, unique index',AUTO_INCREMENT=2;") or die('3: ' . mysqli_error($link));
188
+    MODIFY `user_id` INT(11) NOT NULL AUTO_INCREMENT COMMENT 'auto incrementing user_id of each user, unique index',AUTO_INCREMENT=2;") or die('3: '.mysqli_error($link));
189 189
 
190 190
     mysqli_query($link, "CREATE TABLE IF NOT EXISTS `notes` (
191 191
 	  `note_id` INT(11) NOT NULL AUTO_INCREMENT COMMENT 'auto incrementing note_id of each user, unique index',
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 	  `note_updated` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
196 196
 	  PRIMARY KEY (`note_id`),
197 197
 	  UNIQUE KEY `note_id` (`note_id`)
198
-    ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;") or die('4: ' . mysqli_error($link));
198
+    ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;") or die('4: '.mysqli_error($link));
199 199
 
200 200
     mysqli_query($link, "CREATE TABLE IF NOT EXISTS `db` (
201 201
     `dbid` INT(11) NOT NULL AUTO_INCREMENT,
@@ -206,10 +206,10 @@  discard block
 block discarded – undo
206 206
     `sql_name` VARCHAR(64) NOT NULL,
207 207
 	PRIMARY KEY (dbid),
208 208
 	UNIQUE KEY `dbid` (`dbid`)
209
-    ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;") or die('5: ' . mysqli_error($link));
209
+    ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;") or die('5: '.mysqli_error($link));
210 210
 
211 211
     mysqli_query($link, "INSERT INTO `db` (`type`, `sql_host`, `sql_user`, `sql_pass`, `sql_name`) VALUES
212
-    ('" . $sql_type . "', '" . $encrypted_SQL_host . "', '" . $encrypted_SQL_user . "', '" . $encrypted_SQL_pass . "', '" . $encrypted_SQL_name . "');") or die ('6: ' . mysqli_error($link));
212
+    ('" . $sql_type."', '".$encrypted_SQL_host."', '".$encrypted_SQL_user."', '".$encrypted_SQL_pass."', '".$encrypted_SQL_name."');") or die ('6: '.mysqli_error($link));
213 213
 
214 214
     mysqli_query($link, "CREATE TABLE IF NOT EXISTS `servers` (
215 215
     `sid` INT(2) NOT NULL AUTO_INCREMENT,
@@ -222,16 +222,16 @@  discard block
 block discarded – undo
222 222
     `rcon_pass` VARCHAR(255) NULL,
223 223
 	PRIMARY KEY (`sid`),
224 224
 	UNIQUE KEY `sid` (`sid`)
225
-    ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;") or die('7: ' . mysqli_error($link));
225
+    ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;") or die('7: '.mysqli_error($link));
226 226
 
227 227
     if ($server_use_SQ == '1') {
228 228
         mysqli_query($link, "INSERT INTO `servers` (`name`, `dbid`, `type`, `use_sq`, `sq_port`, `sq_ip`,`rcon_pass`) VALUES
229
-    ('" . $server_name . "', '1', '" . $server_type . "', '" . $server_use_SQ . "', '" . $server_PORT . "', '" . $server_IP . "', '" . $server_RCON . "');") or die
229
+    ('" . $server_name."', '1', '".$server_type."', '".$server_use_SQ."', '".$server_PORT."', '".$server_IP."', '".$server_RCON."');") or die
230 230
 
231
-('8: ' . mysqli_error($link));
231
+('8: '.mysqli_error($link));
232 232
     } else {
233 233
                 mysqli_query($link, "INSERT INTO `servers` (`name`, `dbid`, `type`, `use_sq`) VALUES
234
-    ('" . $server_name . "', '1', '" . $server_type . "', '" . $server_use_SQ . "');") or die('8: ' . mysqli_error($link));
234
+    ('" . $server_name."', '1', '".$server_type."', '".$server_use_SQ."');") or die('8: '.mysqli_error($link));
235 235
     }
236 236
 
237 237
     mysqli_query($link, "CREATE TABLE IF NOT EXISTS `logs` (
@@ -243,11 +243,11 @@  discard block
 block discarded – undo
243 243
     PRIMARY KEY (`logid`),
244 244
     UNIQUE KEY `logid` (`logid`),
245 245
     KEY `logid_2` (`logid`)
246
-    ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;") or die('9: ' . mysqli_error($link));
246
+    ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;") or die('9: '.mysqli_error($link));
247 247
 
248 248
     mysqli_close($link);
249 249
 
250
-    file_put_contents('config/settings.php', '<?php return ' . var_export($settings, true) . ';');
250
+    file_put_contents('config/settings.php', '<?php return '.var_export($settings, true).';');
251 251
     $settings = include 'config/settings.php';
252 252
 
253 253
     header("Location: index?setup=1");
@@ -294,34 +294,34 @@  discard block
 block discarded – undo
294 294
                             <br>
295 295
                             <label for="community_name">Community Name: </label>
296 296
                             <input placeholder="Community Name" id="community_name"
297
-                                   class="form-control login_input" type="text" name="community_name" <?php if (isset($_POST['community_name'])) echo 'value="' . $_POST['community_name'] . '"'?>>
297
+                                   class="form-control login_input" type="text" name="community_name" <?php if (isset($_POST['community_name'])) echo 'value="'.$_POST['community_name'].'"'?>>
298 298
                             <br><h4>User Setup</h4>
299 299
                             <label for="user_name">Username: </label>
300 300
                             <input placeholder="Username" id="user_name"
301
-                                   class="form-control login_input" type="text" name="user_name" <?php if (isset($_POST['user_name'])) echo 'value="' . $_POST['user_name'] . '"'?>>
301
+                                   class="form-control login_input" type="text" name="user_name" <?php if (isset($_POST['user_name'])) echo 'value="'.$_POST['user_name'].'"'?>>
302 302
 
303 303
                             <label for="user_email">Email: </label>
304 304
                             <input placeholder="Email" id="user_email" class="form-control login_input"
305
-                                   type="email" name="user_email" required <?php if (isset($_POST['user_email'])) echo 'value="' . $_POST['user_email'] . '"'?>>
305
+                                   type="email" name="user_email" required <?php if (isset($_POST['user_email'])) echo 'value="'.$_POST['user_email'].'"'?>>
306 306
 
307 307
                             <label for="user_password">Password: </label>
308 308
                             <input placeholder="Password" id="user_password"
309 309
                                    class="form-control login_input" type="password" name="user_password"
310
-                                   autocomplete="off" required <?php if (isset($_POST['user_password'])) echo 'value="' . $_POST['user_password'] . '"'?>>
310
+                                   autocomplete="off" required <?php if (isset($_POST['user_password'])) echo 'value="'.$_POST['user_password'].'"'?>>
311 311
 
312 312
                             <label for="user_pid">Player ID: </label>
313 313
                             <input placeholder="Player ID" id="user_pid"
314
-                                   class="form-control login_input" type="number" name="user_pid" <?php if (isset($_POST['user_pid'])) echo 'value="' . $_POST['user_pid'] . '"'?>>
314
+                                   class="form-control login_input" type="number" name="user_pid" <?php if (isset($_POST['user_pid'])) echo 'value="'.$_POST['user_pid'].'"'?>>
315 315
                             <label for="user_pic">Picture: </label>
316 316
 
317 317
                             <select id='user_pic' name='user_pic' class=" form-control login_input">
318 318
                             <?php
319 319
                             for ($icon = 1; $icon < 7; $icon++) {
320
-                                echo '<option value="' . $icon . '"';
320
+                                echo '<option value="'.$icon.'"';
321 321
                                 if (isset($_POST['user_pic'])) {
322 322
                                     if ($icon == $_POST['user_pic']) echo ' selected';
323 323
                                 }
324
-                                echo '>' . $icon . '</option>';
324
+                                echo '>'.$icon.'</option>';
325 325
                             } ?>
326 326
                             </select>
327 327
                             <br>
@@ -336,29 +336,29 @@  discard block
 block discarded – undo
336 336
                             <label for="server_SQL_host">SQL Host: </label>
337 337
                             <input placeholder="SQL Host" id="server_SQL_host"
338 338
                                    class="form-control login_input" type="text" name="server_SQL_host"
339
-                                <?php if (isset($_POST['server_SQL_host'])) echo 'value="' . $_POST['server_SQL_host'] . '"'?>>
339
+                                <?php if (isset($_POST['server_SQL_host'])) echo 'value="'.$_POST['server_SQL_host'].'"'?>>
340 340
 
341 341
                             <label for="server_SQL_user">SQL User: </label>
342 342
                             <input placeholder="SQL User" id="server_SQL_user"
343 343
                                    class="form-control login_input" type="text" name="server_SQL_user"
344
-                                <?php if (isset($_POST['server_SQL_user'])) echo 'value="' . $_POST['server_SQL_user'] . '"'?>>
344
+                                <?php if (isset($_POST['server_SQL_user'])) echo 'value="'.$_POST['server_SQL_user'].'"'?>>
345 345
 
346 346
                             <label for="server_SQL_pass">SQL Password: </label>
347 347
                             <input placeholder="SQL Password" id="server_SQL_pass"
348 348
                                    class="form-control login_input" type="password" name="server_SQL_pass"
349
-                                <?php if (isset($_POST['server_SQL_pass'])) echo 'value="' . $_POST['server_SQL_pass'] . '"'?>>
349
+                                <?php if (isset($_POST['server_SQL_pass'])) echo 'value="'.$_POST['server_SQL_pass'].'"'?>>
350 350
 
351 351
                             <label for="server_SQL_name">SQL Database: </label>
352 352
                             <input placeholder="SQL Database Name" id="server_SQL_name"
353 353
                                    class="form-control login_input" type="text" name="server_SQL_name"
354
-                                <?php if (isset($_POST['server_SQL_name'])) echo 'value="' . $_POST['server_SQL_name'] . '"'?>>
354
+                                <?php if (isset($_POST['server_SQL_name'])) echo 'value="'.$_POST['server_SQL_name'].'"'?>>
355 355
                             <br><br>
356 356
 
357 357
                             <h4>Server Setup</h4>
358 358
                             <label for="server_name">Server name: </label>
359 359
                             <input placeholder="Server name" id="server_name"
360 360
                                    class="form-control login_input" type="text" name="server_name"
361
-                                <?php if (isset($_POST['server_name'])) echo 'value="' . $_POST['server_name'] . '"'?>>
361
+                                <?php if (isset($_POST['server_name'])) echo 'value="'.$_POST['server_name'].'"'?>>
362 362
 
363 363
                             <label for="server_type">Server type: </label>
364 364
                             <select id="server_name" class=" form-control login_input" name="server_type">
@@ -375,17 +375,17 @@  discard block
 block discarded – undo
375 375
                             <label for="server_port">Server Query Port: </label>
376 376
                             <input placeholder="Server Query Port (Default: 2302)" id="server_port"
377 377
                                    class="form-control login_input" type="text" name="server_port"
378
-                                <?php if (isset($_POST['server_port'])) echo 'value="' . $_POST['server_port'] . '"'?>>
378
+                                <?php if (isset($_POST['server_port'])) echo 'value="'.$_POST['server_port'].'"'?>>
379 379
 
380 380
                             <label for="server_IP">Server Query IP: </label>
381 381
                             <input placeholder="Server Query IP" id="server_IP"
382 382
                                    class="form-control login_input" type="text" name="server_IP"
383
-                                <?php if (isset($_POST['server_IP'])) echo 'value="' . $_POST['server_IP'] . '"'?>>
383
+                                <?php if (isset($_POST['server_IP'])) echo 'value="'.$_POST['server_IP'].'"'?>>
384 384
 
385 385
                             <label for="server_SQL_pass">RCON Password: </label>
386 386
                             <input placeholder="RCON Password" id="server_SQL_pass"
387 387
                                    class="form-control login_input" type="password" name="server_RCON_pass"
388
-                                <?php if (isset($_POST['server_SQL_pass'])) echo 'value="' . $_POST['server_SQL_pass'] . '"'?>>
388
+                                <?php if (isset($_POST['server_SQL_pass'])) echo 'value="'.$_POST['server_SQL_pass'].'"'?>>
389 389
                             <br>
390 390
                             <input class="btn btn-lg btn-primary" style="float:right;" type="submit" name="setup"
391 391
                                    value="Setup">
Please login to merge, or discard this patch.
views/templates/page.php 2 patches
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.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
     for ($i = $start; $i <= $end; $i++) {
28 28
         echo '<li';
29 29
         if ($i == $pageNum) echo  ' class="active"';
30
-        echo '><a href="?page=' . $i . '">' . $i . '</a></li>';
30
+        echo '><a href="?page='.$i.'">'.$i.'</a></li>';
31 31
     }; ?>
32 32
 
33 33
     <li>
Please login to merge, or discard this patch.
views/templates/template.php 2 patches
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.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -21,16 +21,16 @@  discard block
 block discarded – undo
21 21
             <p class="centered">
22 22
                 <?php if (!isset($_SESSION['profile_link'])) {
23 23
                     if (isset($_SESSION['user_email']) && $settings['gravatar']) {
24
-                        echo '<a href="' . $settings['url'] . 'profile">';
25
-                        echo '<img src="' . getGravatar($_SESSION['user_email'],64,'retro') . '" class="img-circle" width="60" height="60"></a></p>';
24
+                        echo '<a href="'.$settings['url'].'profile">';
25
+                        echo '<img src="'.getGravatar($_SESSION['user_email'], 64, 'retro').'" class="img-circle" width="60" height="60"></a></p>';
26 26
                     } else {
27
-                        echo '<a href="' . $settings['url'] . 'profile">';
28
-                        echo '<img src="' . $settings['url'] . 'assets/img/profile/' . $_SESSION['user_profile'] . '.jpg"';
27
+                        echo '<a href="'.$settings['url'].'profile">';
28
+                        echo '<img src="'.$settings['url'].'assets/img/profile/'.$_SESSION['user_profile'].'.jpg"';
29 29
                         echo 'class="img-circle" width="60" height="60"></a></p>';
30 30
                     }
31 31
                 } else {
32
-                    echo '<a href="' . $_SESSION['profile_link'] . '" target="_blank">';
33
-                    echo '<img src="' . $_SESSION['user_profile'] . '"';
32
+                    echo '<a href="'.$_SESSION['profile_link'].'" target="_blank">';
33
+                    echo '<img src="'.$_SESSION['user_profile'].'"';
34 34
                     echo 'class="img-circle" width="64" height="64"></a></p>';
35 35
                 }
36 36
                 ?>
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
             </li>
49 49
 
50 50
 			<?php
51
-                if(isset($_SESSION['server_type']))
51
+                if (isset($_SESSION['server_type']))
52 52
                 {
53
-                    switch($_SESSION['server_type'])
53
+                    switch ($_SESSION['server_type'])
54 54
                     {
55 55
                         case 'life':
56 56
                             include("views/life/nav.php");
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
                 }
59 59
 
60 60
                 foreach ($settings['plugins'] as &$plugin) {
61
-                    if (file_exists("plugins/". $plugin. "/nav.php")) {
62
-                        include("plugins/". $plugin."/nav.php");
61
+                    if (file_exists("plugins/".$plugin."/nav.php")) {
62
+                        include("plugins/".$plugin."/nav.php");
63 63
                     }
64 64
                 }
65 65
 
@@ -135,19 +135,19 @@  discard block
 block discarded – undo
135 135
                         <li>
136 136
                             <a href="<?php echo $settings['url'] ?>newDB">
137 137
                                 <i class="fa fa-fw fa-plus"></i>
138
-                                <span><?php echo $lang['new'] . ' ' . $lang['database'] ?></span>
138
+                                <span><?php echo $lang['new'].' '.$lang['database'] ?></span>
139 139
                             </a>
140 140
                         </li>
141 141
                         <li>
142 142
                             <a href="<?php echo $settings['url'] ?>newServer">
143 143
                                 <i class="fa fa-fw fa-plus"></i>
144
-                                <span><?php echo $lang['new'] . ' ' . $lang['server'] ?></span>
144
+                                <span><?php echo $lang['new'].' '.$lang['server'] ?></span>
145 145
                             </a>
146 146
                         </li>
147 147
                         <li>
148 148
                             <a href="<?php echo $settings['url'] ?>servers">
149 149
                                 <i class="fa fa-fw fa-cogs"></i>
150
-                                <span><?php echo $lang['edit'] . ' ' . $lang['databases'] ?></span>
150
+                                <span><?php echo $lang['edit'].' '.$lang['databases'] ?></span>
151 151
                             </a>
152 152
                         </li>
153 153
                         <li>
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
             <li>
171 171
                 <a data-toggle="modal" href="#changeDB">
172 172
                     <i class="fa fa-fw fa-cogs"></i>
173
-                    <span><?php echo $lang['database'] . 's' ?></span>
173
+                    <span><?php echo $lang['database'].'s' ?></span>
174 174
                 </a>
175 175
             </li>
176 176
             <?php } ?>
@@ -189,10 +189,10 @@  discard block
 block discarded – undo
189 189
     <section class="wrapper">
190 190
         <?php
191 191
         if (isset($error)) {
192
-            echo '<div style="margin-top: 120px;" class="alert alert-danger animated infinite bounce" role="alert">' . $error . '</div>';
192
+            echo '<div style="margin-top: 120px;" class="alert alert-danger animated infinite bounce" role="alert">'.$error.'</div>';
193 193
         }
194 194
         if (isset($message)) {
195
-            echo '<div style="margin-top: 120px;" class="alert alert-info animated infinite bounce" role="alert">' . $message . '</div>';
195
+            echo '<div style="margin-top: 120px;" class="alert alert-info animated infinite bounce" role="alert">'.$message.'</div>';
196 196
         }
197 197
         if (isset($page)) {
198 198
             include($page);
Please login to merge, or discard this patch.