@@ -31,7 +31,7 @@ |
||
31 | 31 | $smarty->assign("message", $_SESSION['edit_message']); |
32 | 32 | } |
33 | 33 | |
34 | -$smarty->display("file:" . $cpanel_template_folder . "games/games_main.html"); |
|
34 | +$smarty->display("file:".$cpanel_template_folder."games/games_main.html"); |
|
35 | 35 | |
36 | 36 | //close the connection |
37 | 37 | mysqli_close($mysqli); |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | $gameDao = new \AL\Common\DAO\GameDAO($mysqli); |
22 | 22 | $smarty->assign('game', $gameDao->getGame($game_id)); |
23 | 23 | |
24 | -$i=0; |
|
24 | +$i = 0; |
|
25 | 25 | |
26 | 26 | //load the fact for this games |
27 | 27 | $query_games_facts = $mysqli->query("SELECT * from game_fact |
@@ -71,4 +71,4 @@ discard block |
||
71 | 71 | $smarty->assign('game_id', $game_id); |
72 | 72 | |
73 | 73 | //Send all smarty variables to the templates |
74 | -$smarty->display("file:" . $cpanel_template_folder . "games/games_facts.html"); |
|
74 | +$smarty->display("file:".$cpanel_template_folder."games/games_facts.html"); |
@@ -287,7 +287,7 @@ |
||
287 | 287 | //*********************************************************************************** |
288 | 288 | if (isset($action) && ($action == 'add_memory_enhancement')) { |
289 | 289 | if ($memory_enhancement == '') { |
290 | - $memory_enhancement=null; |
|
290 | + $memory_enhancement = null; |
|
291 | 291 | } |
292 | 292 | |
293 | 293 | $memoryDao->setMemoryForRelease($release_id, $memory_id, $memory_enhancement); |
@@ -23,4 +23,4 @@ |
||
23 | 23 | $smarty->assign('changelog', $changeLogDao->getChangeLogForSection('Games')); |
24 | 24 | |
25 | 25 | //Send all smarty variables to the templates |
26 | -$smarty->display("file:" . $cpanel_template_folder . "tiles/ajax_shortlog.html"); |
|
26 | +$smarty->display("file:".$cpanel_template_folder."tiles/ajax_shortlog.html"); |
@@ -53,7 +53,7 @@ discard block |
||
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 |
||
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 |
||
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'; |
@@ -138,12 +138,12 @@ discard block |
||
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 |
||
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 |
||
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', |
@@ -111,7 +111,7 @@ discard block |
||
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 |
||
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); |
@@ -238,4 +238,4 @@ |
||
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"); |
@@ -160,4 +160,4 @@ |
||
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"); |