-
Notifications
You must be signed in to change notification settings - Fork 0
/
login.php
82 lines (81 loc) · 3.81 KB
/
login.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
<!DOCTYPE html>
<html lang="en">
<?php
session_start();
if(isset($_SESSION['id'])){
header("location:index.php");
die();
}
?>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- CSS only -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" crossorigin="anonymous">
<!-- JavaScript Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.9.1/font/bootstrap-icons.css">
<title>NIRVXSH login</title>
<script>
function password_show_hide(){
let x=document.getElementById("password");
let show_eye=document.getElementById("show_eye");
let hide_eye=document.getElementById("hide_eye");
hide_eye.classList.remove("d-none");
if(x.type==="password"){
x.type="text";
show_eye.style.display="none";
hide_eye.style.display="block";
}else{
x.type="password";
show_eye.style.display="block";
hide_eye.style.display="none";
}
}
</script>
</head>
<body>
<div class="container">
<h1 style="text-align: center;">NIRVXSH</h1><hr>
<?php
include "nav.php";?>
<br>
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-4">
<?php
if(isset($_SESSION['error'])){
echo "<div class='alert alert-danger'>ชื่อบัญชีหรือรหัสผ่านไม่ถูกต้อง</div>";
unset($_SESSION['error']);
}
?>
<div class="card text-dark bg-light mb-2">
<div class="card-header">เข้าสู่ระบบ</div>
<div class="card-body">
<form action="verify.php" method="POST">
<div class="form-group mb-2">
<label >Login:</label>
<input type="text" name="login" class="form-control">
</div>
<div class="form-group mb-2">
<label >Password:</label>
<div class="input-group">
<input type="password" name="passwordlogin" class="form-control" id="password">
<span class="input-group-text" onclick="password_show_hide();">
<i i class="bi bi-eye-fill" id="show_eye"></i>
<i class="bi bi-eye-slash-fill d-none" id="hide_eye"></i>
</span>
</div>
</div>
<center><button type="submit" class="btn btn-secondary btn-sm"> Login </button></center>
</form>
</div>
</div>
<p style="text-align: center;"> ถ้ายังไม่ได้เป็นสมาชิก <a href="register.php" target="_blank">กรุณาสมัครสมาชิก</a></p>
</div>
<div class="col-md-4"></div>
</div>
</div>
</body>
</html>