@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | |
| 12 | 12 | //We have the last logon time of each user in the user table. We need to compare this with the current time - 1 minute. |
| 13 | 13 | //So if the last log on time of the user is bigger than the current time - 1 minute, we can asume the user is online. |
| 14 | -$five_minutes = time()-(60*1); |
|
| 14 | +$five_minutes = time() - (60 * 1); |
|
| 15 | 15 | $nr_users = 0; |
| 16 | 16 | $nr_users_24 = 0; |
| 17 | 17 | |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | $smarty->assign('nr_users', $nr_users); |
| 32 | 32 | |
| 33 | 33 | //Now let's check who was online in the last 24 hours |
| 34 | -$twentyfour_hours = time()-(60*1440); |
|
| 34 | +$twentyfour_hours = time() - (60 * 1440); |
|
| 35 | 35 | |
| 36 | 36 | //Lets get all the data of the user who were online |
| 37 | 37 | $sql_users = $mysqli->query("SELECT * FROM users |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | $random_salt = hash('sha512', uniqid(mt_rand(1, mt_getrandmax()), true)); |
| 68 | 68 | |
| 69 | 69 | // Create salted password |
| 70 | - $update_password = hash('sha512', $password . $random_salt); |
|
| 70 | + $update_password = hash('sha512', $password.$random_salt); |
|
| 71 | 71 | |
| 72 | 72 | if ($update_stmt = $mysqli->prepare("UPDATE users |
| 73 | 73 | SET password=NULL, sha512_password=?, salt=?WHERE user_id=?")) { |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | $stmt->bind_result($user_id, $userid, $db_password, $salt, $permission, $avatar_ext, $inactive); |
| 110 | 110 | $stmt->fetch(); |
| 111 | 111 | // hash the password with the unique salt. |
| 112 | - $password = hash('sha512', $password . $salt); |
|
| 112 | + $password = hash('sha512', $password.$salt); |
|
| 113 | 113 | if ($stmt->num_rows == 1) { |
| 114 | 114 | // If the user exists we check if the account is locked |
| 115 | 115 | // from too many login attempts |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | $userid = preg_replace("/[^a-zA-Z0-9_\-]+/", "", $userid); |
| 132 | 132 | $_SESSION['userid'] = $userid; |
| 133 | 133 | $_SESSION['permission'] = $permission; |
| 134 | - $_SESSION['login_string'] = hash('sha512', $password . $user_browser); |
|
| 134 | + $_SESSION['login_string'] = hash('sha512', $password.$user_browser); |
|
| 135 | 135 | $_SESSION['image'] = $avatar_ext; |
| 136 | 136 | // Login successful. |
| 137 | 137 | return true; |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | // If the user exists get variables from result. |
| 234 | 234 | $stmt->bind_result($password); |
| 235 | 235 | $stmt->fetch(); |
| 236 | - $login_check = hash('sha512', $password . $user_browser); |
|
| 236 | + $login_check = hash('sha512', $password.$user_browser); |
|
| 237 | 237 | |
| 238 | 238 | if ($login_check == $login_string) { |
| 239 | 239 | // Logged In!!!! |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | //include("../../config/admin_rights.php"); /*--> We can not use it like this because of the ajax. |
| 24 | 24 | // redirecting does not work correctly with the inheritance of Ajax. |
| 25 | 25 | |
| 26 | -require_once __DIR__."/../../lib/Db.php" ; |
|
| 26 | +require_once __DIR__."/../../lib/Db.php"; |
|
| 27 | 27 | |
| 28 | 28 | if (isset($action) and $action == "stop") { |
| 29 | 29 | echo "test"; |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | //If we are uploading new screenshots |
| 38 | 38 | if (isset($action2) and $action2 == 'add_screens') { |
| 39 | - if ($_SESSION['permission']==1 or $_SESSION['permission']=='1') { |
|
| 39 | + if ($_SESSION['permission'] == 1 or $_SESSION['permission'] == '1') { |
|
| 40 | 40 | //Here we'll be looping on each of the inputs on the page that are filled in with an image! |
| 41 | 41 | $image = $_FILES['image']; |
| 42 | 42 | |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | $smarty->assign('interview_id', $interview_id); |
| 148 | 148 | |
| 149 | 149 | //Send to smarty for return value |
| 150 | - $smarty->display("file:" . $cpanel_template_folder . "interviews/ajax_interview_add_screenshots.html"); |
|
| 150 | + $smarty->display("file:".$cpanel_template_folder."interviews/ajax_interview_add_screenshots.html"); |
|
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | //************************************************************************* |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | |
| 204 | 204 | //If the delete comment has been triggered |
| 205 | 205 | if (isset($action) and $action == 'delete_screenshot_comment') { |
| 206 | - if ($_SESSION['permission']==1 or $_SESSION['permission']=='1') { |
|
| 206 | + if ($_SESSION['permission'] == 1 or $_SESSION['permission'] == '1') { |
|
| 207 | 207 | $sql_interviewshot = $mysqli->query("SELECT * FROM screenshot_interview |
| 208 | 208 | WHERE interview_id = $interview_id |
| 209 | 209 | AND screenshot_id = $screenshot_id") or die("Database error - selecting screenshots interview"); |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | $smarty->assign('interview_id', $interview_id); |
| 284 | 284 | |
| 285 | 285 | //Send to smarty for return value |
| 286 | - $smarty->display("file:" . $cpanel_template_folder . "interviews/ajax_interview_add_screenshots.html"); |
|
| 286 | + $smarty->display("file:".$cpanel_template_folder."interviews/ajax_interview_add_screenshots.html"); |
|
| 287 | 287 | } |
| 288 | 288 | |
| 289 | 289 | //************************************************************************* |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | 'interview_chapters' => $interview['interview_chapters'], |
| 67 | 67 | 'interview_text' => $interview['interview_text'], |
| 68 | 68 | 'interview_ind_name' => $interview['ind_name'], |
| 69 | - 'interview_author' => $author_id , |
|
| 69 | + 'interview_author' => $author_id, |
|
| 70 | 70 | 'interview_author_name' => $interview['userid'], |
| 71 | 71 | 'interview_ind_id' => $interview['ind_id'], |
| 72 | 72 | 'interview_draft' => $interview['draft'], |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | $smarty->assign("user_id", $_SESSION['user_id']); |
| 111 | 111 | |
| 112 | 112 | //Send all smarty variables to the templates |
| 113 | -$smarty->display("file:" . $cpanel_template_folder . "interviews/interviews_edit.html"); |
|
| 113 | +$smarty->display("file:".$cpanel_template_folder."interviews/interviews_edit.html"); |
|
| 114 | 114 | |
| 115 | 115 | //close the connection |
| 116 | 116 | mysqli_close($mysqli); |
@@ -21,8 +21,8 @@ discard block |
||
| 21 | 21 | "Downloads" => array("Crew", "Details", "TOS"), |
| 22 | 22 | "Format" => array("Format"), |
| 23 | 23 | "Game series" => array("Game", "Series"), |
| 24 | - "Games" => array("AKA", "Box back", "Box front", "Comment","Creator", |
|
| 25 | - "Developer", "Fact", "File", "Mag score", "Music","Game", "Publisher", |
|
| 24 | + "Games" => array("AKA", "Box back", "Box front", "Comment", "Creator", |
|
| 25 | + "Developer", "Fact", "File", "Mag score", "Music", "Game", "Publisher", |
|
| 26 | 26 | "Review", "Review comment", "Screenshot", "Similar", "Submission", "Year", |
| 27 | 27 | "Release", "Sound hardware", "Video" |
| 28 | 28 | ), |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | $this->id = $id; |
| 70 | 70 | |
| 71 | 71 | // Check if the section is valid |
| 72 | - if (! array_key_exists($section, self::SECTIONS)) { |
|
| 72 | + if (!array_key_exists($section, self::SECTIONS)) { |
|
| 73 | 73 | die("Unknown section '$section'. Only " |
| 74 | 74 | .join(", ", array_keys(self::SECTIONS))." are supported"); |
| 75 | 75 | } |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | $this->section_value = $section_value; |
| 79 | 79 | |
| 80 | 80 | // Check is the sub-section is valid for the section |
| 81 | - if (! in_array($sub_section, self::SECTIONS[$section])) { |
|
| 81 | + if (!in_array($sub_section, self::SECTIONS[$section])) { |
|
| 82 | 82 | die("Unknown sub-section '$sub_section'. Only " |
| 83 | 83 | .join(", ", self::SECTIONS[$section])." are supported for $section"); |
| 84 | 84 | } |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | $this->user_id = $user_id; |
| 90 | 90 | |
| 91 | 91 | // Check if the action is valid |
| 92 | - if (! in_array($action, self::ACTIONS)) { |
|
| 92 | + if (!in_array($action, self::ACTIONS)) { |
|
| 93 | 93 | die("Unknown action '$action'. Only ".self::ACTIONS." are supported"); |
| 94 | 94 | } |
| 95 | 95 | $this->action = $action; |