-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
70 lines (56 loc) · 1.82 KB
/
index.php
File metadata and controls
70 lines (56 loc) · 1.82 KB
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
<?php
session_start();
$error = "";
include 'koneksi/koneksi.php';
if (isset($_POST['login'])) {
foreach ($_POST as $key => $value) {
${$key} = $value;
}
$query = mysqli_query($conn, "SELECT password from dosen where nid='$nid'");
if ($query) {
if (mysqli_num_rows($query)>0) {
$data = mysqli_fetch_array($query);
if (password_verify($password,$data['password'])) {
$_SESSION['dosen'] = $nid;
header("location:dosen");
exit;
}else $error = "Password dan Email Salah!";
}else $error = "Password dan Email Salah!";
}else $error = "Password dan Email Salah!";
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Login DOSEN</title>
<link rel="stylesheet" href="materialize/css/materialize.css">
<link href="webcon/css/materialdesignicons.min.css" media="all" rel="stylesheet" type="text/css" />
<script src="js/jquery-2.2.2.js"></script>
<script src="materialize/js/materialize.css"></script>
<style>
.log{
margin-top:20px;
}
.h5{
color: white;
margin-left:-110px;
margin-top: 100px;
}
</style>
</head>
<body background="images/gedung-fikes.jpg">
<center><img src="images/logo.png" width="200" height="200" alt=""></center>
<div class="container">
<center><h5 class="h5">Sistem Absensi Kampus</h5></center>
<div class="row log">
<div class="col s7 offset-s2 card-panel z-depth-3">
</div>
<div class="col s7 offset-s2 card-panel z-depth-3"><br>
<a class="waves-effect waves-light btn blue darken-1 col s12" href="admin" style="margin-bottom:20px;"><i class="mdi mdi-forward left"></i>Login Admin</a>
<a class="waves-effect waves-light btn blue darken-1 col s12" href="dosen" style="margin-bottom:20px;"><i class="mdi mdi-forward left"></i>Login Dosen</a>
</div>
</div>
</div>
</body>
</html>