mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
Cleaned up namespaces (still have to do Map Project) and removed references to FFXIV Classic from the code. Removed the Launcher Editor project as it is no longer needed (host file editing is cleaner).
This commit is contained in:
1 parent
7587a6e142
commit
0f61c4c0e1
544 files changed
+54548
-55498
No files matched your search
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
|
||||
error_reporting(E_ALL | E_STRICT);
|
||||
|
||||
include("config.php");
|
||||
include("database.php");
|
||||
|
||||
function LoginPage_Login($dataConnection)
|
||||
{
|
||||
$username = trim($_POST["username"]);
|
||||
$password = trim($_POST["password"]);
|
||||
|
||||
if(empty($username))
|
||||
{
|
||||
throw new Exception("You must enter an username.");
|
||||
}
|
||||
|
||||
if(empty($password))
|
||||
{
|
||||
throw new Exception("You must enter a password.");
|
||||
}
|
||||
|
||||
$userId = VerifyUser($dataConnection, $username, $password);
|
||||
return RefreshOrCreateSession($dataConnection, $userId);
|
||||
}
|
||||
|
||||
$loginError = "";
|
||||
$sessionId = "";
|
||||
|
||||
if(isset($_POST["login"]))
|
||||
{
|
||||
try
|
||||
{
|
||||
$sessionId = LoginPage_Login($g_databaseConnection);
|
||||
setcookie("sessionId", $sessionId);
|
||||
header("Location: control_panel.php");
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
$loginError = $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<!DOCTYPE HTML>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Seventh Umbral Server</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/reset.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/global.css" />
|
||||
</head>
|
||||
<body>
|
||||
<?php include("header.php"); ?>
|
||||
<div class="info">
|
||||
<h2>Login</h2>
|
||||
<br />
|
||||
<form method="post" autocomplete="off">
|
||||
<table class="infoForm">
|
||||
<tr>
|
||||
<td>Username:</td>
|
||||
<td><input type="text" name="username" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Password:</td>
|
||||
<td><input type="password" name="password" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input type="submit" name="login" value="Login" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<p class="errorMessage"><?php echo($loginError); ?></p>
|
||||
</div>
|
||||
<div class="infoFooter">
|
||||
<a href="create_user.php">Create User</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user