2015-03-09 06:56:51 +08:00
|
|
|
<?php
|
2015-03-14 04:30:48 +08:00
|
|
|
require_once 'class/Session.php';
|
|
|
|
require_once 'class/Downloader.php';
|
2015-03-09 06:56:51 +08:00
|
|
|
|
2015-03-14 04:30:48 +08:00
|
|
|
$session = Session::getInstance();
|
2015-03-09 06:56:51 +08:00
|
|
|
$loginError = "";
|
|
|
|
|
|
|
|
if(isset($_POST["password"]))
|
|
|
|
{
|
|
|
|
if($session->login($_POST["password"]))
|
|
|
|
{
|
|
|
|
header("Location: index.php");
|
2022-05-13 16:43:05 +08:00
|
|
|
exit;
|
2015-03-09 06:56:51 +08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$loginError = "Wrong password !";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
|
|
|
<?php require 'views/header.php'; ?>
|
2022-05-25 20:05:33 +08:00
|
|
|
<div class="container my-4">
|
2015-03-09 06:56:51 +08:00
|
|
|
<?php
|
|
|
|
if($loginError !== "")
|
|
|
|
{
|
|
|
|
?>
|
|
|
|
<div class="alert alert-danger" role="alert"><?php echo $loginError; ?></div>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
2022-05-26 16:11:14 +08:00
|
|
|
<form class="form-horizontal" action="login.php" method="POST" data-bitwarden-watching="1">
|
|
|
|
<div class="row my-3 justify-content-md-center">
|
|
|
|
<div class="col col-md-4">
|
|
|
|
<h2>Login</h2>
|
|
|
|
</div>
|
2015-03-09 06:56:51 +08:00
|
|
|
</div>
|
2022-05-26 16:11:14 +08:00
|
|
|
<div class="row my-3 justify-content-md-center">
|
|
|
|
<div class="col col-lg-4 ">
|
|
|
|
<div class="input-group">
|
|
|
|
<input class="form-control" id="password" name="password" placeholder="Password" type="password">
|
2015-03-09 06:56:51 +08:00
|
|
|
</div>
|
2022-05-26 16:11:14 +08:00
|
|
|
</div>
|
2015-03-09 06:56:51 +08:00
|
|
|
</div>
|
2022-05-26 16:11:14 +08:00
|
|
|
<div class="row my-3 justify-content-md-center">
|
|
|
|
<div class="col col-lg-4">
|
|
|
|
<div class="input-group">
|
|
|
|
<button type="submit" class="btn btn-primary">Sign in</button>
|
|
|
|
</div>
|
2020-03-23 22:36:22 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2015-03-09 06:56:51 +08:00
|
|
|
</form>
|
2022-05-25 20:05:33 +08:00
|
|
|
</div>
|
2020-03-23 22:36:22 +08:00
|
|
|
<?php require 'views/footer.php'; ?>
|