<style type="text/css">
	.width-td{width: 150px;}
	.hidden-h-td{height: 0px;}
</style>

<?php
	$p_array = array(1=>'air','abu','protein_kasar','lemak_kasar','serat_kasar','kalsium','fosfor','tdn','ur','af','andf','mbm');
	$s_array = array(1=>'Air','Abu','Protein Kasar','Lemak Kasar','Serat Kasar','Kalsium','Fosfor','TDN','Ur','Af','aNDF','MBM');
?>

<div class="row">
    <!-- begin col-8 -->
    <div class="col-sm-12">
        <!-- begin panel -->
        <div class="panel panel-grey">
            <div class="panel-heading">
        		<div class="panel-heading-btn">
                  <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-grey" data-click="panel-expand"><i class="fa fa-expand"></i></a>
              </div>
							<?php if(empty($get['create_edit']) && in_array($idGroup, array('1','5')) && $get['status'] === '7') { ?>
								<div class="btn-group" role="group" aria-label="Group Button Penyiapan Sampel">
	              	<a href="<?php echo site_url('sampel/pengajuan') ?>" class="btn btn-primary m-b-5">
										<span class="fa fa-arrow-left"></span> Kembali
									</a>
									<a href="<?php echo site_url('sampel/pengajuan/verifikasi_penyelia?id_uji='.$get['id_uji'].'&status='.$get['status']); ?>" class="btn btn-warning m-b-5 active">Verifikasi Penyelia</a>
									<a href="<?php echo site_url('sampel/pengajuan/tdn?id_uji='.$get['id_uji'].'&status='.$get['status']); ?>" class="btn btn-warning m-b-5">TDN</a>
									<a href="<?php echo site_url('sampel/pengajuan/kadar_air_total?id_uji='.$get['id_uji'].'&status='.$get['status']); ?>" class="btn btn-warning m-b-5">Kadar Air Total</a>
								</div>
							<?php } else{ ?>
								<button type="button" onclick="window.history.back();" class="btn btn-primary m-b-5"><span class="fa fa-arrow-left"></span> Kembali</button>
							<?php } ?>
							<hr>
            </div>
            <div class="panel-body table-responsive">
                <table class="table table-bordered table-hover table-striped table-td-valign-middle">
                	<thead>
                		<tr class="inverse">
	                		<th rowspan="2" class="text-center">No.</th>
											<?php if(in_array($idGroup, array('1','5')) && $get['status'] === '7') { ?>
		                		<th rowspan="2" class="text-center">Aksi</th>
											<?php } ?>
	                		<th rowspan="2" class="text-center">Nomor Sampel</th>
	                		<th colspan="12" class="text-center">Hasil Pengujian (%)</th>
	                	</tr>
	                	<tr class="inverse">
	                		<th class="text-center">Air <input class="width-td hidden-h-td" disabled></th>
	                		<th class="text-center">Abu <input class="width-td hidden-h-td" disabled></th>
	                		<th class="text-center">Protein&nbsp;Kasar <input class="width-td hidden-h-td" disabled></th>
	                		<th class="text-center">Lemak&nbsp;Kasar <input class="width-td hidden-h-td" disabled></th>
	                		<th class="text-center">Serat&nbsp;Kasar <input class="width-td hidden-h-td" disabled></th>
	                		<th class="text-center">Kalsium <input class="width-td hidden-h-td" disabled></th>
	                		<th class="text-center">Fosfor <input class="width-td hidden-h-td" disabled></th>

											<th class="text-center">TDN <input class="width-td hidden-h-td" disabled></th>
											<th class="text-center">Ur <input class="width-td hidden-h-td" disabled></th>
											<th class="text-center">Af <input class="width-td hidden-h-td" disabled></th>
											<th class="text-center">aNDF <input class="width-td hidden-h-td" disabled></th>
											<th class="text-center">MBM <input class="width-td hidden-h-td" disabled></th>
	                	</tr>
                	</thead>
                	<tbody>
						<form method="post" action="<?php echo site_url("sampel/pengajuan/save_uji_sampel") ?>">
                		<?php $z = 0; foreach ($data as $r) { ?>
	                		<tr> <?php $z++; ?>
	                			<td class="text-center"><?php echo $z; ?></td>
												<?php if(in_array($idGroup, array('1','5')) && $get['status'] ==='7') { ?>
		                			<td class="text-center">
		                				<?php echo aksi_button('start'); ?>
													  <?php if(empty($get['create_edit'])){ ?>

													  <?php } ?>
													  <?php if(empty($get['create_edit'])){ ?>
															<li>
																<a href="<?php echo site_url('sampel/pengajuan/mulai_uji_sampel?id_uji='.$get['id_uji'].'&status='.$get['status'].'&create_edit=1') ?>">Edit</a>
															</li>
													  <?php } ?>
													  <?php if(!empty($get['create_edit'])){ ?>
														<li>
															<button class="btn btn-link" type="submit">Simpan</button>
														</li>
													  <?php } ?>
														<?php echo aksi_button('end') ?>
		                			</td>
												<?php }?>
                        <td class="text-center">
					  							<?php echo nomor_id($r['nomor_sampel']);?>
												</td>

							<input type="hidden" name="id_uji" value="<?php echo $get['id_uji'] ?>">
							<input type="hidden" name="status" value="<?php echo $get['status'] ?>">
							<input type="hidden" name="id_sampel[]" value="<?php echo $r['nomor_sampel'] ?>">

						   <?php if(empty($get['create_edit'])){ ?>
								<td class="text-center"><?php echo $r['l_air']?></td>
								<td class="text-center"><?php echo $r['l_abu']?></td>
								<td class="text-center"><?php echo $r['l_protein_kasar']?></td>
								<td class="text-center"><?php echo $r['l_lemak_kasar']?></td>
								<td class="text-center"><?php echo $r['l_serat_kasar']?></td>
								<td class="text-center"><?php echo $r['l_kalsium']?></td>
								<td class="text-center"><?php echo $r['l_fosfor']?></td>

								<td class="text-center"><?php echo $r['l_tdn']?></td>
								<td class="text-center"><?php echo $r['l_ur']?></td>
								<td class="text-center"><?php echo $r['l_af']?></td>
								<td class="text-center"><?php echo $r['l_andf']?></td>
								<td class="text-center"><?php echo $r['l_mbm']?></td>
							<?php } ?>

							<?php if(!empty($get['create_edit'])){ ?>
                            <td><input value="<?php echo $r['l_air'] ?>" id="uji_air<?php echo $r['nomor_sampel'] ?>" class="width-td" type="" name="air[]"></td>
                            <td><input value="<?php echo $r['l_abu'] ?>" id="uji_abu<?php echo $r['nomor_sampel'] ?>" class="width-td" type="" name="abu[]"></td>
                            <td><input value="<?php echo $r['l_protein_kasar'] ?>" id="uji_protein_kasar<?php echo $r['nomor_sampel'] ?>" class="width-td" type="" name="protein_kasar[]"></td>
                            <td><input value="<?php echo $r['l_lemak_kasar'] ?>" id="uji_lemak_kasar<?php echo $r['nomor_sampel'] ?>" class="width-td" type="" name="lemak_kasar[]"></td>
                            <td><input value="<?php echo $r['l_serat_kasar'] ?>" id="uji_serat_kasar<?php echo $r['nomor_sampel'] ?>" class="width-td" type="" name="serat_kasar[]"></td>
                            <td><input value="<?php echo $r['l_kalsium'] ?>" id="uji_kalsium<?php echo $r['nomor_sampel'] ?>" class="width-td" type="" name="kalsium[]"></td>
                            <td><input value="<?php echo $r['l_fosfor'] ?>" id="uji_fosfor<?php echo $r['nomor_sampel'] ?>" class="width-td" type="" name="fosfor[]"></td>

														<td><input value="<?php echo $r['l_tdn'] ?>" id="uji_tdn<?php echo $r['nomor_sampel'] ?>" class="width-td" type="" name="tdn[]"></td>
														<td><input value="<?php echo $r['l_ur'] ?>" id="uji_ur<?php echo $r['nomor_sampel'] ?>" class="width-td" type="" name="ur[]"></td>
														<td><input value="<?php echo $r['l_af'] ?>" id="uji_af<?php echo $r['nomor_sampel'] ?>" class="width-td" type="" name="af[]"></td>
														<td><input value="<?php echo $r['l_andf'] ?>" id="uji_andf<?php echo $r['nomor_sampel'] ?>" class="width-td" type="" name="andf[]"></td>
														<td><input value="<?php echo $r['l_mbm'] ?>" id="uji_mbm<?php echo $r['nomor_sampel'] ?>" class="width-td" type="" name="mbm[]"></td>
												<?php } ?>
                		</tr>
										<?php } ?>
                		<tr>
											<th rowspan="5"></th>
                			<th colspan="<?php if(in_array($idGroup, array('1','5')) && $get['status'] ==='7') { echo 2;} ?>" class="text-center">Metode</th>
											<td><?php echo $this->m_master->getMetodeUji(1)[0]['detail']; ?> </td>
                			<td><?php echo $this->m_master->getMetodeUji(2)[0]['detail']; ?> </td>
                			<td><?php echo $this->m_master->getMetodeUji(3)[0]['detail']; ?> </td>
                			<td><?php echo $this->m_master->getMetodeUji(5)[0]['detail']; ?> </td>
                			<td><?php echo $this->m_master->getMetodeUji(6)[0]['detail']; ?> </td>
                			<td><?php echo $this->m_master->getMetodeUji(7)[0]['detail']; ?> </td>
                			<td><?php echo $this->m_master->getMetodeUji(9)[0]['detail']; ?> </td>

											<td><?php echo $this->m_master->getMetodeUji(10)[0]['detail']; ?></td>
											<td><?php echo $this->m_master->getMetodeUji(11)[0]['detail']; ?></td>
											<td><?php echo $this->m_master->getMetodeUji(12)[0]['detail']; ?></td>
											<td><?php echo $this->m_master->getMetodeUji(13)[0]['detail']; ?></td>
											<td><?php echo $this->m_master->getMetodeUji(14)[0]['detail']; ?></td>
                		</tr>
                		<tr>
                			<th class="text-center" colspan="<?php if(in_array($idGroup, array('1','5')) && $get['status'] ==='7') { echo 2;} ?>">Tanggal&nbsp;Mulai&nbsp;Pengujian</th>
										<?php if(empty($get['create_edit'])){ ?>
											<td class="text-center"><?php echo strpos($r['mulai_uji_air'], '000') === false && !is_null($r['mulai_uji_air']) ? set_indo_date_from_timestemp($r['mulai_uji_air']. ' 00:00:00') : ''?></td>
											<td class="text-center"><?php echo strpos($r['mulai_uji_abu'], '000') === false && !is_null($r['mulai_uji_abu']) ? set_indo_date_from_timestemp($r['mulai_uji_abu']. ' 00:00:00') : ''?></td>
											<td class="text-center"><?php echo strpos($r['mulai_uji_protein_kasar'], '000') === false && !is_null($r['mulai_uji_protein_kasar']) ? set_indo_date_from_timestemp($r['mulai_uji_protein_kasar']. ' 00:00:00') : ''?></td>
											<td class="text-center"><?php echo strpos($r['mulai_uji_lemak_kasar'], '000') === false && !is_null($r['mulai_uji_lemak_kasar']) ? set_indo_date_from_timestemp($r['mulai_uji_lemak_kasar']. ' 00:00:00') : ''?></td>
											<td class="text-center"><?php echo strpos($r['mulai_uji_serat_kasar'], '000') === false && !is_null($r['mulai_uji_serat_kasar']) ? set_indo_date_from_timestemp($r['mulai_uji_serat_kasar']. ' 00:00:00') : ''?></td>
											<td class="text-center"><?php echo strpos($r['mulai_uji_kalsium'], '000') === false && !is_null($r['mulai_uji_kalsium']) ? set_indo_date_from_timestemp($r['mulai_uji_kalsium']. ' 00:00:00') : ''?></td>
											<td class="text-center"><?php echo strpos($r['mulai_uji_fosfor'], '000') === false && !is_null($r['mulai_uji_fosfor']) ? set_indo_date_from_timestemp($r['mulai_uji_fosfor']. ' 00:00:00') : ''?></td>

											<td class="text-center"><?php echo strpos($r['mulai_uji_tdn'], '000') === false && !is_null($r['mulai_uji_tdn']) ? set_indo_date_from_timestemp($r['mulai_uji_tdn']. ' 00:00:00') : ''?></td>
											<td class="text-center"><?php echo strpos($r['mulai_uji_ur'], '000') === false && !is_null($r['mulai_uji_ur']) ? set_indo_date_from_timestemp($r['mulai_uji_ur']. ' 00:00:00') : ''?></td>
											<td class="text-center"><?php echo strpos($r['mulai_uji_af'], '000') === false && !is_null($r['mulai_uji_af']) ? set_indo_date_from_timestemp($r['mulai_uji_af']. ' 00:00:00') : ''?></td>
											<td class="text-center"><?php echo strpos($r['mulai_uji_andf'], '000') === false && !is_null($r['mulai_uji_andf']) ? set_indo_date_from_timestemp($r['mulai_uji_andf']. ' 00:00:00') : ''?></td>
											<td class="text-center"><?php echo strpos($r['mulai_uji_mbm'], '000') === false && !is_null($r['mulai_uji_mbm']) ? set_indo_date_from_timestemp($r['mulai_uji_mbm']. ' 00:00:00') : ''?></td>
										<?php } ?>

										<?php if(!empty($get['create_edit'])){ ?>
                			<td><input value="<?php echo strpos($r['mulai_uji_air'], '000') === false ? $r['mulai_uji_air'] : '' ?>" id="mulai_uji_air<?php echo $r['nomor_sampel'] ?>" class="width-td" type="date" name="mulai_uji_air[]"></td>
                			<td><input value="<?php echo strpos($r['mulai_uji_abu'], '000') === false ? $r['mulai_uji_abu'] : '' ?>" id="mulai_uji_abu<?php echo $r['nomor_sampel'] ?>" class="width-td" type="date" name="mulai_uji_abu[]"></td>
                			<td><input value="<?php echo strpos($r['mulai_uji_protein_kasar'], '000') === false ? $r['mulai_uji_protein_kasar'] : '' ?>" id="mulai_uji_protein_kasar<?php echo $r['nomor_sampel'] ?>" class="width-td" type="date" name="mulai_uji_protein_kasar[]"></td>
                			<td><input value="<?php echo strpos($r['mulai_uji_lemak_kasar'], '000') === false ? $r['mulai_uji_lemak_kasar'] : '' ?>" id="mulai_uji_lemak_kasar<?php echo $r['nomor_sampel'] ?>" class="width-td" type="date" name="mulai_uji_lemak_kasar[]"></td>
                			<td><input value="<?php echo strpos($r['mulai_uji_serat_kasar'], '000') === false ? $r['mulai_uji_serat_kasar'] : '' ?>" id="mulai_uji_serat_kasar<?php echo $r['nomor_sampel'] ?>" class="width-td" type="date" name="mulai_uji_serat_kasar[]"></td>
                			<td><input value="<?php echo strpos($r['mulai_uji_kalsium'], '000') === false ? $r['mulai_uji_kalsium'] : '' ?>" id="mulai_uji_kalsium<?php echo $r['nomor_sampel'] ?>" class="width-td" type="date" name="mulai_uji_kalsium[]"></td>
                			<td><input value="<?php echo strpos($r['mulai_uji_fosfor'], '000') === false ? $r['mulai_uji_fosfor'] : '' ?>" id="mulai_uji_fosfor<?php echo $r['nomor_sampel'] ?>" class="width-td" type="date" name="mulai_uji_fosfor[]"></td>

											<td><input value="<?php echo strpos($r['mulai_uji_tdn'], '000') === false ? $r['mulai_uji_tdn'] : '' ?>" id="mulai_uji_tdn<?php echo $r['nomor_sampel'] ?>" class="width-td" type="date" name="mulai_uji_tdn[]"></td>
											<td><input value="<?php echo strpos($r['mulai_uji_ur'], '000') === false ? $r['mulai_uji_ur'] : '' ?>" id="mulai_uji_ur<?php echo $r['nomor_sampel'] ?>" class="width-td" type="date" name="mulai_uji_ur[]"></td>
											<td><input value="<?php echo strpos($r['mulai_uji_af'], '000') === false ? $r['mulai_uji_af'] : '' ?>" id="mulai_uji_af<?php echo $r['nomor_sampel'] ?>" class="width-td" type="date" name="mulai_uji_af[]"></td>
											<td><input value="<?php echo strpos($r['mulai_uji_andf'], '000') === false ? $r['mulai_uji_andf'] : '' ?>" id="mulai_uji_andf<?php echo $r['nomor_sampel'] ?>" class="width-td" type="date" name="mulai_uji_andf[]"></td>
											<td><input value="<?php echo strpos($r['mulai_uji_mbm'], '000') === false ? $r['mulai_uji_mbm'] : '' ?>" id="mulai_uji_mbm<?php echo $r['nomor_sampel'] ?>" class="width-td" type="date" name="mulai_uji_mbm[]"></td>
										<?php } ?>
                		</tr>

                		<tr>
                			<th class="text-center" colspan="<?php if(in_array($idGroup, array('1','5')) && $get['status'] ==='7') { echo 2;} ?>">Tanggal&nbsp;Selesai&nbsp;Pengujian</th>

										<?php if(empty($get['create_edit'])){ ?>
											<td class="text-center"><?php echo strpos($r['selesai_uji_air'], '000') === false && !is_null($r['selesai_uji_air']) ? set_indo_date_from_timestemp($r['selesai_uji_air']. ' 00:00:00') : ''?></td>
											<td class="text-center"><?php echo strpos($r['selesai_uji_abu'], '000') === false && !is_null($r['selesai_uji_abu']) ? set_indo_date_from_timestemp($r['selesai_uji_abu']. ' 00:00:00') : ''?></td>
											<td class="text-center"><?php echo strpos($r['selesai_uji_protein_kasar'], '000') === false && !is_null($r['selesai_uji_protein_kasar']) ? set_indo_date_from_timestemp($r['selesai_uji_protein_kasar']. ' 00:00:00') : ''?></td>
											<td class="text-center"><?php echo strpos($r['selesai_uji_lemak_kasar'], '000') === false && !is_null($r['selesai_uji_lemak_kasar']) ? set_indo_date_from_timestemp($r['selesai_uji_lemak_kasar']. ' 00:00:00') : ''?></td>
											<td class="text-center"><?php echo strpos($r['selesai_uji_serat_kasar'], '000') === false && !is_null($r['selesai_uji_serat_kasar']) ? set_indo_date_from_timestemp($r['selesai_uji_serat_kasar']. ' 00:00:00') : ''?></td>
											<td class="text-center"><?php echo strpos($r['selesai_uji_kalsium'], '000') === false && !is_null($r['selesai_uji_kalsium']) ? set_indo_date_from_timestemp($r['selesai_uji_kalsium']. ' 00:00:00') : ''?></td>
											<td class="text-center"><?php echo strpos($r['selesai_uji_fosfor'], '000') === false && !is_null($r['selesai_uji_fosfor']) ? set_indo_date_from_timestemp($r['selesai_uji_fosfor']. ' 00:00:00') : ''?></td>

											<td class="text-center"><?php echo strpos($r['selesai_uji_tdn'], '000') === false && !is_null($r['selesai_uji_tdn']) ? set_indo_date_from_timestemp($r['selesai_uji_tdn']. ' 00:00:00') : ''?></td>
											<td class="text-center"><?php echo strpos($r['selesai_uji_ur'], '000') === false && !is_null($r['selesai_uji_ur']) ? set_indo_date_from_timestemp($r['selesai_uji_ur']. ' 00:00:00') : ''?></td>
											<td class="text-center"><?php echo strpos($r['selesai_uji_af'], '000') === false && !is_null($r['selesai_uji_af']) ? set_indo_date_from_timestemp($r['selesai_uji_af']. ' 00:00:00') : ''?></td>
											<td class="text-center"><?php echo strpos($r['selesai_uji_andf'], '000') === false && !is_null($r['selesai_uji_andf']) ? set_indo_date_from_timestemp($r['selesai_uji_andf']. ' 00:00:00') : ''?></td>
											<td class="text-center"><?php echo strpos($r['selesai_uji_mbm'], '000') === false && !is_null($r['selesai_uji_mbm']) ? set_indo_date_from_timestemp($r['selesai_uji_mbm']. ' 00:00:00') : ''?></td>
										<?php } ?>

										<?php if(!empty($get['create_edit'])){ ?>
                			<td><input value="<?php echo strpos($r['selesai_uji_air'], '000') === false ? $r['selesai_uji_air'] : '' ?>" id="selesai_uji_air<?php echo $r['nomor_sampel'] ?>" class="width-td" type="date" name="selesai_uji_air"></td>
                			<td><input value="<?php echo strpos($r['selesai_uji_abu'], '000') === false ? $r['selesai_uji_abu'] : '' ?>" id="selesai_uji_abu<?php echo $r['nomor_sampel'] ?>" class="width-td" type="date" name="selesai_uji_abu"></td>
                			<td><input value="<?php echo strpos($r['selesai_uji_protein_kasar'], '000') === false ? $r['selesai_uji_protein_kasar'] : '' ?>" id="selesai_uji_protein_kasar<?php echo $r['nomor_sampel'] ?>" class="width-td" type="date" name="selesai_uji_protein_kasar"></td>
                			<td><input value="<?php echo strpos($r['selesai_uji_lemak_kasar'], '000') === false ? $r['selesai_uji_lemak_kasar'] : '' ?>" id="selesai_uji_lemak_kasar<?php echo $r['nomor_sampel'] ?>" class="width-td" type="date" name="selesai_uji_lemak_kasar"></td>
                			<td><input value="<?php echo strpos($r['selesai_uji_serat_kasar'], '000') === false ? $r['selesai_uji_serat_kasar'] : '' ?>" id="selesai_uji_serat_kasar<?php echo $r['nomor_sampel'] ?>" class="width-td" type="date" name="selesai_uji_serat_kasar"></td>
                			<td><input value="<?php echo strpos($r['selesai_uji_kalsium'], '000') === false ? $r['selesai_uji_kalsium'] : '' ?>" id="selesai_uji_kalsium<?php echo $r['nomor_sampel'] ?>" class="width-td" type="date" name="selesai_uji_kalsium"></td>
                			<td><input value="<?php echo strpos($r['selesai_uji_fosfor'], '000') === false ? $r['selesai_uji_fosfor'] : '' ?>" id="selesai_uji_fosfor<?php echo $r['nomor_sampel'] ?>" class="width-td" type="date" name="selesai_uji_fosfor"></td>

											<td><input value="<?php echo strpos($r['selesai_uji_tdn'], '000') === false ? $r['selesai_uji_tdn'] : '' ?>" id="selesai_uji_tdn<?php echo $r['nomor_sampel'] ?>" class="width-td" type="date" name="selesai_uji_tdn"></td>
											<td><input value="<?php echo strpos($r['selesai_uji_ur'], '000') === false ? $r['selesai_uji_ur'] : '' ?>" id="selesai_uji_ur<?php echo $r['nomor_sampel'] ?>" class="width-td" type="date" name="selesai_uji_ur"></td>
											<td><input value="<?php echo strpos($r['selesai_uji_af'], '000') === false ? $r['selesai_uji_af'] : '' ?>" id="selesai_uji_af<?php echo $r['nomor_sampel'] ?>" class="width-td" type="date" name="selesai_uji_af"></td>
											<td><input value="<?php echo strpos($r['selesai_uji_andf'], '000') === false ? $r['selesai_uji_andf'] : '' ?>" id="selesai_uji_andf<?php echo $r['nomor_sampel'] ?>" class="width-td" type="date" name="selesai_uji_andf"></td>
											<td><input value="<?php echo strpos($r['selesai_uji_mbm'], '000') === false ? $r['selesai_uji_mbm'] : '' ?>" id="selesai_uji_mbm<?php echo $r['nomor_sampel'] ?>" class="width-td" type="date" name="selesai_uji_mbm"></td>
										<?php } ?>
                		</tr>
										<tr>
											<th colspan="<?php if(in_array($idGroup, array('1','5')) && $get['status'] ==='7') { echo 2;} ?>">Keterangan</th>
											<?php for($i =1; $i<=count($p_array); $i++) { ?>
												<td><?php echo $data[0]['ket_'.$p_array[$i]]; ?></td>
											<?php } ?>
										</tr>
										<tr>
											<th colspan="<?php if(in_array($idGroup, array('1','5')) && $get['status'] ==='7') { echo 2;} ?>"></th>
											<?php for($i =1; $i<=count($p_array); $i++) { ?>
											<td class="text-center">
												<?php if(in_array($idGroup, array('1','5')) && $get['status'] ==='7') { ?>
												<a href="#modal-alert2-<?php echo $p_array[$i] ?>" class="btn btn-danger" data-toggle="modal">Respon</a>
											<?php }else if(in_array($idGroup, array('1','6')) && $get['status'] ==='6' && !is_null($data[0]['ket_'.$p_array[$i]])) {?>
												<a href="#?>" class="btn btn-danger">Uji Ulang</a>
											<?php } ?>
											</td>
										</td>
											<?php } ?>
										</tr>
                		<tr>
                			<td class="" colspan="10" height="5px;"></td>
                		</tr>

									</form>
                	</tbody>
                	<tfoot>

                	</tfoot>
                </table>
            </div>
			<div class="panel-footer">
				<?php if($get['status'] === '6' && empty($get['create_edit'])){ ?>
					<a href="<?php echo site_url('sampel/pengajuan/siapkan_sampel?id_uji='.$id_uji.'&status=7') ?>" class="btn btn-primary btn-md">Selesai Analis</a>
				<?php } ?>
				<?php if($get['status'] === '7' && empty($get['create_edit'])){ ?>
					<a href="<?php echo site_url('sampel/pengajuan/siapkan_sampel?id_uji='.$id_uji.'&status=8') ?>" class="btn btn-primary btn-md">Verifikasi Analisis</a>
					<a href="<?php echo site_url('sampel/pengajuan/siapkan_sampel?id_uji='.$id_uji.'&status=6') ?>" class="btn btn-danger btn-md">Kembalikan ke Analis</a>
				<?php } ?>
				<?php if($get['status'] === '8' && empty($get['create_edit'])){ ?>
					<a href="<?php echo site_url('sampel/pengajuan/siapkan_sampel?id_uji='.$id_uji.'&status=9') ?>" class="btn btn-primary btn-md">ACC LHU</a>
					<a href="<?php echo site_url('sampel/pengajuan/siapkan_sampel?id_uji='.$id_uji.'&status=7') ?>" class="btn btn-warning btn-md">Kembalikan ke Penyelia</a>
				<?php } ?>
			</div>

        </div>
        <!-- end panel -->
    </div>
