-
Notifications
You must be signed in to change notification settings - Fork 2
/
header.php
120 lines (104 loc) · 6.38 KB
/
header.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<?php
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PMS</title>
<link
href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"
rel="stylesheet"
/>
</head>
<body class="antialiased" x-data="{ isOpen : false}">
<!-- header -->
<header class="header my-8">
<!-- container -->
<div class="container px-4 sm:px-8 lg:px-16 xl:px-20 mx-auto">
<!-- header wrapper -->
<div class="header-wrapper flex items-center justify-between">
<!-- header logo -->
<div class=" header-logo flex items-center sm:flex-row flex-col">
<h1 class="font-semibold text-black leading-relaxed">
<a href="aboutus.php">PMS</a></h1>
</div>
<!-- mobile toggle -->
<div class="toggle md:hidden ">
<button @click=" isOpen = true" @keydown.escape=" isOpen = false">
<svg
class="h-6 w-6 fill-current text-black"
fill="none" stroke-linecap="round"
stroke-linejoin="round" stroke-width="2"
viewBox="0 0 24 24" stroke="currentColor">
<path d="M4 6h16M4 12h16M4 18h16"></path>
</svg>
</button>
</div>
<!-- Navbar -->
<navbar class="navbar hidden md:block">
<ul class="flex space-x-8 text-sm font-semibold">
<?php
if(isset($_SESSION['userUidOfficer'])){
echo'<li><a href="includes/logout.inc.php?logout=officer" class="hover:text-indigo-500">Logout</a></li>
<li><a href="./officer-dashboard.php" class="hover:text-indigo-500">Officer dashboard</a></li>
<li><a href="./aboutus.php" class="hover:text-indigo-500">About Us</a></li>';
}else if(isset($_SESSION['userUidJailor'])){
echo'<li><a href="includes/logout.inc.php?logout=jailor" class="hover:text-indigo-500">Logout</a></li>
<li><a href="./jailor-dashboard.php" class="hover:text-indigo-500">Jailor dashboard</a></li>
<li><a href="./aboutus.php" class="hover:text-indigo-500">About Us</a></li>';
}else{
echo'<li><a href="./aboutus.php" class="hover:text-indigo-500">About Us</a></li>';
echo'<li><a href="./signin-officer.php" class="hover:text-indigo-500">Officer Login</a></li>';
echo'<li><a href="./signin-jailor.php" class="hover:text-indigo-500">Jailor Login</a></li>';
}
?>
</ul>
</navbar>
</div>
</div>
</header><!-- end header -->
<!-- mobile navbar -->
<div class="mobile-navbar">
<!-- navbar wrapper -->
<div class="navbar-wrapper fixed top-0 left-0 h-full bg-white z-30 w-64 shadow-lg p-5"
x-show="isOpen"
@click.away=" isOpen = false"
x-transition:enter="transition duration-300 -ml-64"
x-transition:enter-start=""
x-transition:enter-end="transform translate-x-64"
x-transition:leave="transition duration-300"
x-transition:enter-start=""
x-transition:leave-end="transform -translate-x-64">
<div class="close">
<button class="absolute top-0 right-0 mt-4 mr-4" @click=" isOpen = false">
<svg
class="w-6 h-6"
fill="none" stroke-linecap="round"
stroke-linejoin="round" stroke-width="2"
viewBox="0 0 24 24" stroke="currentColor">
<path d="M6 18L18 6M6 6l12 12"></path>
</svg>
</button>
</div>
<ul class="divide-y">
<?php
if(isset($_SESSION['userUidOfficer'])){
echo'<li><a class="my-4 inline-block active font-bold" href="includes/logout.inc.php?logout=officer" class="hover:text-indigo-500">Logout</a></li>
<li><a class="my-4 inline-block active font-bold" href="./officer-dashboard.php" class="hover:text-indigo-500">Officer dasboard</a></li>
<li><a class="my-4 inline-block active font-bold" href="#" class="hover:text-indigo-500">Aboutus</a></li>';
}else if(isset($_SESSION['userUidJailor'])){
echo'<li><a class="my-4 inline-block active font-bold" href="includes/logout.inc.php?logout=jailor" class="hover:text-indigo-500">Logout</a></li>
<li><a class="my-4 inline-block active font-bold" href="./jailor-dashboard.php" class="hover:text-indigo-500">Jailor dashboard</a></li>
<li><a href="./aboutus.php" class="hover:text-indigo-500">Aboutus</a></li>';
}else{
echo'<li><a class="my-4 inline-block active font-bold" href="./aboutus.php" class="hover:text-indigo-500">Aboutus</a></li>';
echo'<li><a class="my-4 inline-block active font-bold" href="./signin-officer.php" class="hover:text-indigo-500">Officer Login</a></li>';
echo'<li><a class="my-4 inline-block active font-bold" href="./signin-jailor.php" class="hover:text-indigo-500">Jailor Login</a></li>';
}
?>
</ul>
</div>
</div>
<!-- end mobile navbar -->