-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
115 lines (111 loc) · 6.67 KB
/
index.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
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<title>PROJECT355</title>
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/fonts/fontawesome-all.min.css">
<link rel="stylesheet" href="assets/fonts/ionicons.min.css">
<link rel="stylesheet" href="assets/css/Google-Style-Login.css">
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<link rel="stylesheet" href="assets/css/Login-Form-Clean-1.css">
<link rel="stylesheet" href="assets/css/Login-Form-Clean.css">
<link rel="stylesheet" href="assets/css/Login-Form-Dark.css">
<link rel="stylesheet" href="assets/css/Navigation-Clean.css">
<link rel="stylesheet" href="assets/css/styles.css">
<script>
function checkPassword() {
var em = document.getElementsByName("email")[0].value;
if (window.XMLHttpRequest) {
// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
} else {
// code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("txtHint").innerHTML = this.responseText;
}
};
xmlhttp.open("GET","getPw.php?q="+em,true);
xmlhttp.send();
var pw = document.getElementsByName("password")[0].value;
if(pw == document.getElementById("txtHint").innerHTML && pw != "") {
var submit = document.getElementById("logIn");
submit.setAttribute("href", "profile.html?" + em);
}
else {
var submit = document.getElementById("logIn");
submit.setAttribute("href", "index.html");
}
}
function addUser() {
var first = document.getElementById("fname").value;
var last = document.getElementById("lname").value;
var email = document.getElementById("email").value;
var pw = document.getElementById("password").value;
var dupPw = document.getElementById("repeat-password").value;
if(pw != dupPw) {
alert("Enter the same password for both fields");
return;
}
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if(this.readyState == 4 && this.status == 200) {
console.log(this.responseText);
}
};
xhttp.open("GET","makeUser.php?em="+email + "&pw="+pw+"&fn="+first+"&ln="+last, true);
xhttp.send();
}
</script>
</head>
<body>
<div id="txtHint" style="display: none;"></div>
<div>
<nav class="navbar navbar-light navbar-expand-md navigation-clean" style="background-color: #f1f7fc;">
<div class="container"><a class="navbar-brand" href="index.html" style="background-image: url("logo_transparent.png");width: 300px;height: 100px;"> <img src="assets/img/GC-logo.png" style="width: 300px;"></a><button class="navbar-toggler" data-toggle="collapse"
data-target="#navcol-1"><span class="sr-only">Toggle navigation</span><span class="navbar-toggler-icon"></span></button>
<div class="collapse navbar-collapse" id="navcol-1">
<ul class="nav navbar-nav ml-auto"></ul>
</div>
</div>
</nav>
</div>
<div class="login-clean" style="background-color: #f1f7fc;">
<form method="post">
<h2 class="sr-only">Login Form</h2>
<div class="illustration"><i class="icon ion-ios-navigate"></i></div>
<div class="form-group"><input class="form-control" type="email" name="email" placeholder="Email" onkeyup="checkPassword()"></div>
<div class="form-group"><input class="form-control" type="password" name="password" placeholder="Password" onkeyup="checkPassword()"></div>
<div class="form-group"><a id = "logIn" class="btn btn-primary btn-block" role="button" href="index.html">Log In</a></div><a href="forgotpage.html" class="forgot">Forgot your email or password?</a><a href="#" class="new" data-toggle="modal" data-target="#myModal">New User? Sign Up here!</a>
<div
class="modal fade bg-primary" role="dialog" tabindex="-1" id="myModal" style="background-color: rgb(241,247,252);">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" style="color: rgb(39,121,203);">Sign Up</h4><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button></div>
<div class="modal-body">
<p class="text-uppercase" style="font-weight: normal;">Please fill in this form to create an account.</p>
<div class="form-group"><label style="font-style: normal;font-weight: bold;">First Name</label><input class="form-control" type="text" placeholder="First Name" id="fname"><label style="font-weight: bold;">Last Name</label><input class="form-control"
type="text" placeholder="Last Name" id="lname"><label style="font-weight: bold;">Email Address</label><input class="form-control" type="email" placeholder="Email" id="email" style="width: 466px;"><label style="font-weight: bold;">Password</label>
<input
class="form-control" type="password" placeholder="Password" id="password"><label style="font-weight: bold;">Repeat Password</label><input class="form-control" type="password" placeholder="Repeat Password" id="repeat-password"><span style="padding: 10px;"></span><p style="font-weight: bold;font-size: 14px;">By creating an account you agree to our <a href="#">Terms & Condition.</a></p></div>
</div>
<div class="modal-footer"><button class="btn btn-primary btn-block" type="button" id="close-btn" data-dismiss="modal" style="background-color: rgb(164,156,158);">Cancel</button><button class="btn btn-primary btn-block" type="submit" id="submit-btn" onclick="return addUser()">Sign Up</button></div>
</div>
</div>
</div>
</form>
</div>
<script src="assets/js/jquery.min.js"></script>
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
<script src="assets/js/calendar.js"></script>
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script src="assets/js/pretty-calendar.js"></script>
<script src="assets/js/project.js"></script>
</body>
</html>