@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | //require_once __DIR__."/../../lib/Db.php"; |
29 | 29 | //require_once __DIR__."/../../common/DAO/GameSubmissionDAO.php"; |
30 | 30 | |
31 | - if ($_SESSION['permission']==1 or $_SESSION['permission']=='1') { |
|
31 | + if ($_SESSION['permission'] == 1 or $_SESSION['permission'] == '1') { |
|
32 | 32 | //**************************************************************************************** |
33 | 33 | // This is where the submissions get "sent" to "done" |
34 | 34 | //**************************************************************************************** |
@@ -71,11 +71,11 @@ discard block |
||
71 | 71 | //require_once __DIR__."/../../lib/Db.php"; |
72 | 72 | //require_once __DIR__."/../../common/DAO/GameSubmissionDAO.php"; |
73 | 73 | |
74 | - if ($_SESSION['permission']==1 or $_SESSION['permission']=='1') { |
|
74 | + if ($_SESSION['permission'] == 1 or $_SESSION['permission'] == '1') { |
|
75 | 75 | if (isset($submit_id)) { |
76 | 76 | //Let's first check if this submission has screenshots. |
77 | 77 | $query_submit_screenshot = $mysqli->query("SELECT * FROM screenshot_game_submitinfo |
78 | - WHERE game_submitinfo_id = " . $submit_id . "") |
|
78 | + WHERE game_submitinfo_id = " . $submit_id."") |
|
79 | 79 | or die("something is wrong with mysqli of submissions screenshots"); |
80 | 80 | |
81 | 81 | while ($sql_submit_screenshot = $query_submit_screenshot->fetch_array(MYSQLI_BOTH)) { |
@@ -122,12 +122,12 @@ discard block |
||
122 | 122 | //require_once __DIR__."/../../lib/Db.php"; |
123 | 123 | //require_once __DIR__."/../../common/DAO/GameSubmissionDAO.php"; |
124 | 124 | |
125 | - if ($_SESSION['permission']==1 or $_SESSION['permission']=='1') { |
|
125 | + if ($_SESSION['permission'] == 1 or $_SESSION['permission'] == '1') { |
|
126 | 126 | if (isset($submit_id)) { |
127 | 127 | //Let's first check if this submission has screenshots. |
128 | 128 | //If so, it is not suited for movement to comment section! |
129 | 129 | $query_submit_screenshot = $mysqli->query("SELECT * FROM screenshot_game_submitinfo |
130 | - WHERE game_submitinfo_id = " . $submit_id . "") |
|
130 | + WHERE game_submitinfo_id = " . $submit_id."") |
|
131 | 131 | or die("something is wrong with mysqli of submissions screenshots"); |
132 | 132 | $v_rows = $query_submit_screenshot->num_rows; |
133 | 133 | |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | $message = "Submission has screenshots and is not suited for the comment section"; |
136 | 136 | } else { |
137 | 137 | $query_submit = $mysqli->query("SELECT * FROM game_submitinfo |
138 | - WHERE game_submitinfo_id = " . $submit_id . "") or die("something is wrong with mysqli"); |
|
138 | + WHERE game_submitinfo_id = " . $submit_id."") or die("something is wrong with mysqli"); |
|
139 | 139 | $sql_submit = $query_submit->fetch_array(MYSQLI_BOTH) or die("something is wrong with mysqli2"); |
140 | 140 | |
141 | 141 | $submit_text = $sql_submit['submit_text']; |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | $sql = $mysqli->query("INSERT INTO game_user_comments (game_id,comment_id) |
154 | 154 | VALUES ('$sub_game_id',LAST_INSERT_ID())") or die("something is wrong with INSERT mysql4"); |
155 | 155 | |
156 | - $sql = $mysqli->query("DELETE FROM game_submitinfo WHERE game_submitinfo_id = " . $submit_id . "") |
|
156 | + $sql = $mysqli->query("DELETE FROM game_submitinfo WHERE game_submitinfo_id = ".$submit_id."") |
|
157 | 157 | or die("couldn't delete game_submissions quote"); |
158 | 158 | |
159 | 159 | $message = "Submission converted to game comment"; |
@@ -88,7 +88,7 @@ |
||
88 | 88 | } |
89 | 89 | |
90 | 90 | //Send all smarty variables to the templates |
91 | -$smarty->display("file:" . $cpanel_template_folder . "games/submission_games.html"); |
|
91 | +$smarty->display("file:".$cpanel_template_folder."games/submission_games.html"); |
|
92 | 92 | |
93 | 93 | //close the connection |
94 | 94 | mysqli_close($mysqli); |
@@ -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); |
@@ -46,8 +46,8 @@ |
||
46 | 46 | $smarty->append( |
47 | 47 | 'facts_screenshots', |
48 | 48 | array('game_fact_id' => $sql_games_facts['game_fact_id'], |
49 | - 'screenshot_id' => $sql_screenshots_facts['screenshot_id'], |
|
50 | - 'game_fact_screenshot' => $new_path) |
|
49 | + 'screenshot_id' => $sql_screenshots_facts['screenshot_id'], |
|
50 | + 'game_fact_screenshot' => $new_path) |
|
51 | 51 | ); |
52 | 52 | } |
53 | 53 |
@@ -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); |