forked from Biplob14/Restaurant-Finding-System
-
Notifications
You must be signed in to change notification settings - Fork 0
/
navigation.php
165 lines (93 loc) · 6.36 KB
/
navigation.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
<?php session_start(); ?>
<nav class="navbar navbar-inverse navbar-light" style="background-color: #38006f; opacity:0.8" >
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" rel="home" href="index.php" title="Treat dao restaurant Finder">
<img style="max-width:100px; margin-top: -7px;"
src="resource/rms.png" alt="treat dao icon">
</a>
<a class="navbar-brand" href="index.php" title="Resturant Finder System">Resturant Finder System</a>
</div>
<div class="collapse navbar-collapse sticky-top">
<?php
if (isset($_SESSION['email'])) { //user logic
$img= $_SESSION['image'];
echo "
<ul class='nav navbar-nav navbar-right'>
<div class='collapse navbar-collapse sticky-top'>
<ul class='nav navbar-nav navbar-right'>
<li><a style='color:grey;'>{$_SESSION['name']}</a></li>
<li><a><img class='img-responsive' src='$img' height='30px' width='30px'></a></li>
<li><a href='logout.php' ><span class=''></span> Log Out</a></li>
</ul>
</div>
</ul>
";
}
else if (isset($_SESSION['admin'])) { //admin logic
// $img= $_SESSION['image'];
echo "
<ul class='nav navbar-nav navbar-right'>
<div class='collapse navbar-collapse sticky-top'>
<ul class='nav navbar-nav navbar-right'>
<li><a><img class='img-responsive' src='resource/admin.png' height='35px' width='35px'></a></li>
<li><a href='admin/admin_index.php' ><span class=''></span> Admin</a></li>
<li><a href='logout.php' ><span class=''></span> Log Out</a></li>
</ul>
</div>
</ul>
";
}
else if (isset($_SESSION['r_email'])) { //restaurant logic
$img= $_SESSION['r_image'];
echo "
<ul class='nav navbar-nav navbar-right'>
<div class='collapse navbar-collapse sticky-top'>
<ul class='nav navbar-nav navbar-right'>
<li><a href='restaurant_home.php?name={$_SESSION['r_name']}' style='color:#64b5f6;'><b>{$_SESSION['r_name']}</b></a></li>
<li><a><img class='img-responsive' src='$img' height='30px' width='30px'></a></li>
<li><a href='admin/admin_index.php' ><span class=''></span> Admin</a></li>
<li><a href='logout.php' ><span class=''></span> Log Out</a></li>
</ul>
</div>
</ul>
";
}
else
{ //default logic
echo "
<ul class='nav navbar-nav navbar-right'>
<div class='collapse navbar-collapse sticky-top'>
<ul class='nav navbar-nav navbar-right'>
<li class='dropdown'>
<a class='dropdown-toggle' data-toggle='dropdown' href='#' title='Click to sign-up for an account'>Sign-Up<span class='caret'></span></a>
<ul class='dropdown-menu'>
<li><a href='signup.php'>User Sign-Up</a></li>
<li><a href='restaurant_signup.php'>Restaurant Sign-Up</a></li>
</ul>
<li><a href='login.php' title='Click to login on your account'><span class='glyphicon glyphicon-log-in'></span> Login</a></li>
</ul>
</div>
</ul>
";
}
?>
<!-- <ul class='nav navbar-nav navbar-right'>
<li class='dropdown'>
<a class='dropdown-toggle' data-toggle='dropdown' href='#'>Sign-Up<span class='caret'></span></a>
<ul class='dropdown-menu'>
<li><a href='signup.php'>User Sign-Up</a></li>
<li><a href='restaurant_signup.php'>Resturant Sign-Up</a></li>
</ul>
</li>
<li><a href='login.php' ><span class='glyphicon glyphicon-log-in'></span> Login</a></li>
<li><a href='admin/rms_admin.php' ><span class=''></span> Admin</a></li>
</ul> -->
</div>
</div>
</nav>