<?php

		$permission  = explode(',',$_SESSION['permission_id']);
               
        asort($permission); ?>
    <style>
    	.navbar-nav {
    		margin-left: 0px;
    		margin-right: -15px;
		}

		html[dir="rtl"].navbar-nav {
    		margin-left: -15px !important;
		}

		html[dir="rtl"].navbar-nav {
    	margin-right: 0px !important;
		}

		html[dir="rtl"].navbar-brand {
		    
		    padding: 15px 15px;
		}

		.navbar-nav > li {
		    margin-left: -15px;
		}

		.navbar-header {
		    min-width: 100px;
		}

		.dropdown-menu {
    		min-width: 240px;
    	}

    </style>          
						
	<div class="navbar navbar-inverse bg-indigo navbar-fixed-top">
		<div class="navbar-header">
			<a tabindex="1" class="navbar-brand" href="starter.php"><i class="icon-home2 position-left"></i> <span class="multi_lang">الرئيسية</span></a>
			
			<ul class="nav navbar-nav pull-right visible-xs-block">
				<li class="dropdown">
					<a href="#" onclick="show_cart();" class="dropdown-toggle" data-toggle="dropdown">
						<i class="icon-cart-add"></i>
						<span class="badge bg-warning-400 cart-count" >0</span>
					</a>	
					
				</li>

				<li><a data-toggle="collapse" data-target="#navbar-mobile"><i class="icon-tree5"></i></a></li>
			</ul>
		</div>

		<div class="navbar-collapse collapse" id="navbar-mobile">
			<ul class="nav navbar-nav">



				
				

				

				
				<li class="dropdown">
					<a tabindex="3" href="index.php?p=order" class="dropdown-toggle" >
						<i class="icon-pencil6 position-left"></i><span class="multi_lang">Orders</span>
						<span class="visible-xs-inline-block position-right"></span>
					</a>
				</li>
				<li class="dropdown">
					<a tabindex="3" href="index.php?p=invoice" class="dropdown-toggle" >
						<i class="icon-menu6 position-left"></i><span class="multi_lang">Orders List</span>
						<span class="visible-xs-inline-block position-right"></span>
					</a>
				</li>
				

				


				
			</ul>

			

			<ul class="nav navbar-nav navbar-right">
				
				

				<li class="dropdown">
					<a href="#" onclick="show_cart();" class="dropdown-toggle" data-toggle="dropdown">
						<i class="icon-cart-add"></i>
						<span class="visible-xs-inline-block position-right">Cart</span>
						<span class="badge bg-warning-400 cart-count">0</span>
					</a>
					
					
				</li>
				
				
				<?php if(in_array(1,$permission) || in_array(23,$permission) || in_array(27,$permission) || in_array(28,$permission) ){ ?>

				<li class="dropdown">
					<a class="dropdown-toggle" data-toggle="dropdown">
						<i class="icon-cog6 position-left"></i><span class="multi_lang">اعدادات</span> 
						<span class="visible-xs-inline-block position-right"></span>
						<span class="caret"></span>
					</a>

					<ul class="dropdown-menu">
						
						<?php if(in_array(1,$permission) || in_array(23,$permission)  ){ ?>
						<li><a href="index.php?p=setting"><i class="icon-cog6 position-left"></i><span class="multi_lang">اعدادات النظام</span>  </a></li>
						<?php } ?>
						<?php if(in_array(1,$permission) || in_array(27,$permission)  ){ ?>
						<li><a href="index.php?p=languages"><i class="icon-earth position-left"></i><span class="multi_lang">اللغات</span></a></li>
						<?php } ?>
						<?php if(in_array(1,$permission) || in_array(28,$permission)  ){ ?>
						<li><a href="index.php?p=translation"><i class="icon-ampersand2 position-left"></i><span class="multi_lang">الترجمة</span></a></li>
						<?php } ?>
						
						
					</ul>
				</li>

				
				<?php } ?>
				
				

				<li class="dropdown dropdown-user">
					<a class="dropdown-toggle" data-toggle="dropdown">
						<?php if($_SESSION['profile_image']==null){  ?>
						<img src="image/profile/noimg.png" alt="">
						<?php }else{ ?>
						<img src="<?php echo $_SESSION['image_path'].$_SESSION['profile_image']; ?>" alt="">
						<?php } ?>
						<span><?php echo $_SESSION['username']; ?></span>
						<i class="caret"></i>
					</a>

					<ul class="dropdown-menu dropdown-menu-right">
						<li><a href="index.php?p=profile"><i class="icon-user-plus"></i><span class="multi_lang">صفحتي الشخصية</span> </a></li>
						
						<li class="divider"></li>
						<li><a href="models/logout.php"><i class="icon-switch2"></i><span class="multi_lang">تسجيل الخروج</span> </a></li>
					</ul>
				</li>
			</ul>
		</div>
	</div>
	