-
Notifications
You must be signed in to change notification settings - Fork 1
/
edit_profile.html
180 lines (160 loc) · 5.49 KB
/
edit_profile.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
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<?php
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<script type = "text/javascript">
var verified = getCookie("verified");
if (verified == 'false'){
window.location.replace("profile.php");
}
function getCookie(cname) {
var name = cname + "=";
var decodedCookie = decodeURIComponent(document.cookie);
var ca = decodedCookie.split(';');
for(var i = 0; i <ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0) {
return (c.substring(name.length, c.length));
}
}
return "";
}
</script>
<nav class="navbar navbar" style="color:black">
<div class="container-fluid">
<!--Home-Header button of navbar -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#topNavBar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="profile.php" style="color:white">NeXtflix</a>
</div>
<div class="collapse navbar-collapse" id="topNavBar">
<ul class="nav navbar-nav navbar-right">
<li class="">
<a href="logout.php" style="color:white">
<span class="glyphicon glyphicon-user" aria-hidden="true"></span> Logout
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right" style="color:white">
<li class="">
<a href="what_to_watch.php" style="color:white">
<span class="glyphicon glyphicon-eye-open" aria-hidden="true"></span> What to Watch!
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right" style="color:white">
<li class="">
<a href="random.php" style="color:white">
<span class="glyphicon glyphicon-star-empty" aria-hidden="true"></span> Surprise me!
</a>
</li>
</ul>
</div>
</div>
</nav>
<style>
body {
background-color: black;
background-repeat: no-repeat;
}
.navbar{
font-family: Avenir;
border-radius: 0;
}
h1{
font-family: Avenir;
color: white;
text-align: center;
}
h2 {
font-family: Avenir;
color: white;
margin-left: 5%;
}
p{
font-family: Avenir;
color: white;
margin-left: 10%;
}
input{
font-family: Avenir;
color: black;
}
</style>
<body>
<h2>Edit your Profile</h2>
<div style="margin-left:15%;color:white">Change your password</div>
<form action="change_pw.php" method="post">
<p style="margin-left:20%">New Password: <input type="password" name="new_password" required id="new_password" /></p>
<input type="Submit" name="change-password" value="Change Password" style="margin-left:20%">
</form>
<br><br>
<div style="margin-left:15%;color:white">Change your favorite genre</div>
<form action="change_genre.php" method="post">
<p style="margin-left:20%">Pick your new favorite genre:
<select name="fav_genre" style="color:black">
<option disabled selected value > -- select an option -- </option>
<option value="Comedy">Comedy</option>
<option value="Horror">Horror</option>
<option value="Action">Action</option>
<option value="Drama">Drama</option>
<option value="Sci-Fi/Fantasy">Sci-Fi/Fantasy</option>
</select>
</p>
<input type="Submit" name="change-genre" value="Change genre" style="margin-left:20%">
</form>
<br><br>
<div style="margin-left:15%;color:white">Delete you account</div>
<form action="delete_account.php" method="post">
<p style="margin-left:20%">Are you sure you want to delete your count?
<select name="decision" style="color:black">
<option value="No">No</option>
<option value="Yes">Yes</option>
</select>
</p>
<input type="Submit" name="delete-account" value="Delete Account" style="margin-left:20%">
</form>
<script type = "text/javascript">
var wrong = getCookie("loginwrong");
if(wrong){
togglediv(wrong);
}
function togglediv(wrong) {
var x = document.getElementById('incorrect');
if(wrong == 'wrong'){
x.style.display = "block";
}
else{
x.style.display = "none";
}
}
function getCookie(cname) {
var name = cname + "=";
var decodedCookie = decodeURIComponent(document.cookie);
var ca = decodedCookie.split(';');
for(var i = 0; i <ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0) {
return (c.substring(name.length, c.length));
}
}
return "";
}
</script>
</body>
</html>