-
Notifications
You must be signed in to change notification settings - Fork 0
/
login.php
65 lines (58 loc) · 1.95 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php include "includes/db.php"; ?>
<?php include "includes/header.php"; ?>
<!-- Navigation -->
<?php include "includes/navigation.php"; ?>
<?php
checkIfLoginAndRedirct('/admin');
if(ifItIsMethod('post')){
if(isset($_POST['login'])){
if(isset($_POST['username']) && isset($_POST['password'])){
login_user($_POST['username'],$_POST['password']);
}
else {
redirect('/login.php');
}
}}
?>
<!-- Page Content -->
<div class="container">
<div class="form-gap"></div>
<div class="container">
<div class="row">
<div class="col-md-4 col-md-offset-4">
<div class="panel panel-default">
<div class="panel-body">
<div class="text-center">
<h3><i class="fa fa-user fa-4x"></i></h3>
<h2 class="text-center">Login</h2>
<div class="panel-body">
<form id="login-form" role="form" autocomplete="on" class="form" method="post">
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-user color-blue"></i></span>
<input name="username" type="text" class="form-control" placeholder="Enter Username">
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-lock color-blue"></i></span>
<input name="password" type="password" class="form-control" placeholder="Enter Password">
</div>
</div>
<div class="form-group">
<input name="login" class="btn btn-lg btn-primary btn-block" value="Login" type="submit">
</div>
<div class="form-group">
<a href="forgot.php?forgot=<?php echo uniqid(true);?>">Forgot Password ?</a>
</div>
</form>
</div><!-- Body-->
</div>
</div>
</div>
</div>
</div>
</div>
<hr>
<?php include "includes/footer.php";?>
</div> <!-- /.container -->