Commit 13019915 by Mei Romauli Sagala

perubahan tampilan sesuai role user

parent 972c0fc8
</div>
<div class="container-fluid">
<nav class="nav navbar-inverse">
<h5>Copyright&copy; 2017 - PA1-1617-D3TI04 - All Right Reserved</h5>
</nav>
</div>
</div>
</body>
......
<?php session_start(); ?>
<!DOCTYPE html>
<html>
<head>
<title>Restoran Pondok Edo</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<title>Restoran Pondok Edo</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/myStyle.css" rel="stylesheet">
<script type="text/javascript" src="js/jquery-ui/jquery-ui.js"></script>
<script src="js/jquery-3.1.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</head>
......@@ -15,18 +17,34 @@
<div class="navbar-header">
<a href="index.html"><img src="picture/logo1.png"></a>
</div>
<ul class="nav navbar-nav">
<li class="active"><a href="index.php"><span class="glyphicon glyphicon-home"></span>Home</a></li>
<li><a href="list_menu.php" ><span class="glyphicon glyphicon-th-list"></span> Menu Makanan</a></li>
<li><a href="bulbul.php"><span class="glyphicon glyphicon-camera"></span> Profil Pantai BulBul</a></li>
</ul>
<ul class="nav navbar-nav">
<li class="active"><a href="index.php"><span class="glyphicon glyphicon-home"></span>Home</a></li>
<?php
if(isset($_SESSION['admin'])){
echo'<li><a href="list_menu.php" ><span class="glyphicon glyphicon-th-list"></span> Menu Makanan</a></li>';
}
elseif(isset($_SESSION['user'])){
echo' <li><a href="list_menu_member.php" ><span class="glyphicon glyphicon-th-list"></span> Menu Makanan</a></li>';
}
?>
<li><a href="bulbul.php"><span class="glyphicon glyphicon-camera"></span> Profil Pantai BulBul</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="cart.php"><span class="glyphicon glyphicon-shopping-cart "></span>&nbsp;Cart</a></li>
<li><a href="form_comment.php"><span class="glyphicon glyphicon-comment"></span> kritik dan saran</a></li>
<?php
if(isset($_SESSION['is_logged_in'])){
echo "<li><a href='form_login.php?logout'><span class='glyphicon glyphicon-log-out'></span> Logout</a></li>";
<?php
if(isset($_SESSION['admin'])){
echo'<li><a href="daftar_pesanan.php"><span class="glyphicon glyphicon-shopping-cart "></span>&nbsp;Daftar comment</a></li>';
}
elseif(isset($_SESSION['user'])){
echo'<li><a href="cart.php"><span class="glyphicon glyphicon-shopping-cart "></span>&nbsp;Cart</a></li>';
}
?>
<li><a href="form_comment.php"><span class="glyphicon glyphicon-comment"></span> kritik dan saran</a></li>
<?php
if(isset($_SESSION['user']) || isset($_SESSION['admin'])){
echo "<li><a href='form_login.php?logout'><span class='glyphicon glyphicon-log-out'></span> Logout</a></li>";
}
else {
echo '<li><a href="form_login.php"><span class="glyphicon glyphicon-log-in"></span>&nbsp;login</a></li>';
......@@ -37,8 +55,8 @@
ob_end_clean();
session_destroy();
header("location:form_login.php");
}
?>
}
?>
</ul>
</div>
</nav>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment