-
Notifications
You must be signed in to change notification settings - Fork 0
/
profile.php
149 lines (144 loc) · 6.89 KB
/
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
<?php
session_start();
if (isset($_SESSION['userId'])) :
$pageTitle = 'Profile';
include('includes/templates/header.php');
?>
<!-- Breadcrumb Section Begin -->
<div class="breacrumb-section">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="breadcrumb-text">
<a href="index.php"><i class="fa fa-home"></i> Home</a>
<span>Profile</span>
</div>
</div>
</div>
</div>
</div>
<!-- Breadcrumb Form Section Begin -->
<!-- Profile Section Begin -->
<div id="profile-page" class="spad">
<div class="container">
<div class="row">
<div class="col-lg-6 offset-lg-3">
<div id="message"></div>
</div>
</div>
<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">
<div class="user-avatar">
<img id="oldImage" src="uploads/profileImages/<?= $userData['image']; ?>" alt="uploads/profileImages/<?= $userData['image']; ?>">
</div>
<h5 class="user-name"><?= $userData['userName']; ?></h5>
<h6 class="user-email"><?= $userData['email']; ?></h6>
</div>
</div>
</div>
</div>
</div>
<div class="col-xl-9 col-lg-9 col-md-12 col-sm-12 col-12">
<div class="card h-100">
<form method="POST" 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">
<h6 class="mb-2 text-primary">Personal Details</h6>
</div>
<!-- hidden id -->
<input type="hidden" name="userid" class="form-data" value="<?= $userData['userID']; ?>">
<div class="col-xl-6 col-lg-6 col-md-6 col-sm-6 col-12">
<div class="form-group">
<label for="username">Username</label>
<input type="text" class="form-control form-data" name="username" id="username" placeholder="Enter Username" value="<?= $userData['userName']; ?>">
<div id="name-error" class="text-danger"></div>
</div>
</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 form-data" name="fullname" id="fullName" placeholder="Enter full name" value="<?= $userData['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="email">Email</label>
<input type="email" class="form-control form-data" name="email" id="email" placeholder="Enter email ID" value="<?= $userData['email']; ?>">
<div id="email-error" class="text-danger"></div>
</div>
</div>
<div class="col-xl-6 col-lg-6 col-md-6 col-sm-6 col-12">
<div class="form-group">
<label for="image">Image</label>
<input type="file" class="form-control" name="image" id="image">
<div id="image-error" class="text-danger"></div>
</div>
</div>
<div class="col-xl-6 col-lg-6 col-md-6 col-sm-6 col-12">
<div class="form-group">
<input type="hidden" name="oldpassword" class="form-data" value="<?= $userData['password']; ?>" />
<label for="password">New Password</label>
<input type="password" class="form-control form-data" name="password" id="password" placeholder="Leave empty if you don't want to change">
<div id="password-error" class="text-danger"></div>
</div>
</div>
<div class="col-xl-6 col-lg-6 col-md-6 col-sm-6 col-12">
<div class="form-group">
<label for="password-con">Confirm Password</label>
<input type="password" class="form-control form-data" name="password-con" id="password-con" placeholder="Confirm New Password">
<div id="password-con-error" class="text-danger"></div>
</div>
</div>
</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">Address</h6>
</div>
<div class="col-xl-6 col-lg-6 col-md-6 col-sm-6 col-12">
<div class="form-group">
<label for="Street">Street</label>
<input type="name" class="form-control" id="Street" placeholder="Enter Street">
</div>
</div>
<div class="col-xl-6 col-lg-6 col-md-6 col-sm-6 col-12">
<div class="form-group">
<label for="ciTy">City</label>
<input type="name" class="form-control" id="ciTy" placeholder="Enter City">
</div>
</div>
<div class="col-xl-6 col-lg-6 col-md-6 col-sm-6 col-12">
<div class="form-group">
<label for="sTate">State</label>
<input type="text" class="form-control" id="sTate" placeholder="Enter State">
</div>
</div>
<div class="col-xl-6 col-lg-6 col-md-6 col-sm-6 col-12">
<div class="form-group">
<label for="zIp">Zip Code</label>
<input type="text" class="form-control" id="zIp" placeholder="Zip Code">
</div>
</div>
</div>
<div class="row gutters mt-3">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="text-right">
<button type="submit" id="submit" name="profile_submit" class="btn btn-primary form-data" onclick="updateProfile();">Update</button>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- Profile Section End -->
<?php include('includes/templates/footer.php'); ?>
<?php else : header('Location: index.php'); ?>
<?php endif; ?>