You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
1.2 KiB
PHP
61 lines
1.2 KiB
PHP
<?php
|
|
require_once('scripts/userLogged.php');
|
|
userLogged();
|
|
?>
|
|
|
|
<?php
|
|
$meta = [
|
|
'title' => 'Login',
|
|
'description' => 'Login description',
|
|
'keywords' => ''
|
|
];
|
|
require_once('partial/head.php');
|
|
?>
|
|
|
|
<?php
|
|
require_once('partial/header.php');
|
|
?>
|
|
|
|
<?php
|
|
|
|
if (!empty($_POST) && isset($_POST['username']) && isset($_POST['password'])){
|
|
userLogin($username, $password);
|
|
}
|
|
|
|
?>
|
|
|
|
<body>
|
|
<main class="layout-wrapper">
|
|
|
|
<h1>Login</h1>
|
|
|
|
<?php if(isset($notification)){ ?>
|
|
<p class="alert--<?php echo($notification['type']) ?>">
|
|
<?php echo($notification['message']) ?>
|
|
</p>
|
|
<?php } ?>
|
|
|
|
<form action="login.php" method="post">
|
|
<label for="username">Username</label>
|
|
<input name="username" id="username" type="text"
|
|
<?php if (!empty($_POST) && isset($_POST['username']) && ($_POST['username'])){ ?>
|
|
value="<?php echo $_POST['username']; ?>" <?php } ?> placeholder="Username">
|
|
|
|
<label for="password">Password</label>
|
|
<input name="password" id="password" type="password" value="" placeholder="Password">
|
|
|
|
<input type="submit" value="Submit">
|
|
</form>
|
|
|
|
<h2>Don't have an account?</h2>
|
|
<p><a class="button" href="signup.php">Sign Up</a></p>
|
|
|
|
</main>
|
|
|
|
<?php
|
|
require_once('partial/footer.php');
|
|
?>
|
|
</body>
|
|
</html>
|
|
|