</div>

<div class="modal fade" id="modal-alert" style="display: none;" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-body">
                <div class="alert alert-danger m-b-0">
                    <p><b>Peringatan:</b> Apakah anda yakin akan membatalkan penyiapan sampel ini?</p>
                </div>
            </div>
            <div class="modal-footer">
                <a href="<?php //echo site_url('sampel/pengajuan/siapkan_sampel?id_uji='.$id_uji.'&status=0') ?>" class="btn width-100 btn-sm btn-primary">Ya</a>
                <a href="javascript:;" class="btn width-100 btn-sm btn-danger" data-dismiss="modal">Tidak</a>
            </div>
        </div>
    </div>
</div>

<?php foreach($p_array as $pr) { ?>
<div class="modal fade" id="modal-alert2-<?php echo $pr; ?>" style="display: none;" aria-hidden="true">
		<div class="modal-dialog">
				<div class="modal-content">
					<form action="<?php echo site_url('sampel/pengajuan/ket_lhu'); ?>" method="get">
						<div class="modal-body">
								<div class="alert alert-info m-b-0">
									<b>Masukkan Alasan:</b>
									<input type="hidden" name="status" value="7">
									<input type="hidden" name="id_uji" value="<?php echo $id_uji;?>">
									<input type="hidden" name="nama_field" value="ket_<?php echo $pr;?>">
									<input type="hidden" name="id_sampel" value="<?php echo $data[0]['id_sampel']; ?>">
									<textarea class="form-control" name="ket"></textarea>
								</div>
						</div>
						<div class="modal-footer">
								<button type="submit" class="btn btn-info btn-sm">Simpan Alasan</button>
								<a href="javascript:;" class="btn width-100 btn-sm btn-danger" data-dismiss="modal">Batal</a>
						</div>
					</form>
				</div>
		</div>
</div>
<?php } ?>
