-
Notifications
You must be signed in to change notification settings - Fork 2
/
edit-profile.php
350 lines (195 loc) · 9.89 KB
/
edit-profile.php
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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
<?php
session_start();
if(!isset($_SESSION['id']))
{
header('location: login.php');
exit;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>EventsWave</title>
<link rel="icon" href="assets/images/event_accepted_50px.png" type="image/icon type">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.rtl.min.css" integrity="sha384-+qdLaIRZfNu4cVPK/PxJJEy0B0f3Ugv8i482AKY7gwXwhaCroABd086ybrVKTa0q" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css" integrity="sha384-DyZ88mC6Up2uqS4h/KRgHuoeGwBcD4Ng9SiP4dIRy0EXTlnuz47vAwmeGwVChigm" crossorigin="anonymous"/>
<title>Document</title>
<link rel="stylesheet" href="assets/css/style.css">
<link rel="stylesheet" href="assets/css/responsive.css">
<link rel="stylesheet" href="assets/css/edit-profile.css">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
<link rel="stylesheet" href="notifast/notifast.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
</head>
<body>
<nav class="navbar">
<div class="nav-wrapper">
<img src="assets/images/black_logo.png" class="brand-img" id="logo-img">
<div class="nav-items">
<a href="home.php" style="text-decoration: none; color: #1c1f23"><i class="icon fas fa-home fa-lg"></i></a>
<a href="logout.php" style="text-decoration: none; color: #1c1f23"><i class="icon fas fa-sign-out-alt fa-lg"></i></a>
<div class="icon user-profile">
<a href="my_Profile.php" ><i class="fas fa-user-circle fa-lg"></i></a>
</div>
</div>
</div>
</nav>
<br><br><br>
<!-- Profile edit Section - Preview Section -->
<div class="container">
<div class="row gutters">
<div class="col-xl-3 col-lg-3 col-md-12 col-sm-12 col-12">
<div class="card h-100">
<div class="card-body">
<div class="account-settings">
<div class="user-profile-edit">
<div class="user-avatar">
<img src="<?php echo "assets/images/profiles/".$_SESSION['img_path'] ?>" alt="profile-avatar">
</div>
<h5 class="user-name"><?php echo $_SESSION['username']; ?></h5>
<h6 class="user-email"><?php echo $_SESSION['fullname']?></h6>
</div>
<div class="about">
<h5>About</h5>
<p><?php echo $_SESSION['bio']?></p>
<button type="button" class="btn btn-outline-primary btn-sm" data-bs-toggle="modal" data-bs-target="#staticBackdrop"><i class="icon fas fa-user-edit"></i>Change Profile Pic</button><br>
<button type="button" class="btn btn-outline-primary btn-sm mt-2" data-bs-toggle="modal" data-bs-target="#passchange"><i class="fas fa-shield-alt"></i>Password & Security</button>
</div>
<?php if(isset($_GET['error_message'])){ ?>
<?php
$message = $_GET['error_message'];
echo"<body onload='notification_function(`Error Message`, `$message`, `#da1857`);'</body>"
?>
<?php }?>
<?php if(isset($_GET['success_message'])){ ?>
<?php
$message = $_GET['success_message'];
echo"<body onload='notification_function(`Success Message`, `$message`, `#0F73FA`);'</body>"
?>
<?php }?>
</div>
</div>
</div>
</div>
<!-- Profile edit Section - Edit Section -->
<div class="col-xl-9 col-lg-9 col-md-12 col-sm-12 col-12">
<div class="card h-100">
<form method="POST" action="update-profile.php" enctype="multipart/form-data">
<div class="card-body">
<div class="row gutters">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<h4 class="mb-2 text-primary">ACCOUNT SETTING</h4><br>
<h6 class="mb-2 text-primary">Personal / Organization Details</h6>
</div>
<div class="col-xl-6 col-lg-6 col-md-6 col-sm-6 col-12">
<div class="form-group">
<label for="fullName">Full Name</label>
<input type="text" class="form-control" id="fullName" name="full_name" placeholder="Enter full name/Organization Name" value="<?php echo $_SESSION['fullname'] ?>">
</div>
</div>
<div class="col-xl-6 col-lg-6 col-md-6 col-sm-6 col-12">
<div class="form-group">
<label for="user_name">User Name</label>
<input type="text" class="form-control" id="user_name" placeholder="Enter User Name" name="user_name" value="<?php echo $_SESSION['username']; ?>" >
</div>
</div>
<div class="mb-3">
<label for="exampleFormControlTextarea1" class="form-label" style="padding-top: 5px;">Describe Your Self</label>
<textarea class="form-control" id="exampleFormControlTextarea1" rows="3" placeholder="little bit about you" name="bio"><?php echo $_SESSION['bio'];?></textarea>
</div>
<div class="row gutters">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<h6 class="mt-3 mb-2 text-primary">Social Links</h6>
</div>
<div class="col-xl-6 col-lg-6 col-md-6 col-sm-6 col-12">
<div class="form-group">
<label for="email">Email Address</label>
<input type="email" class="form-control" id="email" placeholder="Enter email address" name="email" value="<?php echo $_SESSION['email'];?>">
</div>
</div>
<div class="col-xl-6 col-lg-6 col-md-6 col-sm-6 col-12">
<div class="form-group">
<label for="whatsapp" style="padding-top: 5px;">WhatsApp</label>
<input type="text" class="form-control" id="whatsapp" placeholder="Enter WhatsApp Link" name="wapp" value="<?php echo $_SESSION['whatsapp'];?>">
</div>
</div>
<div class="col-xl-6 col-lg-6 col-md-6 col-sm-6 col-12">
<div class="form-group">
<label for="facebook" style="padding-top: 5px;">Facebook</label>
<input type="text" class="form-control" id="facebook" placeholder="Enter Facebook Link" name="fbook" value="<?php echo $_SESSION['facebook'];?>">
</div>
</div>
</div>
<div class="row gutters">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="text-right">
<br><button type="submit" id="cancel" name="submits" class="btn btn-secondary">Cancel</button>
<button type="submit" id="submit-data" name="submit" class="btn btn-primary">Update</button>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="staticBackdrop" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="staticBackdropLabel">Change Profile Picture</h5>
</div>
<div class="modal-body">
<form method="post" action="Update-Profile-img.php" enctype="multipart/form-data">
<div class="mb-3">
<label for="formFileSm" class="form-label">Choose Your Profile Image : </label>
<input class="form-control form-control-sm" id="formFileSm" type="file" name="image">
</div>
<button type="submit" class="btn btn-outline-primary btn-sm mt-2" name="posting"><i class="fas fa-cloud-upload-alt"></i>Upload Image</button>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="passchange" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="staticBackdropLabel">Change Password</h5>
</div>
<div class="modal-body">
<form method="post" action="Change-Pass.php">
<label for="inputPassword5" class="form-label">Old Password</label>
<input type="password" id="inputPassword5" class="form-control" aria-describedby="passwordHelpBlock" name="old-password">
<label for="inputPassword5" class="form-label">New Password</label>
<input type="password" id="inputPassword5" class="form-control" aria-describedby="passwordHelpBlock" name="new-password">
<label for="inputPassword5" class="form-label">Retype Password</label>
<input type="password" id="inputPassword5" class="form-control" aria-describedby="passwordHelpBlock" name="retype-password">
<div id="passwordHelpBlock" class="form-text">
Your New password must be 8-20 characters long, contain letters and numbers, and must not contain spaces, special characters, or emoji.
</div>
<button type="submit" class="btn btn-outline-primary btn-sm mt-2" name="change-password"><i class="fas fa-cloud-upload-alt"></i> Change Password</button>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</body>
<script src="notifast/notifast.min.js"></script>
<script src="notifast/function.js"></script>
<script type="text/javascript">
document.getElementById("logo-img").onclick = function () {
location.href = "home.php";
};
</script>
</html>