-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathprofile.php
77 lines (72 loc) · 2.97 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
<?php
require 'config.php';
isUserLoggedIn();
$con = dbConnect();
$details = getStaffProfile( $con );
if ( $con ) {
if ( isset( $_REQUEST['updateProfile'] ) ) {
$result = updateProfile( $_REQUEST, $con );
}
}
?>
<?php require 'header.php' ?>
<?php require 'navbar.php' ?>
<div class="row content">
<div class="twelve columns">
<?php require 'message.php'; ?>
<table class="u-full-width">
<tbody>
<tr>
<td><strong>Staff ID</strong></td>
<td><?php echo $details['mm_user_id']; ?></td>
</tr>
<tr>
<td><strong>Staff Name</strong></td>
<td><?php echo $details['mm_user_name']; ?></td>
</tr>
<tr>
<td><strong>Staff Email</strong></td>
<td><?php echo $details['mm_user_email']; ?></td>
</tr>
<tr>
<td><strong>Staff Mobile No.</strong></td>
<td><?php echo $details['mm_user_mobile']; ?></td>
</tr>
<tr>
<td><strong>Staff Role</strong></td>
<td><?php echo ( $details['mm_user_role'] == 1 ) ? 'Super Admin' : 'Staff'; ?></td>
</tr>
<tr>
<td><strong>Staff Joined</strong></td>
<td><?php echo $details['mm_user_created_at']; ?></td>
</tr>
<tr>
<td><strong>Staff Activity</strong></td>
<td><?php echo ( $details['mm_user_status'] == 1 ) ? 'Active' : 'Inactive'; ?></td>
</tr>
<tr>
<td> </td>
<td><button class="button" id="updateProfileCall">Update Profile</button></td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Staff Modal -->
<div id="updateProfile" class="modal">
<!-- Modal content -->
<div class="modal-content">
<span class="close">×</span>
<form action="" method="post">
<label for="useremail">Email</label>
<input class="u-full-width" name="usermail" type="email" placeholder="Enter email address..." id="usermail" value="<?php echo $details['mm_user_email']; ?>">
<label for="usermobile">Mobile Number</label>
<input class="u-full-width" name="usermobile" type="text" placeholder="Enter mobile no..." id="usermobile" value="<?php echo $details['mm_user_mobile']; ?>">
<label for="password">Password</label>
<input class="u-full-width" name="password" type="password" placeholder="Enter password..." id="password">
<input type="hidden" name="userid" value="<?php echo $details['mm_user_id']; ?>">
<input name="updateProfile" type="submit" value="Update Profile">
</form>
</div>
</div>
<?php require 'footer.php' ?>