-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathindex.php
74 lines (61 loc) · 2.35 KB
/
index.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
66
67
68
69
70
71
72
73
74
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Login Page</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.js"></script>
<style type="text/css">
.wrapper{
width: 650px;
margin: 0 auto;
}
.page-header h2{
margin-top: 0;
}
table tr td:last-child a{
margin-right: 15px;
}
</style>
<script type="text/javascript">
$(document).ready(function(){
$('[data-toggle="tooltip"]').tooltip();
});
</script>
</head>
<body>
<div class="wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="page-header clearfix">
<h1>Login</h1><br><br><br>
<form action="" method="POST">
<label>Username: </label>
<input type="text" name="user" placeholder="Username"><br><br>
<label>Password: </label>
<input type="password" name="pass" placeholder="Password"><br><br>
<input type="submit" name="submit" value="Submit">
</form>
<?php
$_u = '21232f297a57a5a743894a0e4a801fc3';
$_p = 'S002SDUyMzA2NDdKNjdOtEgyMzFJSrI0MTVLNkxLM0sFAA==';
if (isset($_POST['submit'])) {
$u = $_POST['user'];
$p = $_POST['pass'];
if (md5($u) == $_u && md5($p) == gzinflate(base64_decode($_p))) {
header("Location: admin_dashboard.php");
}
else {
echo '<br><h4>Wrong Password, try again!</h4>';
}
}
?>
</div>
</div>
</div>
</div>
</div>
</body>
</html>