mirror of
https://github.com/sorenpeter/timeline.git
synced 2025-12-15 10:57:01 +00:00
30 lines
No EOL
820 B
PHP
30 lines
No EOL
820 B
PHP
<?php
|
|
require_once "partials/base.php";
|
|
|
|
$title = "Login - $title";
|
|
|
|
// $password comes from libs/session.php
|
|
if (isset($_SESSION['password'])) {
|
|
if ($_SESSION['password'] == $passwordInConfig) {
|
|
header("Location: .");
|
|
die();
|
|
}
|
|
} else {
|
|
include 'partials/header.php';
|
|
?>
|
|
<!-- TODO: Replace center and font tags with CSS -->
|
|
<center>
|
|
<h2>Enter password or TOTP</h2>
|
|
<form method="post" action="" id="login_form">
|
|
<input type="password" name="pass" placeholder="Password" autofocus><br>
|
|
<input type="submit" name="submit_pass" value="Login">
|
|
<p><font style="color:red;">
|
|
<?php if (isset($error)) {
|
|
echo $error;
|
|
} ?>
|
|
</font></p>
|
|
</form>
|
|
</center>
|
|
<?php } ?>
|
|
|
|
<!-- PHP: GET FOOTER --><?php include 'partials/footer.php'; ?>
|