@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace AL\Common\DAO; |
| 3 | 3 | |
| 4 | -require_once __DIR__."/../../lib/Db.php" ; |
|
| 5 | -require_once __DIR__."/../Model/Game/Memory.php" ; |
|
| 6 | -require_once __DIR__."/../Model/Game/Enhancement.php" ; |
|
| 4 | +require_once __DIR__."/../../lib/Db.php"; |
|
| 5 | +require_once __DIR__."/../Model/Game/Memory.php"; |
|
| 6 | +require_once __DIR__."/../Model/Game/Enhancement.php"; |
|
| 7 | 7 | |
| 8 | 8 | /** |
| 9 | 9 | * DAO for memory |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace AL\Common\DAO; |
| 3 | 3 | |
| 4 | -require_once __DIR__."/../../lib/Db.php" ; |
|
| 5 | -require_once __DIR__."/../Model/Dump/Media.php" ; |
|
| 6 | -require_once __DIR__."/../Model/Dump/MediaType.php" ; |
|
| 4 | +require_once __DIR__."/../../lib/Db.php"; |
|
| 5 | +require_once __DIR__."/../Model/Dump/Media.php"; |
|
| 6 | +require_once __DIR__."/../Model/Dump/MediaType.php"; |
|
| 7 | 7 | |
| 8 | 8 | /** |
| 9 | 9 | * DAO for Media |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace AL\Common\DAO; |
| 3 | 3 | |
| 4 | -require_once __DIR__."/../../lib/Db.php" ; |
|
| 5 | -require_once __DIR__."/../Model/Game/Emulator.php" ; |
|
| 4 | +require_once __DIR__."/../../lib/Db.php"; |
|
| 5 | +require_once __DIR__."/../Model/Game/Emulator.php"; |
|
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * DAO for Emulators |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace AL\Common\DAO; |
| 3 | 3 | |
| 4 | -require_once __DIR__."/../../lib/Db.php" ; |
|
| 5 | -require_once __DIR__."/../Model/Game/System.php" ; |
|
| 6 | -require_once __DIR__."/../Model/Game/Enhancement.php" ; |
|
| 4 | +require_once __DIR__."/../../lib/Db.php"; |
|
| 5 | +require_once __DIR__."/../Model/Game/System.php"; |
|
| 6 | +require_once __DIR__."/../Model/Game/Enhancement.php"; |
|
| 7 | 7 | |
| 8 | 8 | /** |
| 9 | 9 | * DAO for systems |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace AL\Common\DAO; |
| 3 | 3 | |
| 4 | -require_once __DIR__."/../../lib/Db.php" ; |
|
| 5 | -require_once __DIR__."/../Model/Dump/MediaType.php" ; |
|
| 4 | +require_once __DIR__."/../../lib/Db.php"; |
|
| 5 | +require_once __DIR__."/../Model/Dump/MediaType.php"; |
|
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * DAO for Media Type |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace AL\Common\DAO; |
| 3 | 3 | |
| 4 | -require_once __DIR__."/../../lib/Db.php" ; |
|
| 5 | -require_once __DIR__."/../Model/Game/Resolution.php" ; |
|
| 4 | +require_once __DIR__."/../../lib/Db.php"; |
|
| 5 | +require_once __DIR__."/../Model/Game/Resolution.php"; |
|
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * DAO for resolutions |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace AL\Common\DAO; |
| 3 | 3 | |
| 4 | -require_once __DIR__."/../../lib/Db.php" ; |
|
| 5 | -require_once __DIR__."/../Model/Game/Control.php" ; |
|
| 4 | +require_once __DIR__."/../../lib/Db.php"; |
|
| 5 | +require_once __DIR__."/../Model/Game/Control.php"; |
|
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * DAO for game controls |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | //$params = session_get_cookie_params(); |
| 28 | 28 | |
| 29 | 29 | // Delete the actual cookie. |
| 30 | -setcookie("cooksession", session_id(), time()-60*60*24*100, "/"); |
|
| 30 | +setcookie("cooksession", session_id(), time() - 60 * 60 * 24 * 100, "/"); |
|
| 31 | 31 | |
| 32 | 32 | // Destroy session |
| 33 | 33 | session_destroy(); |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | header('Location: ../../main/front/front.php'); |
| 38 | 38 | } else { |
| 39 | 39 | $_SESSION['edit_message'] = "Log out succesfull"; |
| 40 | - header('Location: ' . $_SERVER['HTTP_REFERER']); |
|
| 40 | + header('Location: '.$_SERVER['HTTP_REFERER']); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | mysql_close(); |
@@ -18,8 +18,8 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | include("../../config/common.php"); |
| 20 | 20 | |
| 21 | -require_once __DIR__."/../../common/Model/Database/ChangeLog.php" ; |
|
| 22 | -require_once __DIR__."/../../common/DAO/ChangeLogDAO.php" ; |
|
| 21 | +require_once __DIR__."/../../common/Model/Database/ChangeLog.php"; |
|
| 22 | +require_once __DIR__."/../../common/DAO/ChangeLogDAO.php"; |
|
| 23 | 23 | |
| 24 | 24 | use PHPMailer\PHPMailer\PHPMailer; |
| 25 | 25 | |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | } else { |
| 36 | 36 | //check if the email addres is valid |
| 37 | 37 | if (!filter_var($_POST["email"], FILTER_VALIDATE_EMAIL)) { |
| 38 | - $_SESSION['edit_message'] = "Invalid email format"; |
|
| 38 | + $_SESSION['edit_message'] = "Invalid email format"; |
|
| 39 | 39 | header("Location: ../../main/front/front.php?action=reset"); |
| 40 | 40 | } else { |
| 41 | 41 | //check if email address exists in DB |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | $number = $query_rows->num_rows; |
| 44 | 44 | |
| 45 | 45 | if ($number == 0) { |
| 46 | - $_SESSION['edit_message'] = "There is no user with this email address in our DB - " |
|
| 46 | + $_SESSION['edit_message'] = "There is no user with this email address in our DB - " |
|
| 47 | 47 | ."Please contact the admins"; |
| 48 | 48 | header("Location: ../../main/front/front.php?action=reset"); |
| 49 | 49 | } else { //lets create an email |
@@ -100,9 +100,9 @@ discard block |
||
| 100 | 100 | $mailbody = "Dear user,\n\nIf this e-mail does not apply to you please ignore it. It appears that " |
| 101 | 101 | ."you have requested a password reset at our website www.atarilegend.com\n\nTo reset your password," |
| 102 | 102 | ." please click the link below. If you cannot click it, please paste it into your web browser's " |
| 103 | - ."address bar.\n\n" . $pwrurl . "\n\nThanks,\nTEAM AL"; |
|
| 103 | + ."address bar.\n\n".$pwrurl."\n\nThanks,\nTEAM AL"; |
|
| 104 | 104 | |
| 105 | - $mail->Body = $mailbody; |
|
| 105 | + $mail->Body = $mailbody; |
|
| 106 | 106 | |
| 107 | 107 | try { |
| 108 | 108 | $mail->send(); |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | |
| 131 | 131 | //check if the email addres is valid |
| 132 | 132 | if (!filter_var($_POST["email"], FILTER_VALIDATE_EMAIL)) { |
| 133 | - $_SESSION['edit_message'] = "Invalid email format"; |
|
| 133 | + $_SESSION['edit_message'] = "Invalid email format"; |
|
| 134 | 134 | header("Location: ../../main/front/front.php?action=new_pwd&q=$hash"); |
| 135 | 135 | } else { |
| 136 | 136 | //check if email address exists in DB |
@@ -138,12 +138,12 @@ discard block |
||
| 138 | 138 | $number = $query_rows->num_rows; |
| 139 | 139 | |
| 140 | 140 | if ($number == 0) { |
| 141 | - $_SESSION['edit_message'] = "There is no user with this email address in our DB - " |
|
| 141 | + $_SESSION['edit_message'] = "There is no user with this email address in our DB - " |
|
| 142 | 142 | ."Please contact the admins"; |
| 143 | 143 | header("Location: ../../main/front/front.php?action=new_pwd&q=$hash"); |
| 144 | 144 | } else { |
| 145 | 145 | if ($password != $confirmpassword) { |
| 146 | - $_SESSION['edit_message'] = "The passwords you entered are not the same - please try again"; |
|
| 146 | + $_SESSION['edit_message'] = "The passwords you entered are not the same - please try again"; |
|
| 147 | 147 | header("Location: ../../main/front/front.php?action=new_pwd&q=$hash"); |
| 148 | 148 | } else { |
| 149 | 149 | //get the userid |
@@ -157,13 +157,13 @@ discard block |
||
| 157 | 157 | // Does the new reset key match the old one? |
| 158 | 158 | if ($resetkey == $hash) { |
| 159 | 159 | //now check if this hash exists |
| 160 | - $twentyfour_hours = time()-(60*1440); |
|
| 160 | + $twentyfour_hours = time() - (60 * 1440); |
|
| 161 | 161 | $query_time = $mysqli->query("select * from users_reset where password = '$resetkey'") |
| 162 | 162 | or die("problem getting time from the users_reset table"); |
| 163 | 163 | $number_hash = $query_time->num_rows; |
| 164 | 164 | |
| 165 | 165 | if ($number_hash == 0) { |
| 166 | - $_SESSION['edit_message'] = "Something went wrong - validation not possible, contact the " |
|
| 166 | + $_SESSION['edit_message'] = "Something went wrong - validation not possible, contact the " |
|
| 167 | 167 | ."admins or try a new password request"; |
| 168 | 168 | header("Location: ../../main/front/front.php"); |
| 169 | 169 | } else { |
@@ -176,8 +176,8 @@ discard block |
||
| 176 | 176 | $random_salt = hash( |
| 177 | 177 | 'sha512', |
| 178 | 178 | uniqid(mt_rand(1, mt_getrandmax()), true) |
| 179 | - );//create random salt |
|
| 180 | - $update_password = hash('sha512', $sha512 . $random_salt); // Create salted password |
|
| 179 | + ); //create random salt |
|
| 180 | + $update_password = hash('sha512', $sha512.$random_salt); // Create salted password |
|
| 181 | 181 | $timestamp = time(); |
| 182 | 182 | |
| 183 | 183 | $sdbquery = $mysqli->query("UPDATE users SET password = '$md5pass', |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | header("Location: ../../main/front/front.php"); |
| 214 | 214 | } |
| 215 | 215 | } else { |
| 216 | - $_SESSION['edit_message'] = "Something went wrong - hash password request expired, try a " |
|
| 216 | + $_SESSION['edit_message'] = "Something went wrong - hash password request expired, try a " |
|
| 217 | 217 | ."new password request"; |
| 218 | 218 | |
| 219 | 219 | //delete the hash from the user_reset table so a new reset can be done |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | } |
| 225 | 225 | } |
| 226 | 226 | } else { |
| 227 | - $_SESSION['edit_message'] = "Something went wrong - Did you enter the correct email addres?"; |
|
| 227 | + $_SESSION['edit_message'] = "Something went wrong - Did you enter the correct email addres?"; |
|
| 228 | 228 | header("Location: ../../main/front/front.php?action=new_pwd&q=$hash"); |
| 229 | 229 | } |
| 230 | 230 | } |