-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathprofile.php
More file actions
36 lines (34 loc) · 2.03 KB
/
Copy pathprofile.php
File metadata and controls
36 lines (34 loc) · 2.03 KB
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
<div class="container">
<main>
<div class="row justify-content-center">
<div class="col-md-6">
<div class="card">
<div class="card-header">
<h4 class="mb-0"><i class="bi bi-person-circle"></i> Profile Settings</h4>
</div>
<div class="card-body">
<p class="text-muted">Welcome back, <?php echo htmlspecialchars($user['name'] ?? $user['email']); ?>!</p>
<p class="text-muted"><?php echo ucfirst($user['group']); ?></p>
<form action="<?php echo $basePath; ?>/profile" method="POST">
<?php if (in_array($user['group'], ['admin', 'manager'])): ?>
<div class="mb-3">
<label for="name" class="form-label">Name</label>
<input type="text" class="form-control" id="name" name="name" value="<?php echo htmlspecialchars($user['name']); ?>" required>
</div>
<?php endif; ?>
<div class="mb-3">
<label for="email" class="form-label">Email Address</label>
<input type="email" class="form-control" id="email" name="email" value="<?php echo htmlspecialchars($user['email']); ?>" required>
</div>
<input type="hidden" name="user_id" value="<?php echo $user['id']; ?>">
<div class="d-flex gap-2">
<button type="submit" class="btn btn-primary">Update Profile</button>
<a href="<?php echo $basePath; ?>/" class="btn btn-secondary">Back to Knowledge Base</a>
</div>
</form>
</div>
</div>
</div>
</div>
</main>
</div>