-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsignup.html
85 lines (80 loc) · 2.63 KB
/
signup.html
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
<!DOCTYPE html>
<html lang="en">
<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">
<title>Sign In</title>
<link rel="stylesheet" href="styles/sign.css">
<link rel="shortcut icon" href="./images/Geekbuying_title_logo.png" type="image/x-icon">
</head>
<body>
<div id="upperbar">
<img onclick="mp()" src="https://content1.geekbuying.com/V1.4/en/images/indexV7/Geekbuying.png" alt="">
</div>
<div id="bgi">
<div id="signup">
<h3>Sign In</h3>
<input id="ea" type="text" placeholder="Email address">
<input id="pa" type="text" placeholder="Password">
<div id="fp">
<input id="cb" type="checkbox">
<p>Keep me signed in</p>
<img onclick="goog()" src="https://cdn.iconscout.com/icon/free/png-64/faqs-1895578-1604568.png" alt="">
<u>Forget your password?</u>
</div>
<button id="signb" onclick="signup()"><h4>Sign In</h4></button><br>
<button id="cna" onclick="cna()"><h4>Create a new account</h4></button>
<div id="fp"><hr><p>or</p><hr></div>
<img src="https://cdn.iconscout.com/icon/free/png-64/google-152-189813.png" alt="">
</div>
</div>
<p>Copyright © 2012 - 2022 GeekBuying.com. All rights reserved.</p>
</body>
</html>
<script>
var ar = JSON.parse(localStorage.getItem("user"))
let cuser=[];
function mp()
{
window.open("index.html","_self")
}
function cna()
{
window.open("createacc.html","_self")
}
function signup()
{
var b = document.querySelector("#ea")
var c = document.querySelector("#pa")
var e = document.querySelector("#cb")
if(b.value=="" || c.value=="" || e.checked==false)
{
alert("fill all the input boxes..!!")
}
else if(ar)
{
var zz=0
for(var i = 0;i<ar.length;i++)
{
if(b.value==ar[i].email && c.value==ar[i].pass)
{
cuser.push(ar[i]);
localStorage.setItem("c_user",JSON.stringify(cuser));
alert("Sign In Successful")
zz++
window.open("index.html","_self")
break;
}
}
if(zz==0)
{
alert("Incorrect Email or Password")
}
}
else
{
alert("Incorrect Email or Password")
}
}
</script>