<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en">
<!--<![endif]-->
<head>
	<?php include 'include_top.php'; ?>
</head>
<body class="">
	<?php
		if(empty($halaman)) $halaman = '';
		if(empty($sub_halaman)) $sub_halaman = '';

		$disposisi = $this->session->userdata('nama_group');
	?>
	<!-- begin #page-loader -->
	<div id="page-loader" class="page-loader fade in"><span class="spinner">Loading...</span></div>
	<!-- end #page-loader -->

	<!-- begin #page-container -->
	<div id="page-container" class="fade page-container page-header-fixed page-sidebar-fixed page-with-two-sidebar page-with-footer">
		<!-- begin #header -->
		<div id="header" class="header navbar navbar-fixed-top navbar-default">
			<!-- begin container-fluid -->
			<div class="container-fluid">
				<!-- begin mobile sidebar expand / collapse button -->
				<div class="navbar-header">
					<a href="index.html" class="navbar-brand"><img style="border: 1px solid #fff; background-color: #fff" src="<?php echo base_url();?>/assets/img/logo.png" class="logo" alt="" /> SIM LAPAK</a>
					<button type="button" class="navbar-toggle" data-click="sidebar-toggled">
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
					</button>
				</div>
				<!-- end mobile sidebar expand / collapse button -->

				<!-- begin navbar-right -->
				<ul class="nav navbar-nav navbar-right">
					<li class="dropdown navbar-user">
						<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">
							<span class="image"><img src="<?php echo base_url();?>/assets/img/admin.png" alt="" /></span>
							<span class="hidden-xs"><?php echo $username; ?></span> <b class="caret"></b>
						</a>
						<ul class="dropdown-menu pull-right">
							<li><a href="javascript:;">Edit Akun</a></li>
							<li class="divider"></li>
							<li><a href="<?php echo site_url('logout'); ?>">Log Out</a></li>
						</ul>
					</li>
				</ul>
				<!-- end navbar-right -->
			</div>
			<!-- end container-fluid -->
		</div>
		<!-- end #header -->

		<!-- begin #sidebar -->
		<div id="sidebar" class="sidebar sidebar-highlight-primary sidebar-inverse">
			<!-- begin sidebar scrollbar -->
			<div data-scrollbar="true" data-height="100%">
				<!-- begin sidebar nav -->
				<ul class="nav">
					<li class="nav-user">
						<div class="image">
							<img src="<?php echo base_url();?>/assets/img/admin.png" alt="" />
						</div>
						<div class="info">
							<div class="name dropdown">
								<a href="javascript:;" data-toggle="dropdown"><?php echo $username; ?> <b class="caret"></b></a>
								<ul class="dropdown-menu">
									<li><a href="javascript:;">Edit Akun</a></li>
									<li class="divider"></li>
									<li><a href="<?php echo site_url('logout'); ?>">Log Out</a></li>
								</ul>
							</div>
							<div class="position"></div>
						</div>
					</li>
					<li class="nav-header">Navigation</li>
					<li class="has-sub <?php echo preg_match("#^index#", uri_string()) ? 'active' : '';?>">
						<a href="<?php echo site_url();?>/index/">
							<i class="fa fa-home"></i>
							<span>Dashboard </span>
						</a>
					<?php if(in_array($id_group, array('1'))) { ?>
					</li>
					<li class="has-sub <?php echo
						preg_match("#^data_user#", uri_string()) ||
						preg_match("#^tambah_akun#", uri_string()) ||
						preg_match("#^edit_akun#", uri_string()) ||
						preg_match("#^data_personil#", uri_string())
					? 'active' : '';?>"
					>
						<a href="javascript:;">
							<b class="caret pull-right"></b>
							<i class="fa fa-users"></i>
							<span>User</span>
						</a>
						<ul class="sub-menu">
							<li class="<?php echo preg_match("#^data_user#", uri_string()) ? 'active' : '';?>">
								<a href="<?php echo site_url('data_user'); ?>">Data User</a>
							</li>
							<li class="<?php echo preg_match("#^data_personil#", uri_string()) ? 'active' : '';?>">
								<a href="<?php echo site_url('data_personil'); ?>">Data personil</a>
							</li>
						</ul>
					</li>
					<?php } ?>

					<?php $menubar = ['permintaan_uji', 'set_data_uji', 'set_data_sampel', 'disposisi', 'sampel/pengajuan', 'sampel/analis', 'sampel/verifikasi', 'pelayuan_sampel', 'pelayuan_sampel_update', 'uji_analis', 'sampel_uji', 'batch_uji', 'save_batch_uji', 'batch_list', 'kontrol_sampel_list', 'batch_sampel_list', 'deret_uji_list', 'save_deret_uji', 'deret_uji_grafik']; ?>
					<li class="has-sub <?php
						foreach($menubar as $m) {
							if(preg_match("#^$m#", uri_string())){
								echo 'active';
							}
						}?>">

						<a href="javascript:;">
							<b class="caret pull-right"></b>
							<i class="fa fa-eye-dropper"></i>
							<span>Sampel</span>
						</a>
						<ul class="sub-menu">
							<?php if(in_array($id_group, array('1','2','4'))) { ?>
							<li class="<?php echo (
								preg_match("#^permintaan_uji#", uri_string()) ||
								preg_match("#^set_data_uji#", uri_string()) ||
								preg_match("#^set_data_sampel#", uri_string()) 
							) ? 'active' : '';?>">
								<a href="<?php echo site_url('permintaan_uji'); ?>">Daftar Permintaan Uji</a>
							</li>
							<?php } ?>

							<?php $menubar = ['disposisi', 'sampel/pengajuan', 'sampel/analis', 'sampel/verifikasi', 'pelayuan_sampel', 'pelayuan_sampel_update', 'uji_analis', 'sampel_uji', 'batch_uji', 'save_batch_uji', 'batch_list', 'kontrol_sampel_list', 'batch_sampel_list', 'deret_uji_list', 'save_deret_uji', 'deret_uji_grafik']; ?>
							<li class="<?php 
								foreach($menubar as $m) {
									if(preg_match("#^$m#", uri_string())){
										echo 'active';
									}
								}
							?>">
								<a href="<?php echo site_url('disposisi'); ?>"><?php echo ($id_group == '1' ? 'Disposisi' : $disposisi);?></a>
							</li>
							<!-- <li class="<?php echo preg_match("#^sampel/pengajuan/disposisi_history#", uri_string()) ? 'active' : '';?>">
								<a href="<?php echo site_url('sampel/pengajuan/disposisi_history'); ?>">Data History</a>
							</li> -->
						</ul>
					</li>
					<li class="has-sub <?php echo
						preg_match("#^inventaris/peralatan#", uri_string()) ||
						preg_match("#^inventaris/bahan_kimia#", uri_string()) ||
						preg_match("#^inventaris/data_sampel#", uri_string()) ||
						preg_match("#^inventaris/glassware#", uri_string()) ||
						preg_match("#^inventaris/bahan_habis_pakai#", uri_string())
					? 'active' : '';?>"
					>
						<a href="javascript:;">
							<b class="caret pull-right"></b>
							<i class="fa fa-database"></i>
							<span>Inventaris/Stockis</span>
						</a>
						<ul class="sub-menu">
							<li class="<?php echo preg_match("#^inventaris/peralatan#", uri_string()) ? 'active' : '';?>">
						<a href="<?php echo site_url('inventaris/peralatan'); ?>">Peralatan</a>
					</li>
							<li class="<?php echo preg_match("#^inventaris/bahan_kimia#", uri_string()) ? 'active' : '';?>">
						<a href="<?php echo site_url('inventaris/bahan_kimia'); ?>">Bahan Kimia</a>
					</li>
									<li class="<?php echo preg_match("#^inventaris/bahan_habis_pakai#", uri_string()) ? 'active' : '';?>">
						<a href="<?php echo site_url('inventaris/bahan_habis_pakai'); ?>">Lab Pakai Habis</a>
					</li>
									<li class="<?php echo preg_match("#^inventaris/glassware#", uri_string()) ? 'active' : '';?>">
						<a href="<?php echo site_url('inventaris/glassware'); ?>">Glassware</a>
					</li>
					<!-- <li class="<?php echo preg_match("#^inventaris/data_sampel#", uri_string()) ? 'active' : '';?>">
						<a href="<?php echo site_url('inventaris/data_sampel'); ?>">Data Sampel</a>
					</li> -->
						</ul>
					</li>
					<li class="has-sub <?php echo preg_match("#^inventaris/pad#", uri_string()) ? 'active' : '';?>">
						<a href="<?php echo site_url('inventaris/pad');?>">
							<i class="fa fa-dollar-sign"></i>
							<span>Data PAD </span>
						</a>
					</li>
					<li class="has-sub <?php echo preg_match("#^akun/akun_saya#", uri_string()) ? 'active' : '';?>">
						<a href="<?php echo site_url('akun/akun_saya');?>">
							<i class="fa fa-user"></i>
							<span>Akun Saya </span>
						</a>
					</li>
					<li class="divider has-minify-btn">
						<!-- begin sidebar minify button -->
						<a href="javascript:;" class="sidebar-minify-btn" data-click="sidebar-minify"><i class="fa fa-angle-left"></i></a>
						<!-- end sidebar minify button -->
					</li>

				</ul>
				<!-- end sidebar nav -->
			</div>
			<!-- end sidebar scrollbar -->
		</div>
		<div class="sidebar-bg"></div>
		<!-- end #sidebar -->

		<!-- begin #content -->
		<div id="content" class="content bg-default">
				<h1 style="font-size: 30px; font-weight:bold;" class="page-header"><?php echo $halaman; ?> <small><?php echo $sub_halaman ?></small></h1>
				<hr style="color: #000;">
			<!-- end page-header -->
			<!-- begin row -->
			<?php if($this->session->flashdata('msg')) : ?>
				<div class="alert-1 alert alert-primary" role="alert">
					<span style="font-weight:bold">SUCCESS: </span><?php echo $this->session->flashdata('msg'); ?>
				</div>
			<?php endif; ?>
			<?php if($this->session->flashdata('msgw')) { ?>
				<div class="alert-1 alert alert-danger" role="alert">
					<span style="font-weight:bold">WARNING: </span><?php echo $this->session->flashdata('msgw'); ?>
				</div>
			<?php } ?>

			{CONTENT}

			<!-- begin #footer -->
			<!-- <div id="footer" class="footer">
				<span class="pull-right">
					<a href="javascript:;" class="btn-scroll-to-top" data-click="scroll-top">
						<i class="fa fa-arrow-up"></i> <span class="hidden-xs">Back to Top</span>
					</a>
				</span>
				&copy; 2019 <b>PT. Delta Sinergi Prima</b> All Right Reserved
			</div> -->
			<!-- end #footer -->
		</div>
		<!-- end #content -->

	</div>
	<!-- end page container -->

	<?php include 'include_bottom.php' ?>



</body>
</html>
