-
Notifications
You must be signed in to change notification settings - Fork 0
/
log.jsp
137 lines (122 loc) · 4.26 KB
/
log.jsp
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<%
String errMsgPass ="false";
String errMsgId ="false";
String isRegister = "false";
String isRegister1 = (String) session.getAttribute("isRegister");
String errMsgPass1 = (String) session.getAttribute("loginPErrMsg");
String errMsgId1 = (String) session.getAttribute("loginIdErrMsg");
if(isRegister1 =="true") {
isRegister="true";
}
if(errMsgPass1== "true" || errMsgId1=="true"){
if(errMsgPass1 =="true"){
errMsgPass= "true";
}
else{
errMsgId="true";
}
session.invalidate();
}
else{
session.invalidate();
}
%>
<!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
href="https://fonts.googleapis.com/css?family=Ubuntu"
rel="stylesheet"
/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link
rel="stylesheet"
href="path/to/font-awesome/css/font-awesome.min.css"
/>
<link
rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
/>
<link
rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css"
/>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="./assets/css/login.css" />
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<script>
window.onload = function() {
let isPassInvalid = "<%=errMsgPass%>"
let isIdInvalid = "<%=errMsgId%>"
let isRegisterSuc = "<%=isRegister%>"
if(isRegisterSuc !== "false"){
swal({
title: "Register Successfully !",
text: "Press Login Button For Signin.....",
icon: "success",
button: "Login",
});
}
if (isPassInvalid !== "false" || isIdInvalid !== "false") {
if(isPassInvalid !== "false"){
swal({
title: "Invalid Credentials !",
text: "Enter the correct password.....",
icon: "error",
button: "Enter again",
});
}
else{
swal({
title: "Invalid Credentials !",
text: "SIC is not register......",
icon: "error",
button: "Enter again",
});
}
}
}
</script>
<title>Login</title>
</head>
<body>
<header class="clearfix">
<div class="container">
<div class="header-right">
<nav>
<a class="myNavlink" href="alog.jsp">Admin Login</a>
</nav>
</div>
</div>
</header>
<div id="particles-js">
<div class="main">
<p class="sign" align="center">Sign in</p>
<form class="form1" action="http://localhost:8080/lsuccess.jsp">
<input
class="un "
type="text"
align="center"
placeholder="Enter SIC No"
name="sic"
/>
<input
class="pass"
type="password"
align="center"
placeholder="Enter Password"
name="password"
/>
<button type="submit" class="btn-grad"> Sign In</button>
<br />
</form>
<a href="register.jsp" class="sign1 effect-2" > <p class="sign1 effect-2" align="center">Register ?</p> </a>
</div>
</div>
<script src="/assets/backgroundEffect/particles.js"></script>
<script src="/assets/backgroundEffect/app.js"></script>
</body>
</html>