-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
41 lines (41 loc) · 1.16 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
<!DOCTYPE html>
<html>
<head>
<title>Login</title>
<link rel="stylesheet" type="text/css" href="style.css">
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;"/>
<meta content='width=device-width, initial-scale=1' name='viewport'/>
</head>
<body>
<?php
if(isset($_GET['pesan'])){
if($_GET['pesan'] == "gagal"){
echo "Login gagal! username dan password salah!";
}else if($_GET['pesan'] == "logout"){
echo "Anda telah berhasil logout";
}else if($_GET['pesan'] == "belum_login"){
echo "Anda harus login untuk mengakses halaman admin";
}
}
?>
<div id="container">
<div class="login">
<h1>Login Perpustakaan Sekolah</h1>
<form action="auth.php" method="post" onSubmit="return validasi()">
<div>
<label>Username:</label>
<input type="text" name="username" id="username" />
</div>
<div>
<label>Password:</label>
<input type="password" name="password" id="password" />
</div>
<div>
<input type="submit" value="Login" class="tombol">
</div>
</form>
</div>
</div>
<script type="text/javascript" src="login.js"></script>
</body>
</html>