-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsidebar.php
More file actions
44 lines (44 loc) · 3.46 KB
/
sidebar.php
File metadata and controls
44 lines (44 loc) · 3.46 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
37
38
39
40
41
42
43
44
<?php
$role = "";
if (isset($_SESSION['user'])) {
$role = $_SESSION['user']['role'];
}
$current_page = basename($_SERVER['PHP_SELF']);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<nav>
<ul>
<?php if ($role === 'Manager'): ?>
<li><a href="manager_dashboard.php" class="<?= $current_page === 'manager_dashboard.php' ? 'active' : '' ?>">Dashboard</a></li>
<li><a href="add_project.php" class="<?= $current_page === 'add_project.php' ? 'active' : '' ?>">Add Project</a></li>
<li><a href="unassigned_projects.php" class="<?= ($current_page === 'unassigned_projects.php' ||$current_page === 'allocate_team_leader.php' ) ? 'active' : '' ?>">Allocate Team Leader</a></li>
<li><a href="task_search.php" class="<?= ($current_page === 'task_search.php'||$current_page === 'task_details.php' ) ? 'active' : '' ?>">Task Search Functionality</a></li>
<li><a href="user_profile.php" class="<?= $current_page === 'user_profile.php' ? 'active' : '' ?>">User Profile</a></li>
<li><a href="logout.php" class="<?= $current_page === 'logout.php' ? 'active' : '' ?>">Log out</a></li>
<?php elseif ($role === 'Project Leader'): ?>
<li><a href="leader_dashboard.php" class="<?= $current_page === 'leader_dashboard.php' ? 'active' : '' ?>">Dashboard</a></li>
<li><a href="create_task.php" class="<?= $current_page === 'create_task.php' ? 'active' : '' ?>">Create Task</a></li>
<li><a href="assign_team_member.php" class="<?= ($current_page === 'assign_team_member.php' ||$current_page === 'allocate_member.php') ? 'active' : '' ?>">Assign Team Members</a></li>
<li><a href="task_search.php" class="<?= ($current_page === 'task_search.php'||$current_page === 'task_details.php' ) ? 'active' : '' ?>">Task Search Functionality</a></li>
<li><a href="user_profile.php" class="<?= $current_page === 'user_profile.php' ? 'active' : '' ?>">User Profile</a></li>
<li><a href="logout.php" class="<?= $current_page === 'logout.php' ? 'active' : '' ?>">Log out</a></li>
<?php elseif ($role === 'Team Member'): ?>
<li><a href="member_dashboard.php" class="<?= $current_page === 'member_dashboard.php' ? 'active' : '' ?>">Dashboard</a></li>
<li><a href="accept_task.php" class="<?= $current_page === 'accept_task.php' ? 'active' : '' ?>">Accept Task</a></li>
<li><a href="update_task_progress.php" class="<?= ($current_page === 'update_task_progress.php' ||$current_page === 'update_task.php' ) ? 'active' : '' ?>">Update Task Progress</a></li>
<li><a href="search_task_progress.php" class="<?= $current_page === 'search_task_progress.php' ? 'active' : '' ?>">Search Task Progress</a></li>
<li><a href="task_search.php" class="<?= ($current_page === 'task_search.php'||$current_page === 'task_details.php' ) ? 'active' : '' ?>">Task Search Functionality</a></li>
<li><a href="user_profile.php" class="<?= $current_page === 'user_profile.php' ? 'active' : '' ?>">User Profile</a></li>
<li><a href="logout.php" class="<?= $current_page === 'logout.php' ? 'active' : '' ?>">Log out</a></li>
<?php endif; ?>
</ul>
</nav>
</body>
</html>