-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmin.php
90 lines (78 loc) · 4.04 KB
/
admin.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
<?php
session_start();
include('class/Database.php');
include('class/Auth.php');
$auth = new Auth;
if (isset($_POST['email']) && isset($_POST['password'])) {
$email = $_POST['email'];
$password = $_POST['password'];
if ($email != '' && $password != '') {
$auth->login($email, $password);
} else {
$_SESSION['pesan'] = 'Masukkan data dengan benar';
$_SESSION['pesan_mode'] = 'danger';
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
<title>Login Admin</title>
</head>
<body class="bg-light">
<div class="container">
<!-- Outer Row -->
<div class="row justify-content-center">
<div class="col-xl-5 col-lg-6 col-md-9">
<div class="card o-hidden border-0 shadow-lg my-5">
<div class="card-body p-0">
<!-- Nested Row within Card Body -->
<div class="row">
<div class="col-lg">
<div class="p-5">
<div class="text-center">
<h1 class="h4 text-gray-900 mb-4">Login Admin</h1>
</div>
<form class="user" method="POST">
<div class="form-group">
<input type="email" value="<?php if (isset($nis)) echo $nis ?>" name="email" class="form-control form-control-user" placeholder="Masukkan Email..." required>
</div>
<div class="form-group">
<input type="password" name="password" class="form-control form-control-user" placeholder="Password" required>
</div>
<!-- <div class="form-group">
<div class="custom-control custom-checkbox small">
<input type="checkbox" class="custom-control-input" id="customCheck">
<label class="custom-control-label" for="customCheck">Remember Me</label>
</div>
</div> -->
<?php if (isset($_SESSION['pesan'])) : ?>
<div class="alert alert-<?= $_SESSION['pesan_mode'] ?>" role="alert">
<?= $_SESSION['pesan'] ?>
</div>
<?php unset($_SESSION['pesan']); ?>
<?php endif ?>
<button type="submit" class="btn btn-primary btn-user btn-block">
Login
</button>
</form>
<hr>
<!-- <div class="text-center">
<a class="small" href="https://wa.me/623120790052?text=Saya%20adalah%20ketua%20murid%20dari%20kelas%20XII%20RPL%201%0ANIS%3A%0ANAMA%20LENGKAP%3A%0ATEMPAT%20LAHIR%3A%0ATANGGAL%20LAHIR%3A%0AJENIS%20KELAMIN%3A%0AALAMAT%3A(Desa%20Kec%20Kab)%0ATINGKAT%3A%0ARUMPUN%3A%0AKELAS%3A">Hubungi Admin</a>
</div> -->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="assets/jquery/jquery.min.js"></script>
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
</body>
</html>