-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnav-bar.php
35 lines (31 loc) · 955 Bytes
/
nav-bar.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
<?php
if (!isset($_SESSION)) {
session_start();
}
?>
<!DOCTYPE html>
<html lang="en">
<?php
$beginning = '<div class="container"><nav class="navbar navbar-default "><div class="navbar-header">
<a class="navbar-brand">Navigation Bar </a>
</div><ul class="nav navbar-nav justified">';
$frontLink = '<li class="nav-item"> <a class="" href="';
$endLink = '</a></li>';
if (isset($_SESSION['user-type'])) {
echo $beginning;
switch ($_SESSION['user-type']) {
case 'doctor':
echo $frontLink.'add_patient.php"> Add Patient '.$endLink;
echo $frontLink.'patient_info.php"> Upcomming Appointments '.$endLink;
break;
case 'clerk':
echo $frontLink.'add_patient.php"> Add Patient '.$endLink;
echo $frontLink.'patient_info.php"> All Appointments '.$endLink;
break;
default:
// code...
break;
}
echo '</ul> </nav></div>';
}
?>