-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnavbar.php
194 lines (167 loc) · 4.32 KB
/
navbar.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<?php session_start(); ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
.navbar{
overflow: hidden;
background-color: #292b2c;
}
.navbar a{
float: left;
font-size: 16px;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
/*dropdown - 1*/
.dropdown{
float: left;
overflow: hidden;
}
.dropdown .dropbtn {
font-size: 16px;
border: none;
outline: none;
color: white;
padding: 14px 16px;
background-color: inherit;
font-family: inherit;
margin: 0;
}
.navbar a:hover, .dropdown:hover{
background-color: green;
transition-duration: 0.4s;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #333;
max-width: 200px;
/*box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);*/
}
.dropdown-content a {
float: none;
color: white;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.dropdown-content a:hover {
background-color: #010203;
}
.dropdown:hover .dropdown-content {
display: block;
}
/*dropdown - 1 end*/
/*dropdown - 2*/
.dropdown2{
float: right !important;
overflow: hidden;
margin-right: 100px ;
}
.dropdown2 .dropbtn {
font-size: 16px;
border: none;
outline: none;
color: white;
padding: 14px 16px;
background-color: inherit;
font-family: inherit;
margin: 0;
}
.dropdown2:hover{
background-color: #0275d8 !important;
transition-duration: 0.4s;
}
.dropdown2-content {
float: left;
display: none;
position: absolute;
background-color: #333;
min-width: 100px;
/*box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);*/
}
.dropdown2-content a {
float: none;
color: white;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.dropdown2-content a:hover {
background-color: #0275d8;
}
.dropdown2:hover .dropdown2-content {
display: block;
}
/*dropdown - 2 end*/
.logo{
float: left;
width: 4%;
height: auto;
padding: 5px;
}
</style>
</head>
<body>
<!-- navigation bar -->
<div class="navbar">
<img src="images/prof.png" alt="logo" class="logo">
<a href="home.php">Home</a>
<div class="dropdown">
<button class="dropbtn">Plan Your Trip <i class="fa fa-caret-down"></i></button>
<div class="dropdown-content">
<a href="">Hotel & other Accommodation</a>
<a href="">Where To Travel</a>
<a href="">Tour Guide</a>
<a href="">Tour Driver</a>
<a href="travel_agent.php">Travel Agent</a>
</div>
</div>
<a href="">About Us</a>
<a href="">Contact Us</a>
<div class="dropdown2">
<button class="dropbtn">Login<i class="fa fa-caret-down"></i></button>
<div class="dropdown2-content">
<!-- Check Login and Logout of Traveler -->
<?php if (isset($_SESSION["t_id"])) { ?>
<!-- check login -->
<?php if (isset($_SESSION["t_id"])) { ?>
<a href="?logout=1.php">Logout As a Traveler</a>
<?php } else { ?>
<a href="forms/login-t.php">As a Traveler</a>
<?php } ?>
<!-- Check Login and Logout of Traveler End-->
<!-- Check Login and Logout of Travel Agent -->
<?php } if (isset($_SESSION["ta_id"])) { ?>
<!-- check login -->
<?php if (isset($_SESSION["ta_id"])) { ?>
<a href="?logout=1.php">Logout As a Travel Agent</a>
<?php } else if (isset($_SESSION["ta_id"])){ ?>
<a href="forms/login-ta.php">Login As a Travel Agent</a>
<?php } } ?>
<!-- Check Login and Logout of Travel Agent end -->
<a href="forms/login-tg.php">As a Tour Guide</a>
<a href="forms/login-td.php">As a Tour Driver</a>
<a href="forms/login-hm.php">As a Hotel Manager</a>
</div>
</div>
</div>
<!-- navigation bar -->
</body>
<!-- Logout -->
<?php
if(isset($_REQUEST["logout"]))
{
session_destroy();
echo "<script>alert('You are logged out!'); window.location.href='travel_agent.php.' ;</script>";
}
?>
</html>