> WHERE id='1' LIMIT 1")); if (isset($_POST["submit"])) { // Setup. include("config.php"); extract($_POST); $query = doquery("SELECT * FROM <> WHERE username='$username' LIMIT 1"); $row = dorow($query); // Errors. if ($row == false) { err("Invalid username. Please go back and try again.", false, false); } if ($row["password"] != md5($password)) { err("Invalid password. Please go back and try again.", false, false); } if ($row["verifycode"] != 1) { err("You have not yet verified your account. Please click the link found in your Account Verification email before continuing. If you never received the email, please check your spam filter settings or contact the game administrator for further assistance.", false, false); } // Finish. $newcookie = $row["id"] . " " . $username . " " . md5($row["password"] . "--" . $dbsettings["secretword"]); if (isset($remember)) { $expiretime = time()+31536000; $newcookie .= " 1"; } else { $expiretime = 0; $newcookie .= " 0"; } setcookie($controlrow["cookiename"], $newcookie, $expiretime, "/", $controlrow["cookiedomain"], 0); die(header("Location: index.php")); } else { display("Log In", gettemplate("login"), false); } } function logout() { include("globals.php"); setcookie($controlrow["cookiename"], "", (time()-3600), "/", $controlrow["cookiedomain"], 0); die(header("Location: login.php?do=login")); } ?>