forked from guanshiyin28/Proyek-Monitoring-Kelompok-7
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofile.php
75 lines (66 loc) · 2.55 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
<?php
$title = 'Profile';
function setActiveNavLink($currentPage) {
$navLinks = [
'index.php' => 'Dashboard',
'tables.php' => 'Tables',
'profile.php'=> 'Profile',
'logout.php'=> 'Logout',
];
$html = '';
foreach ($navLinks as $page => $label) {
$isActive = ($currentPage == $page)
? 'active bg-gradient-dark text-dark'
: 'text-dark';
$iconClass = [
'index.php' => 'dashboard',
'tables.php' => 'table_view',
'profile.php'=> 'person',
'logout.php' =>'assignment',
];
$html .= '
<li class="nav-item">
<a class="nav-link ' . $isActive . '" href="' . $page . '">
<i class="material-symbols-rounded opacity-5">' . $iconClass[$page] . '</i>
<span class="nav-link-text ms-1">' . $label . '</span>
</a>
</li>';
}
return $html;
}
?>
<!DOCTYPE html>
<html lang="en">
<?php include "components/header.php"; ?>
<body class="g-sidenav-show bg-gray-100">
<aside class="sidenav navbar navbar-vertical navbar-expand-xs border-radius-lg fixed-start ms-2 bg-white my-2" id="sidenav-main">
<div class="sidenav-header">
<i class="fas fa-times p-3 cursor-pointer text-dark opacity-5 position-absolute end-0 top-0 d-none d-xl-none" aria-hidden="true" id="iconSidenav"></i>
<a class="navbar-brand px-4 py-3 m-0" href=" https://pb.ecampus.id/pb/main " target="_blank">
<img src="assets/img/upb.png" class="navbar-brand-img" width="26" height="26" alt="main_logo">
<span class="ms-1 text-sm text-dark">Kelompok 7 RPL</span>
</a>
</div>
<hr class="horizontal dark mt-0 mb-2">
<div class="collapse navbar-collapse w-auto " id="sidenav-collapse-main">
<ul class="navbar-nav">
<li class="nav-link-text ms-1"><?php echo setActiveNavLink(basename($_SERVER['PHP_SELF'])); ?></li>
</ul>
</div>
<div class="sidenav-footer position-absolute w-100 bottom-0 ">
<div class="mx-3">
<a class="btn bg-gradient-dark w-100" href="https://pb.ecampus.id/pb/main" type="button">Pelita Bangsa</a>
</div>
</div>
</aside>
<div class="main-content position-relative max-height-vh-100 h-100">
<!-- Navbar -->
<?php include "components/navbar.php"; ?>
<!-- End Navbar -->
<?php include "components/profile.php" ?>
</div>
<?php include "components/footer.php" ?>
</div>
<?php include "components/function.php" ?>
</body>
</html>