-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmasuk.php
110 lines (96 loc) · 3.88 KB
/
masuk.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
108
109
110
<?php
$error = null;
session_start();
include 'koneksi.php';
if (isset($_POST['masuklogin'])) {
$emailpass = $_POST['emailpass'];
$password = md5($_POST['password']);
//echo "$emailpass + $password";
$sql =
"SELECT * from master_peserta where email='" .
$emailpass .
"' and password='" .
$password .
"' limit 1";
$hasil = mysqli_query($koneksi, $sql);
$jumlah = mysqli_num_rows($hasil);
if ($jumlah > 0) {
$row = mysqli_fetch_assoc($hasil);
$_SESSION['id_peserta'] = $row['id_peserta'];
$_SESSION['nama_lengkap'] = $row['nama_lengkap'];
$_SESSION['email'] = $row['email'];
if ($row['verifikasi'] == 1) {
header('location:beranda.php');
} else {
$error = '<div class="alert alert-danger text-center" role="alert">
<strong>Akun anda belum terverifikasi</strong>
</div>';
}
} else {
$error = '<div class="alert alert-danger text-center" role="alert">
<strong>Email atau password salah.</strong>
</div>';
}
}
if (isset($_POST['lupapassword'])) {
header('location:lupa_pass.php');
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Login Portal DC-EVENT</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="images/icons/" />
<link rel="stylesheet" type="text/css" href="vendor/bootstrap/css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="fonts/font-awesome-4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="fonts/iconic/css/material-design-iconic-font.min.css">
<link rel="stylesheet" type="text/css" href="vendor/select2/select2.min.css">
<link rel="stylesheet" type="text/css" href="css/util.css">
<link rel="stylesheet" type="text/css" href="css/main.css">
</head>
<body>
<div class="container-login" style="background-image: url('images/bg08.jpg');">
<div class="wrap-login p-l-55 p-r-55 p-t-1 p-b-30 " style="min-height:95vh;">
<div><?php echo $error; ?></div>
<form class="login-form validate-form" action="masuk.php" method="POST">
<span>
<img class="image p-l-48 p-t-1 p-b-1" src="images/logo_IF_square.png" style="max-width: 225px;">
</span>
<span class="login-form-title p-b-30">
Masuk Portal<br>DC-Event
</span>
<div class="wrap-input validate-input m-b-20" data-validate="Masukkan Email">
<input class="input" type="email" name="emailpass" placeholder="Email">
<span class="focus-input"></span>
</div>
<div class="wrap-input validate-input m-b-25" data-validate="Masukkan password">
<input class="input" type="password" name="password" placeholder="password">
<span class="focus-input"></span>
</div>
<div class="text-center">
<a href="lupa_pass.php" class="txt2 hov1">
Lupa Password
</a>
</div>
<div class="container-login-form-btn p-t-15 p-b-40">
<button class="login-form-btn" name="masuklogin">
Masuk
</button>
</div>
<div class="text-center">
<a href="index.php" class="txt2 hov1">
< kembali </a>
</div>
</form>
</div>
</div>
<!-- script java script -->
<script src="vendor/jquery/jquery-3.2.1.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
<script src="vendor/select2/select2.min.js"></script>
<script src="js/main.js"></script>
</body>
</html>