This repository was archived by the owner on May 31, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathindex.php
107 lines (92 loc) · 2.8 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<?php
session_start();
if (isset($_SESSION['failedLogin'])) {
if ($_SESSION['failedLogin'] >= 5) {
header('Location: locked.php');
die();
}
}
if (!file_exists('verifyPanel.php')) {
header('Location: create.php');
die();
}
?>
<html>
<head>
<title>Admin Panel - Login</title>
<link href='http://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type ="text/css" href="styles/global.css" />
<link rel="stylesheet" type ="text/css" href="styles/dashboard.css" />
<meta name="viewport" content="width=device-width, initial-scale: 1.0, user-scaleable=0" />
<!-- Insert this line above script imports -->
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
<!-- normal script imports etc -->
<script src="scripts/jquery-1.12.3.min.js"></script>
<script src="scripts/jquery.backstretch.js"></script>
<!-- Insert this line after script imports -->
<script>if (window.module) module = window.module;</script>
<script>
function startTime() {
var today = new Date();
var h = today.getHours();
var m = today.getMinutes();
var s = today.getSeconds();
h = checkTime(h);
m = checkTime(m);
s = checkTime(s);
document.getElementById('txt').innerHTML =
h + ":" + m + ":" + s;
var t = setTimeout(startTime, 500);
}
function checkTime(i) {
if (i < 10) {i = "0" + i}; // add zero in front of numbers < 10
return i;
}
</script>
</head>
<body>
<meta name="viewport" content="width=device-width">
<div id="background"></div>
<div id = "header">
<div class ="logo"><a href="#">Admin<span>Panel</span></a></div>
<div class ="logoE"><a href="#">By Jason_000</a></div>
</div>
<center><div id="txt"></div></center>
<script>startTime();</script>
<div id = "login">
<form action="login.php" method="post">
<div class="login-block">
<h1>Login</h1>
<input type="text" value="" placeholder="Username" id="username" name="username"/>
<input type="password" value="" placeholder="Password" id="password" name="password"/>
<?php
if (isset($_COOKIE['conecFail']) && $_COOKIE['conecFail'] == '1') {
echo'<div style="color:red"><center>Database connection failed!</center></div>';
}
if (isset($_COOKIE['fail']) && $_COOKIE['fail'] == '1') {
echo'<div style="color:red"><center>Username or password incorrect.</center></div>';
}
?>
<button>Submit</button>
</div>
</form>
</div>
<script>
$.backstretch([
"images/img4.jpg",
"images/img5.jpg",
"images/img7.jpg",
"images/img1.jpg",
"images/img10.jpg",
"images/img9.jpg",
"images/img3.jpg",
"images/img4.jpg",
"images/img6.jpg",
"images/img8.jpg"
], {
fade: 750,
duration: 4000
});
</script>
</body>
</html>