-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
160 lines (150 loc) · 5.66 KB
/
index.php
File metadata and controls
160 lines (150 loc) · 5.66 KB
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<!DOCTYPE html>
<html lang = "en">
<head>
<?php
session_start();
if(isset($_SESSION['User_ID'])) {
header("Location: /loggedInPage"); // redirects them to homepage
exit; // for good measure
}
?>
<!-- <script src="hashes.js"></script> -->
<script src="back-end.js"></script>
<script src="javacode.js"></script>
<link rel="stylesheet" href="Stylesheet.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans|Roboto&display=swap" rel="stylesheet">
<meta charset = "utf-8" />
<title>CONTACT MNGR</title>
</head>
<body>
<!--
Login page
-includes login prompts
-inludes create new user prompts
-->
<div id = "loginPage">
<h1> Contact MNGR Log In</h1>
<form>
<label>Username</label><br>
<input type = "text"
id = "username_textbox"
placeholder="Enter Username"/><br>
<label>Password</label><br>
<input type = "text"
id = "password_textbox"
placeholder="Enter Password" /><br>
<p id = "login_result">temporary text</p>
<button onclick = "window.location.pathname = "/loggedInPage.html";" >Alert </button>
<button onclick = "login()" >Login </button>
<button id = "add_user">Create New Account</button>
<!-- script to make modal appear-->
<script>
var modal = document.getElementById("create_user_modal");
var add_user_button = document.getElementById("add_user");
add_user_button.onclick = function() {
modal.style.display = "block";
}
//window.onclick = function() {
// modal.style.display = "none";
//}
</script>
</form>
<!--
Create Account popup modal
-->
<div id = "create_user_modal">
<h1>Create New User</h1>
<form>
<label>First Name</label><br>
<input type = "text"
id = "new_user_first_name"
placeholder="Enter First Name" /><br>
<label>Last Name</label><br>
<input type = "text"
id = "new_user_last_name"
placeholder="Enter Last Name" /><br>
<label>New Username</label><br>
<input type = "text"
id = "new_user_name"
placeholder="Enter Username"/><br>
<label>New Password</label><br>
<input type = "text"
id = "new_password"
placeholder="Enter Password" /><br>
<p id = "user_added_result">temporary text</p>
<button onclick = "addUser()" >Create User</button>
</div>
<!--
Contacts page
-includes search bar
-inludes create new user prompts
-->
<!-- <div id = "contactsPage">
<div id = "topOfPage">
<h1> Contact MNGR</h1>
<p> Welcome insertfirstname insertlastname </p>
<input type = "text"
id = "search_textbox"
placeholder="Search for Contacts..."/>
<button onclick = "alert('hola')"> Search</button>
<button onclick = "addContact()">Add Contact</button>
<button onclick = "logout()">Logout</button>
</div>
<div id = "contactDisplay">
<label>contacts shown here</label>
</div>
<div id = "editContactPage">
<h2>Edit Contact</h2>
<label>First Name</label><br>
<input type = "text"
id = "edit_firstname_textbox"
placeholder="Enter Username"/><br>
<label>Last Name</label><br>
<input type = "text"
id = "edit_lastname_textbox"
placeholder="Enter Username"/><br>
<label>Phone Number</label><br>
<input type = "text"
id = "edit_phone_textbox"
placeholder="Enter Username"/><br>
<label>Email</label><br>
<input type = "text"
id = "edit_email_textbox"
placeholder="Enter Username"/><br>
<label>Address</label><br>
<input type = "text"
id = "edit_address_textbox"
placeholder="Enter Username"/><br>
<button onclick = "editContact()" >Submit </button>
<button onclick = "">Cancel </button>
<label id = "contact_edited_result">Contact edited result</label>
</div>
<div id = "addContactsPage">
<h2>Add Contact</h2>
<label>First Name</label><br>
<input type = "text"
id = "add_firstname_textbox"
placeholder="Enter First Name..."/><br>
<label>Last Name</label><br>
<input type = "text"
id = "add_lastname_textbox"
placeholder="Enter Last Name..."/><br>
<label>Phone Number</label><br>
<input type = "text"
id = "add_phone_textbox"
placeholder="Enter Phone Number..."/><br>
<label>Email</label><br>
<input type = "text"
id = "add_email_textbox"
placeholder="Enter Email..."/><br>
<label>Address</label><br>
<input type = "text"
id = "add_address_textbox"
placeholder="Enter Address..."/><br>
<button onclick = "addContact()" >Add</button>
<button onclick = "">Cancel</button>
<label id = "contact_added_result">Contact added result</label>
</div>
</div> -->
</body>
</html>