<?php
$page = $this->uri->segment(3); 
?>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>POS Apotek</title> 
    <link href="<?=base_url()?>assets/webadmin/css/bootstrap.css" rel="stylesheet" />
    <link href="<?=base_url()?>assets/webadmin/css/font-awesome.css" rel="stylesheet" /> 
    <link href="<?=base_url()?>assets/webadmin/css/custom-styles.css" rel="stylesheet" />
    <link href="<?=base_url()?>assets/webadmin/images/favicon.png" rel="icon" />
    <link href="<?=base_url()?>assets/webadmin/js/dataTables/dataTables.bootstrap.css" rel="stylesheet" />
    <link href="<?=base_url()?>assets/webadmin/css/tag.css" rel="stylesheet" />
    <link href="<?=base_url()?>assets/webadmin/css/bootstrap-datetimepicker.css" rel="stylesheet" />
    <link href="<?=base_url()?>assets/webadmin/js/daterangepicker.css" rel="stylesheet" />
	<!--<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />-->

	
</head>

<body onload="<?php if($page=="transaksi"){?>startTime() <?php }?>">
    <div id="wrapper">
        <nav class="navbar navbar-default top-navbar" role="navigation">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-collapse">
                    <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="<?=$url?>">POS Apotek</a>
            </div>
            <ul class="nav navbar-top-links navbar-right">
                <li class="dropdown">
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#" aria-expanded="false" style='text-transform:letter'>
                        <i class="fa fa-user fa-fw"></i> <?php echo strtoupper($datasession["idUser"]);?> <i class="fa fa-caret-down"></i> 
                    </a>
                    <ul class="dropdown-menu dropdown-user"> 
                        <li><a href="<?=base_url()?>cms/auth/out"><i class="fa fa-sign-out fa-fw"></i> Logout</a>
                        </li>
                    </ul> 
                </li> 
            </ul>
        </nav>
		<?php
			$now = @$this->uri->segment(3);  
			$activemaster = "";  
			$activeuser = "";  
			if(  $now=="satuan" || $now=="satuan-new" || $now=="barang" || $now=="barang-new" || $now=="supplier" || $now=="supplier-new" || $now=="kategori" || $now=="kategori-new" || $now=="import"){
				$activemaster = "active";
			}  
			if(  $now=="user" || $now=="user-new"){
				$activeuser = "active";
			}  
			
		?>		
		
        <nav class="navbar-default navbar-side" role="navigation"> 
            <div class="sidebar-collapse">
                <ul class="nav" id="main-menu"> 
					<li class='' style='background:#0B2A05;'><a href="<?=$url?>transaksi"><i class="fa fa-dollar"></i> Transaksi Penjualan</a></li>
					<?php if($datasession['akses']!="3"){?>
                    <li class='<?php echo $activemaster;?>'>
                        <a href="#"><i class="fa fa-table"></i> Master<span class="fa arrow"></span></a>
                        <ul class="nav nav-second-level">
                            <li><a href="<?=$url?>kategori"><i class="fa fa-bars fa-fw"></i> Kategori</a></li>
                            <li><a href="<?=$url?>satuan"><i class="fa fa-bars fa-fw"></i> Satuan</a></li>
                            <li><a href="<?=$url?>barang"><i class="fa fa-bars fa-fw"></i> Obat</a></li> 
                            <li><a href="<?=$url?>import"><i class="fa fa-bars fa-fw"></i> Import Excel Obat</a></li> 
                            <li><a href="<?=$url?>supplier"><i class="fa fa-bars fa-fw"></i> Distributor</a></li> 
                        </ul>
                    </li>
					<?php }?>
					<?php if($datasession["akses"]!="2"){?>
					<li class=''><a href="<?=$url?>penjualan"><i class="fa fa-dollar"></i> List Penjualan</a></li> 
					<?php }?>
					<?php
						if($datasession["akses"]=="1"){
					?>
					<li class=''><a href="<?=$url?>mutasi"><i class="fa fa-truck"></i> Mutasi</a></li>
					<li class=''><a href="<?=$url?>pembelian"><i class="fa fa-shopping-cart"></i> Pembelian</a></li>
					<li class=''><a href="<?=$url?>struk"><i class="fa fa-paperclip"></i> Header Struk</a></li> 
					<li class=''><a href="<?=$url?>laporan"><i class="fa fa-usd"></i> Laporan Penjualan</a></li>
					<li class=''><a href="<?=$url?>laporan-laba"><i class="fa fa-usd"></i> Laporan Laba</a></li>
					<li class=''><a href="<?=$url?>laporanp"><i class="fa fa-cubes"></i> Laporan Pembelian</a></li>
					<li class=''><a href="<?=$url?>laporanm"><i class="fa fa-cubes"></i> Laporan Mutasi</a></li>
					<!--<li class=''><a href="<?=$url?>laporan-stok" target='_blank'><i class="fa fa-usd"></i> Laporan Stok</a></li>
					<li class=''><a href="<?=$url?>laporan-stok-excel"><i class="fa fa-usd"></i> Laporan Stok Excel</a></li>-->
					<li class=''><a href="<?=$url?>history-penjualan"><i class="fa fa-dollar"></i> History Penjualan</a></li> 

                    <li class='<?php echo $activeuser;?>'>
                        <a href="#"><i class="fa fa-gears"></i> Setting<span class="fa arrow"></span></a>
                        <ul class="nav nav-second-level">
                            <li><a href="<?=$url?>user"><i class="fa fa-users fa-fw"></i> User</a></li>
                        </ul>
                    </li>
					<?php }?>
                </ul>

            </div>

        </nav>
        <div id="page-wrapper">
            <div id="page-inner">
                <div class="row">
                    <div class="col-md-12">