forked from MTco/Youtube-dl-WebUI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
login.php
48 lines (45 loc) · 1.01 KB
/
login.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
require_once 'class/Session.php';
require_once 'class/Downloader.php';
$session = Session::getInstance();
$loginError = "";
if(isset($_POST["password"]))
{
if($session->login($_POST["password"]))
{
header("Location: index.php");
}
else
{
$loginError = "错误密码!";
}
}
?>
<?php require 'views/header.php'; ?>
<div class="container">
<?php
if($loginError !== "")
{
?>
<div class="alert alert-danger" role="alert"><?php echo $loginError; ?></div>
<?php
}
?>
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-4">
<h2>登录 :</h2>
</div>
<div class="col-md-4"></div>
</div>
<form class="form-horizontal" action="login.php" method="POST">
<div class="form-group">
<div class="col-lg-4"></div>
<div class="col-lg-4">
<input class="form-control" id="password" name="password" placeholder="Password" type="password">
</div>
<div class="col-lg-4"></div>
</div>
</form>
</div><!-- End container -->
<?php require 'views/footer.php'; ?>