Passed
Push — master ( d0aeb4...d92c88 )
by Nicolas
07:53
created
public/php/admin/user/db_user_management.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
             $sql = $mysqli->query("DELETE FROM users WHERE user_id = '$user' ") or die("error deleting user");
54 54
             $i++;
55 55
         }
56
-        $time_elapsed_secs        = microtime(true) - $start;
56
+        $time_elapsed_secs = microtime(true) - $start;
57 57
         $edit_message = "$i User(s) deleted succesfully";
58 58
     } else {
59 59
         $edit_message = 'Please SELECT a user you want to delete';
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
                 or die("error updating user");
139 139
             $i++;
140 140
         }
141
-        $time_elapsed_secs        = microtime(true) - $start;
141
+        $time_elapsed_secs = microtime(true) - $start;
142 142
         $edit_message = 'User(s) updated';
143 143
     } else {
144 144
         $edit_message = 'Please SELECT a user you want to deactivate';
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
                 or die("error updating user");
173 173
             $i++;
174 174
         }
175
-        $time_elapsed_secs        = microtime(true) - $start;
175
+        $time_elapsed_secs = microtime(true) - $start;
176 176
         $edit_message = 'User(s) updated';
177 177
     } else {
178 178
         $edit_message = 'Please SELECT a user you want to activate';
Please login to merge, or discard this patch.
public/php/admin/user/db_user.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -138,12 +138,12 @@  discard block
 block discarded – undo
138 138
     //$_SESSION['edit_message'] = "Password reset";
139 139
 
140 140
     //Admins can change pwd's for everyone - the current pwd field is not necessary
141
-    if ($_SESSION['permission']==1) {
141
+    if ($_SESSION['permission'] == 1) {
142 142
         //add the new password
143 143
         $md5pass = hash('md5', $_POST['user_new_pwd']); // The md5 hashed password.
144 144
         $sha512 = hash('sha512', $_POST['user_new_pwd']); // The hashed password.
145
-        $random_salt = hash('sha512', uniqid(mt_rand(1, mt_getrandmax()), true));//create random salt
146
-        $update_password = hash('sha512', $sha512 . $random_salt); // Create salted password
145
+        $random_salt = hash('sha512', uniqid(mt_rand(1, mt_getrandmax()), true)); //create random salt
146
+        $update_password = hash('sha512', $sha512.$random_salt); // Create salted password
147 147
 
148 148
         $mysqli->query("UPDATE users SET password='$md5pass',
149 149
             sha512_password = '$update_password',
@@ -187,8 +187,8 @@  discard block
 block discarded – undo
187 187
                 //add the new password
188 188
                 $md5pass = hash('md5', $_POST['user_new_pwd']); // The md5 hashed password.
189 189
                 $sha512 = hash('sha512', $_POST['user_new_pwd']); // The hashed password.
190
-                $random_salt = hash('sha512', uniqid(mt_rand(1, mt_getrandmax()), true));//create random salt
191
-                $update_password = hash('sha512', $sha512 . $random_salt); // Create salted password
190
+                $random_salt = hash('sha512', uniqid(mt_rand(1, mt_getrandmax()), true)); //create random salt
191
+                $update_password = hash('sha512', $sha512.$random_salt); // Create salted password
192 192
 
193 193
                 $mysqli->query("UPDATE users SET password='$md5pass',
194 194
                     sha512_password = '$update_password',
@@ -258,12 +258,12 @@  discard block
 block discarded – undo
258 258
         $user_show_email = '0';
259 259
     }
260 260
 
261
-    if (isset($_POST['pmd5']) &&  $_POST['pmd5'] != '' && isset($_POST['p']) && $_POST['p'] != '') {
261
+    if (isset($_POST['pmd5']) && $_POST['pmd5'] != '' && isset($_POST['p']) && $_POST['p'] != '') {
262 262
         $user_name = $mysqli->real_escape_string($user_name);
263 263
         $md5pass = $_POST['pmd5']; // The md5 hashed password.
264 264
         $sha512 = $_POST['p']; // The hashed password.
265
-        $random_salt = hash('sha512', uniqid(mt_rand(1, mt_getrandmax()), true));//create random salt
266
-        $update_password = hash('sha512', $sha512 . $random_salt); // Create salted password
265
+        $random_salt = hash('sha512', uniqid(mt_rand(1, mt_getrandmax()), true)); //create random salt
266
+        $update_password = hash('sha512', $sha512.$random_salt); // Create salted password
267 267
 
268 268
         $mysqli->query("UPDATE users SET userid='$user_name', password='$md5pass',
269 269
             sha512_password='$update_password', salt='$random_salt',
Please login to merge, or discard this patch.
public/php/admin/user/user_statistics.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 mysqli_free_result($sql);
112 112
 
113 113
 // START - NUMBER OF reviews
114
-$sql        = $mysqli->query("SELECT * FROM review_main
114
+$sql = $mysqli->query("SELECT * FROM review_main
115 115
                     LEFT JOIN review_game ON (review_main.review_id = review_game.review_id)
116 116
                     LEFT JOIN game ON ( review_game.game_id = game.game_id )
117 117
                     WHERE review_main.user_id = $user_id_selected");
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 $smarty->assign('user_id_selected', $user_id_selected);
199 199
 
200 200
 //Send all smarty variables to the templates
201
-$smarty->display("file:" . $cpanel_template_folder . "user/user_statistics.html");
201
+$smarty->display("file:".$cpanel_template_folder."user/user_statistics.html");
202 202
 
203 203
 //close the connection
204 204
 mysqli_close($mysqli);
Please login to merge, or discard this patch.
public/php/admin/user/user_management.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -238,4 +238,4 @@
 block discarded – undo
238 238
 $smarty->assign('nr_users_total', $v_rows);
239 239
 
240 240
 //Send all smarty variables to the templates
241
-$smarty->display("file:" . $cpanel_template_folder . "user/user_management.html");
241
+$smarty->display("file:".$cpanel_template_folder."user/user_management.html");
Please login to merge, or discard this patch.
public/php/admin/user/ajax_user_management.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@
 block discarded – undo
12 12
  *           - user search field now working
13 13
  *
14 14
  ***************************************************************************/
15
- include("../../config/common.php");
16
- include("../../admin/games/quick_search_games.php");
17
- include("../../config/admin.php");
15
+    include("../../config/common.php");
16
+    include("../../admin/games/quick_search_games.php");
17
+    include("../../config/admin.php");
18 18
 
19 19
 $start = microtime(true);
20 20
 $last_visit_timestamp = date_to_timestamp($Date_Year, $Date_Month, $Date_Day);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -160,4 +160,4 @@
 block discarded – undo
160 160
 $smarty->assign("query_time", $time_elapsed_secs);
161 161
 
162 162
 //Send all smarty variables to the templates
163
-$smarty->display("file:" . $cpanel_template_folder . "user/ajax_user_management.html");
163
+$smarty->display("file:".$cpanel_template_folder."user/ajax_user_management.html");
Please login to merge, or discard this patch.
public/php/admin/user/karma_sync.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@
 block discarded – undo
129 129
 }
130 130
 
131 131
 //Send all smarty variables to the templates
132
-$smarty->display("file:" . $cpanel_template_folder . "user/user_karmasync.html");
132
+$smarty->display("file:".$cpanel_template_folder."user/user_karmasync.html");
133 133
 
134 134
 //close the connection
135 135
 mysqli_close($mysqli);
Please login to merge, or discard this patch.
public/php/admin/user/user_detail.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
 }
64 64
 
65 65
 //Send all smarty variables to the templates
66
-$smarty->display("file:" . $cpanel_template_folder . "user/user_detail.html");
66
+$smarty->display("file:".$cpanel_template_folder."user/user_detail.html");
67 67
 
68 68
 //close the connection
69 69
 mysqli_close($mysqli);
Please login to merge, or discard this patch.
public/php/admin/company/company_main.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
 $smarty->assign("user_id", $_SESSION['user_id']);
39 39
 
40 40
 //Send all smarty variables to the templates
41
-$smarty->display("file:" . $cpanel_template_folder . "company/company_main.html");
41
+$smarty->display("file:".$cpanel_template_folder."company/company_main.html");
42 42
 
43 43
 //close the connection
44 44
 mysqli_close($mysqli);
Please login to merge, or discard this patch.
public/php/admin/company/company_edit.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
     $smarty->assign("user_id", $_SESSION['user_id']);
75 75
 
76 76
     //Send all smarty variables to the templates
77
-    $smarty->display("file:" . $cpanel_template_folder . "company/company_edit.html");
77
+    $smarty->display("file:".$cpanel_template_folder."company/company_edit.html");
78 78
 }
79 79
 
80 80
 //close the connection
Please login to merge, or discard this patch.