-
Notifications
You must be signed in to change notification settings - Fork 0
/
navbar.php
107 lines (100 loc) · 5.42 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
<?php session_start(); ?>
<?php require 'password.php'; ?>
<?php require 'login_modal.php'; ?>
<?php require 'signup_modal.php'; ?>
<?php require 'terms_conditions.php'; ?>
<?php include_once 'functions.php'; ?>
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/custom.css">
<link rel="stylesheet" type="text/css" href="css/basic.css">
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php"><span class="glyphicon glyphicon-home"></span> Milestone Properties</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="divider-vertical" style="height: 35px;margin: 8px 9px;border-left: 1px solid darkgray;border-right: 1px solid darkgray;"></li>
<li><a href="new_listing.php" class="btn btn-lg" style="font-family: 'Helvetica Neue', serif;
font-weight: lighter;"role="button"> Sell</a></li>
<li class="divider-vertical" style="height: 35px;margin: 8px 9px;border-left: 1px solid darkgray;border-right: 1px solid darkgray;"></li>
<li><a href="contact.php" class="btn btn-lg" style="font-family: 'Helvetica Neue', serif;
font-weight: lighter;" role="button"> Contact</a></li>
<li class="divider-vertical" style="height: 35px;margin: 8px 9px;border-left: 1px solid darkgray;border-right: 1px solid darkgray;"></li>
<li><a href="about.php" class="btn btn-lg" style="font-family: 'Helvetica Neue', serif;
font-weight: lighter;" role="button"> About us</a></li>
</ul>
<?php if (isset($_SESSION['id'])){
$name = explode("@",$_SESSION['email']);
if($_SESSION['admin'] == 0){
echo '<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button style="font-family: "Helvetica Neue", serif;
font-weight: lighter;"><span class="glyphicon glyphicon-user"></span> Hello, ' . $name[0] . ' <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="profile_user.php">My Profile</a></li>
<li class="divider"></li>
<!-- Button trigger modal -->
<li><a href="sign_out.php">Sign-out</a></li>
</ul>
</li>
</ul>';
}
elseif($_SESSION['admin'] == 1 ){
echo '<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" style="font-family: "Helvetica Neue", serif;
font-weight: lighter;><span class="glyphicon glyphicon-user"></span> Hello, ' . $name[0] . ' <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="profile_realtor.php">My Profile</a></li>
<li class="divider"></li>
<!-- Button trigger modal -->
<li><a href="sign_out.php">Sign-out</a></li>
</ul>
</li>
</ul>';
}
elseif( $_SESSION['admin'] == 2){
echo '<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" style="font-family: "Helvetica Neue", serif;
font-weight: lighter;><span class="glyphicon glyphicon-user"></span> Hello, ' . $name[0] . ' <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="profile_admin.php">My Profile</a></li>
<li class="divider"></li>
<!-- Button trigger modal -->
<li><a href="sign_out.php">Sign-out</a></li>
</ul>
</li>
</ul>';
}
} else{
echo'<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button style="font-family: "Helvetica Neue", serif;
font-weight: lighter;"><span class="glyphicon glyphicon-user"></span> My Account <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<!-- Button trigger modal -->
<li><a href="#" data-toggle="modal" data-target="#logInModal">Sign-in</a></li>
<li class="divider"></li>
<li><a href="#" data-toggle="modal" data-target="#signUpModal">Sign-up</a></li>
</ul>
</li>
</ul>';
} ?>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script src="js/jquery.js"></script>
<script src="js/script.js"></script>