forked from Vaibhav2k/Front-End-Project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript3.js
More file actions
34 lines (31 loc) · 762 Bytes
/
script3.js
File metadata and controls
34 lines (31 loc) · 762 Bytes
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
function loadLogin()
{
var inn = sessionStorage.getItem("isLoggedin").toString();
if(inn == 'true')
{
alert('Already Logged In')
}
else
{
window.location = 'login.html'
}
}
function see()
{
var e1 = document.getElementById('em').value;
var p1 = document.getElementById('pw').value
var emd = CryptoJS.MD5(e1).toString();
var pmd = CryptoJS.MD5(p1).toString();
var e_check = sessionStorage.getItem("email_md5");
var p_check = sessionStorage.getItem("pass_md5");
sessionStorage.setItem("isLoggedin",false);
if(emd == e_check && pmd == p_check)
{
sessionStorage.setItem("isLoggedin",true);
window.location = "index.html";
}
else
{
alert("Incorrect Credentials");
}
}