25 |
- |
1 |
<?php
|
|
|
2 |
// Include config & login validate file
|
|
|
3 |
require_once 'includes/validateUser.php';
|
|
|
4 |
|
|
|
5 |
if(isset($_SESSION['sessData']['field_error'])){
|
|
|
6 |
// Get form field error from session
|
|
|
7 |
$fieldError = $_SESSION['sessData']['field_error'];
|
|
|
8 |
|
|
|
9 |
// Remove field error data from session
|
|
|
10 |
unset($_SESSION['field_error']['sessData']);
|
|
|
11 |
}
|
|
|
12 |
|
|
|
13 |
?>
|
|
|
14 |
<!DOCTYPE html>
|
|
|
15 |
<html lang="en-US">
|
|
|
16 |
<head>
|
|
|
17 |
<!--head-->
|
|
|
18 |
<?php include_once 'elements/head.php'; ?>
|
|
|
19 |
<!--//head-->
|
|
|
20 |
</head>
|
|
|
21 |
<body>
|
|
|
22 |
<div class="container">
|
|
|
23 |
|
|
|
24 |
<!--header-->
|
|
|
25 |
<?php include_once 'elements/header.php'; ?>
|
|
|
26 |
<!--//header-->
|
|
|
27 |
|
|
|
28 |
<!--main-->
|
|
|
29 |
<div class="main-content">
|
|
|
30 |
<div class="wrapper-frm">
|
|
|
31 |
<div class="head-menu">
|
|
|
32 |
<div class="menu-tle">
|
|
|
33 |
<h2>Update Account</h2>
|
|
|
34 |
</div>
|
|
|
35 |
<div class="top-nav">
|
|
|
36 |
<span class="menu"><img src="<?php echo PUBLIC_URL; ?>images/menu.png" alt=""></span>
|
|
|
37 |
<?php include_once 'elements/nav_menu.php'; ?>
|
|
|
38 |
<div class="clearfix"> </div>
|
|
|
39 |
</div>
|
|
|
40 |
</div>
|
|
|
41 |
<div class="ucontent">
|
|
|
42 |
<div class="right-pnl">
|
|
|
43 |
<img src="<?php echo $userPicture; ?>" alt="<?php echo $userName; ?>">
|
|
|
44 |
<h2><?php echo $userName; ?></h2>
|
|
|
45 |
</div>
|
|
|
46 |
<div class="left-pnl">
|
|
|
47 |
<?php echo !empty($statusMsg)?'<p class="status-msg '.$statusMsgType.'">'.$statusMsg.'</p>':''; ?>
|
|
|
48 |
<form action="<?php echo BASE_URL; ?>userAccount.php" method="post" enctype="multipart/form-data">
|
|
|
49 |
<div class="frm-input">
|
|
|
50 |
<input type="file" name="picture" class="file-in" placeholder="Choose Image File">
|
|
|
51 |
</div>
|
|
|
52 |
<div class="frm-input <?php echo !empty($fieldError['first_name'])?'error':''; ?>">
|
|
|
53 |
<input type="text" name="first_name" class="user-in" placeholder="First name" value="<?php echo !empty($userData['first_name'])?$userData['first_name']:''; ?>" required="">
|
|
|
54 |
<?php echo !empty($fieldError['first_name'])?'<p>'.$fieldError['first_name'].'</p>':''; ?>
|
|
|
55 |
</div>
|
|
|
56 |
<div class="frm-input <?php echo !empty($fieldError['last_name'])?'error':''; ?>"">
|
|
|
57 |
<input type="text" name="last_name" class="user-in" placeholder="Last name" value="<?php echo !empty($userData['last_name'])?$userData['last_name']:''; ?>" required="">
|
|
|
58 |
<?php echo !empty($fieldError['last_name'])?'<p>'.$fieldError['last_name'].'</p>':''; ?>
|
|
|
59 |
</div>
|
|
|
60 |
<div class="frm-input <?php echo !empty($sessData['field_error']['email'])?'error':''; ?>"">
|
|
|
61 |
<input type="email" name="email" class="email-in" placeholder="Email" value="<?php echo !empty($userData['email'])?$userData['email']:''; ?>" required="">
|
|
|
62 |
<?php echo !empty($fieldError['email'])?'<p>'.$fieldError['email'].'</p>':''; ?>
|
|
|
63 |
</div>
|
|
|
64 |
<div class="frm-input">
|
|
|
65 |
<input type="text" name="phone" class="phone-in" placeholder="Phone" value="<?php echo !empty($userData['phone'])?$userData['phone']:''; ?>">
|
|
|
66 |
</div>
|
|
|
67 |
<div class="frm-input">
|
|
|
68 |
<input type="text" name="address" class="addr-in" placeholder="Address" value="<?php echo !empty($userData['address'])?$userData['address']:''; ?>">
|
|
|
69 |
</div>
|
|
|
70 |
<div class="frm-btn">
|
|
|
71 |
<input type="submit" name="updateProfile" value="Update">
|
|
|
72 |
</div>
|
|
|
73 |
</form>
|
|
|
74 |
</div>
|
|
|
75 |
</div>
|
|
|
76 |
</div>
|
|
|
77 |
</div>
|
|
|
78 |
<!--//main-->
|
|
|
79 |
|
|
|
80 |
<!--footer-->
|
|
|
81 |
<?php include_once 'elements/footer.php'; ?>
|
|
|
82 |
<!--//footer-->
|
|
|
83 |
</div>
|
|
|
84 |
</body>
|
|
|
85 |
</html>
|