Files
e949/front/pages/login/page.php

49 lines
1.1 KiB
PHP

<?php
// Login page
// Includes
require_once("api/user/login.php");
require_once("front/pages/main_nav.php");
require_once("front/notifications.php");
// If there is attempt to login in
if (isset($_POST["login"]) || isset($_POST["password"])) {
$result = User_Login_Method($_POST);
if ($result->IsError()) {
NTFY_AddNotice("Failed to log into account! Check your credentials and try again.<br>" . $result->GetError());
} else {
header("Location: index.php");
exit();
}
}
NTFY_EchoAllNotices();
?>
<div class="visualbox">
<h1>Login</h1>
<form class="login" action="./?do=login" accept-charset="UTF-8" method="post">
<div>
<label for="login">Username</label><br>
<input type="text" name="login" id="login">
</div>
<div>
<label for="password">Password</label><br>
<input type="password" name="password" id="password">
<a href="./?do=reset_password">Reset</a>
</div>
<div>
<input type="submit" value="Submit">
</div>
</form>
<div class="loginmisc">
<p>Don&#39;t have an account? <a href="./?do=register">Register here</a></p>
</div>
</div>