Completed
Push — master ( 3d3b9a...9e5156 )
by Sam
14s
created
views/core/curPlayers.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@  discard block
 block discarded – undo
1 1
 <?php
2
-$sql = "SELECT `sid` FROM `servers` WHERE `use_sq` = 1 AND `sid` = " . $sid . ";";
2
+$sql = "SELECT `sid` FROM `servers` WHERE `use_sq` = 1 AND `sid` = ".$sid.";";
3 3
 $result_of_query = $db_connection->query($sql);
4 4
 if ($result_of_query->num_rows == 1) { ?>
5 5
 <div class="row">
6 6
     <div class="col-lg-12">
7 7
         <h1 class="page-header">
8 8
             <?php echo $lang['players']; ?>
9
-            <small><?php echo " " . $lang['overview']; ?></small>
9
+            <small><?php echo " ".$lang['overview']; ?></small>
10 10
         </h1>
11 11
     </div>
12 12
 </div>
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 }
28 28
 function getPlayers() {
29 29
     $.ajax({
30
-        url: "<?php echo $settings['url'] . 'hooks/rcon_players.php?sid=' . $sid ?>",
30
+        url: "<?php echo $settings['url'].'hooks/rcon_players.php?sid='.$sid ?>",
31 31
         dataType: 'json',
32 32
         complete: function(data) {
33 33
             console.log(data);
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	<div class="content-panel">
54 54
 		<table class="table table-striped table-advance table-hover">
55 55
 			<h4>
56
-				<i class="fa fa-child fa-fw"></i><?php echo " " . $lang['players']; ?>
56
+				<i class="fa fa-child fa-fw"></i><?php echo " ".$lang['players']; ?>
57 57
 				<div style="float:right; padding-right: 20px;" id="count"></div>
58 58
 			</h4>
59 59
 			<hr>
Please login to merge, or discard this patch.
classes/csrf.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
      */
17 17
     public static function getField()
18 18
     {
19
-        return "<input name='token' value='" . $_SESSION['formtoken'][0] . "' type='hidden' />";
19
+        return "<input name='token' value='".$_SESSION['formtoken'][0]."' type='hidden' />";
20 20
     }
21 21
 
22 22
         /**
Please login to merge, or discard this patch.
classes/update.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
     $lang = array('English', 'en');
7 7
     array_push($settings['installedLanguage'], $lang);
8 8
     $settings['version'] = 0.3;
9
-    file_put_contents('config/settings.php', '<?php return ' . var_export($settings, true) . ';');
9
+    file_put_contents('config/settings.php', '<?php return '.var_export($settings, true).';');
10 10
     $updated = true;
11 11
 }
12 12
 if ($settings['version'] < 0.4) {
@@ -17,8 +17,8 @@  discard block
 block discarded – undo
17 17
     $settings['2factor'] = true;
18 18
     $settings['force2factor'] = 'none';
19 19
     $settings['version'] = 0.4;
20
-    $settings['item'] = array(5,10,15,25,50);
21
-    file_put_contents('config/settings.php', '<?php return ' . var_export($settings, true) . ';');
20
+    $settings['item'] = array(5, 10, 15, 25, 50);
21
+    file_put_contents('config/settings.php', '<?php return '.var_export($settings, true).';');
22 22
     $updated = true;
23 23
 }
24 24
 if (isset($updated)) {
Please login to merge, or discard this patch.
classes/GuestReg.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
                 $user_password_hash = password_hash($user_password, PASSWORD_DEFAULT);
96 96
 
97 97
                 // check if user or email address already exists
98
-                $sql = "SELECT * FROM `users` WHERE `user_name` = '" . $user_name . "' OR `user_email = '" . $user_email . "';";
98
+                $sql = "SELECT * FROM `users` WHERE `user_name` = '".$user_name."' OR `user_email = '".$user_email."';";
99 99
                 $query_check_user_name = $this->db_connection->query($sql);
100 100
 
101 101
                 if ($query_check_user_name->num_rows == 1) {
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
                     // write new user's data into database
110 110
                         $sql = "INSERT INTO `users` (`user_name`, `user_password_hash`, `user_email`, `playerid`, `user_level`, `permissions`, `user_profile`) VALUES
111
-                    ('" . $user_name . "', '" . $user_password_hash . "', '" . $user_email . "', '" . $_SESSION['playerid'] . "', '1', '" . $userPerms . "', '1');";
111
+                    ('" . $user_name."', '".$user_password_hash."', '".$user_email."', '".$_SESSION['playerid']."', '1', '".$userPerms."', '1');";
112 112
 
113 113
                     $query_new_user_insert = $this->db_connection->query($sql);
114 114
 
Please login to merge, or discard this patch.
validators/newUser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
         case 'email':
14 14
             if (isset($_POST['user_email'])) {
15 15
                 $email = $_POST['user_email'];
16
-                $sql = "SELECT `user_id` FROM `users` WHERE `user_email` = '" . $email . "';";
16
+                $sql = "SELECT `user_id` FROM `users` WHERE `user_email` = '".$email."';";
17 17
                 $result_of_query = $db_connection->query($sql);
18 18
                 if (mysqli_num_rows($result_of_query) == 1) {
19 19
                     $isAvailable = false;
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
         case 'username':
28 28
             if (isset($_POST['user_name'])) {
29 29
                 $username = $_POST['user_name'];
30
-                $sql = "SELECT `user_id` FROM `users` WHERE `user_name` = '" . $username . "';";
30
+                $sql = "SELECT `user_id` FROM `users` WHERE `user_name` = '".$username."';";
31 31
                 $result_of_query = $db_connection->query($sql);
32 32
                 if (mysqli_num_rows($result_of_query) == 1) {
33 33
                     $isAvailable = false;
Please login to merge, or discard this patch.
validators/newServer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
     switch ($_POST['type']) {
13 13
         case 'username':
14 14
             $username = clean($_POST['server_name'], 'string');
15
-            $sql = "SELECT `name` FROM `servers` WHERE `name` = '" . $username . "'";
15
+            $sql = "SELECT `name` FROM `servers` WHERE `name` = '".$username."'";
16 16
             $result_of_query = $db_connection->query($sql);
17 17
             if (mysqli_num_rows($result_of_query) == 1) {
18 18
                 $isAvailable = false;
Please login to merge, or discard this patch.
validators/pass.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
     if (isset($_POST['current_password'])) {
9 9
         $db_connection = masterConnect();
10 10
         $isAvailable = false;
11
-        $sql = "SELECT `user_password_hash` FROM `users` WHERE `user_name` = '" . $_SESSION['user_name'] . "' ";
11
+        $sql = "SELECT `user_password_hash` FROM `users` WHERE `user_name` = '".$_SESSION['user_name']."' ";
12 12
         $user = $db_connection->query($sql)->fetch_object();
13 13
         if (password_verify($_POST['current_password'], $user->user_password_hash)) {
14 14
             $isAvailable = true;
Please login to merge, or discard this patch.
hooks/license.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -3,31 +3,31 @@
 block discarded – undo
3 3
 session_set_cookie_params(1209600);
4 4
 session_start();
5 5
 
6
-include_once( __DIR__ . '/../config/english.php');
6
+include_once(__DIR__.'/../config/english.php');
7 7
 
8 8
 if (isset($_SESSION['permissions']['edit']['licences'])) {
9 9
     if ($_SESSION['permissions']['edit']['licences'] && isset($_POST['player']) && isset($_POST['id'])) {
10
-        require_once( __DIR__ . '/../gfunctions.php');
11
-        require_once( __DIR__ . '/../config/license.php');
12
-        $settings = require( __DIR__ . '/../config/settings.php');
10
+        require_once(__DIR__.'/../gfunctions.php');
11
+        require_once(__DIR__.'/../config/license.php');
12
+        $settings = require(__DIR__.'/../config/settings.php');
13 13
         if (isset($_SESSION['dbid'])) {
14 14
             $db_link = serverConnect($_SESSION['dbid']);
15 15
     
16 16
             $change = explode("_", $_POST['id']);
17
-            $col = $change['1'] . "_licenses";
18
-            $sql = "SELECT `" . $col . "` FROM `players` WHERE `uid` = '" . $_POST['player'] . "';"; //todo: innerjoin
17
+            $col = $change['1']."_licenses";
18
+            $sql = "SELECT `".$col."` FROM `players` WHERE `uid` = '".$_POST['player']."';"; //todo: innerjoin
19 19
             $result = $db_link->query($sql);
20 20
             if ($result->num_rows > 0) {
21 21
                 $lic = $result->fetch_object()->$col;
22 22
                 $num = strpos($lic, $change['2']) + strlen($change['2']) + 2;
23 23
                 if ($lic[$num] == '1') {
24 24
                     $lic[$num] = '0';
25
-                    logAction($_SESSION['user_name'], $lang['removed'] . ' ' . uIDname($_POST['player'], $db_link) . ' ' . $lang['licenses'] . ' (has removed ' . licName($_POST['id'], $license) . ')', 2);
25
+                    logAction($_SESSION['user_name'], $lang['removed'].' '.uIDname($_POST['player'], $db_link).' '.$lang['licenses'].' (has removed '.licName($_POST['id'], $license).')', 2);
26 26
                 } elseif ($lic[$num] == '0') {
27 27
                     $lic[$num] = '1';
28
-                    logAction($_SESSION['user_name'], $lang['added'] . ' ' . uIDname($_POST['player'], $db_link) . ' ' . $lang['licenses'] . ' (has added ' . licName($_POST['id'], $license) . ')', 2);
28
+                    logAction($_SESSION['user_name'], $lang['added'].' '.uIDname($_POST['player'], $db_link).' '.$lang['licenses'].' (has added '.licName($_POST['id'], $license).')', 2);
29 29
                 }
30
-                $sql = "UPDATE `players` SET `" . $col . "`='$lic' WHERE `uid` = '" . $_POST['player'] . "';";
30
+                $sql = "UPDATE `players` SET `".$col."`='$lic' WHERE `uid` = '".$_POST['player']."';";
31 31
                 $db_link->query($sql);
32 32
             }
33 33
         }
Please login to merge, or discard this patch.
hooks/arrest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,26 +11,26 @@
 block discarded – undo
11 11
             $db_link = serverConnect($_SESSION['dbid']);
12 12
 
13 13
             if ($_POST['id'] == 'arrested') {
14
-                $sql = "SELECT `arrested` FROM `players` WHERE `uid` = '" . $_POST['player'] . "';";
14
+                $sql = "SELECT `arrested` FROM `players` WHERE `uid` = '".$_POST['player']."';";
15 15
                 $result = $db_link->query($sql);
16 16
                 if ($result->num_rows > 0) {
17 17
                     $switch = $result->fetch_object();
18 18
                     if ($switch->arrested == '1') {
19
-                        $sql = "UPDATE `players` SET `arrested`='0' WHERE `uid` = '" . $_POST['player'] . "';";
19
+                        $sql = "UPDATE `players` SET `arrested`='0' WHERE `uid` = '".$_POST['player']."';";
20 20
                     } elseif ($switch->arrested == '0') {
21
-                        $sql = "UPDATE `players` SET `arrested`='1' WHERE `uid` = '" . $_POST['player'] . "';";
21
+                        $sql = "UPDATE `players` SET `arrested`='1' WHERE `uid` = '".$_POST['player']."';";
22 22
                     }
23 23
                     $db_link->query($sql);
24 24
                 }
25 25
             } elseif ($_POST['id'] == 'blacklist') {
26
-                $sql = "SELECT `blacklist` FROM `players` WHERE `uid` = '" . $_POST['player'] . "';";
26
+                $sql = "SELECT `blacklist` FROM `players` WHERE `uid` = '".$_POST['player']."';";
27 27
                 $result = $db_link->query($sql);
28 28
                 if ($result->num_rows > 0) {
29 29
                     $switch = $result->fetch_object();
30 30
                     if ($switch->blacklist == '1') {
31
-                        $sql = "UPDATE `players` SET `blacklist`='0' WHERE `uid` = '" . $_POST['player'] . "';";
31
+                        $sql = "UPDATE `players` SET `blacklist`='0' WHERE `uid` = '".$_POST['player']."';";
32 32
                     } elseif ($switch->blacklist == '0') {
33
-                        $sql = "UPDATE `players` SET `blacklist`='1' WHERE `uid` = '" . $_POST['player'] . "';";
33
+                        $sql = "UPDATE `players` SET `blacklist`='1' WHERE `uid` = '".$_POST['player']."';";
34 34
                     }
35 35
                     $db_link->query($sql);
36 36
                 }
Please login to merge, or discard this patch.