<?php 
//$sess_peg=$this->session->userdata('namadepan');
$peg=$this->session->userdata('nama');
$sess_level=$this->session->userdata('level');
$sess_foto=$this->session->userdata('foto');
?>
<?php if ($sess_level!=2){?>
<div class="page-content">
<div class="row">
							<div class="col-xs-12">
								<!-- PAGE CONTENT BEGINS -->
								
								<div class="hr dotted"></div>

								<div>
									<div id="user-profile-1" class="user-profile row">
										<div class="col-xs-12 col-sm-4 center">
											<div>
												<span class="profile-picture">
													<?php if ($sess_foto==null){ echo '<img id="avatar" class="editable img-responsive" alt="" src="'.base_url().'gb_karyawan/not_image.jpg" />';}else{echo '<img id="avatar" class="editable img-responsive" alt="" src="'.base_url().'gb_karyawan/'.$sess_foto.'"   />';}?>
												</span>

												<div class="space-4"></div>

												<div class="width-80 label label-info label-xlg arrowed-in arrowed-in-right">
													<div class="inline position-relative">
														<a href="#" class="user-title-label dropdown-toggle" data-toggle="dropdown">
															<i class="ace-icon fa fa-circle light-green"></i>
															&nbsp;
															<span class="white"><?php echo $sess_peg;?>&nbsp;&nbsp;<?php echo $peg;?></span>
														</a>

														<ul class="align-left dropdown-menu dropdown-caret dropdown-lighter">
															<li class="dropdown-header"> Change Status </li>

															<li>
																<a href="#">
																	<i class="ace-icon fa fa-circle green"></i>
&nbsp;
																	<span class="green">Available</span>
																</a>
															</li>

															<li>
																<a href="#">
																	<i class="ace-icon fa fa-circle red"></i>
&nbsp;
																	<span class="red">Busy</span>
																</a>
															</li>

															<li>
																<a href="#">
																	<i class="ace-icon fa fa-circle grey"></i>
&nbsp;
																	<span class="grey">Invisible</span>
																</a>
															</li>
														</ul>
													</div>
												</div>
											</div>

											<div class="space-6"></div>

											

											<div class="hr hr12 dotted"></div>

											

											<div class="hr hr16 dotted"></div>
										</div>

										<div class="col-xs-12 col-sm-8">
										<table class="table table-bordered">
											<?php $no=1; foreach($pegawai as $s){?>
											<tbody>
											<tr class="info"><td colspan="2" align="center"><b>Data Pegawai</td>
											<tr><td><b>Nama</td><td><?php echo $s->nama; ?></td>
											<tr><td><b>NIP</td><td><?php echo $s->NIP; ?></td>
											<tr><td><b>Pagol</td><td><?php echo $s->pangkat; ?>, <?php echo $s->gol; ?></td>
											<tr><td><b>Unit Kerja</td><td><?php echo $s->kode_unit; ?></td>
											<tr><td><b>Jabatan</td><td><?php echo $s->jabatan; ?></td>
											<tr><td><b>Level</td><td><?php echo $s->nm_level; ?></td>
											<tr><td><b>Tempat,Tgl Lahir</td><td><?php echo $s->tempat_lahir; ?>, <?php echo $s->tgl_lahir; ?></td>
											<tr><td><b>Agama</td><td><?php echo $s->agama; ?></td>
											<tr><td><b>Alamat</td><td><?php echo $s->alamat; ?></td>
											<tr><td><b>Email</td><td><?php echo $s->email_address; ?></td>
											<tr><td><b>Nomor WA</td><td><?php echo $s->wa_number; ?></td>
											<tr><td><b>Nomor HP</td><td><?php echo $s->hp_number; ?></td>
											<tr><td><b>Status Pegawai</td><td><?php echo $s->status_aktif; ?></td>
											</tbody>
											<?php $no++;}?>
										</table>
										
										</div>
										
									</div>
								</div>

								<!-- PAGE CONTENT ENDS -->
							</div><!-- /.col -->
						</div><!-- /.row -->
</div>
<?php }?>
<!--<meta http-equiv="refresh" content="60" >-->
   
	<div id="modal" class="modal fade" tabindex="-1" role="dialog">
	  <div class="modal-dialog" role="document">
	    <div class="modal-content">
	      <div class="modal-header">
	        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
	        <h4 class="widget-title blue smaller">
				<i class="ace-icon fa fa-clock-o bigger-110"></i>
				<?php $hariini = date('d F Y');?>
				Kehadiran Hari Ini  ( <?php echo $hariini;?>) </a>
						
			</h4>
	      </div>
	      <div class="modal-body">
													<div class="widget-main padding-8">
														<div id="profile-feed-1" class="profile-feed">
														
															<?php
															$no=1;
															foreach($absensi as $s)
															{
															?>
															<div class="profile-activity clearfix">
																<div>
																<a class="user" href="#"> <?php echo $s->alias;?> </a>
																	Presensi 
																	<a href="#">
																	
																	<?php  //Muncul Tanggal
																		$datetime5 = $s->jam_scan1;
																		$timehari = date('d F Y', strtotime($datetime5));
																		echo $timehari;
																		?>
																	</a>
																	
		
																	<div class="time">
																		<i class="ace-icon fa fa-clock-o bigger-110"></i>
																		<b>Masuk:</b>
																		<?php 
																		$datetime0 = $s->jam_scan1;
																		$time = date('H:i:s', strtotime($datetime0));;
																		echo $time;
																		?>
																	</div>
																	<div class="time">
																		<i class="ace-icon fa fa-clock-o bigger-110"></i>
																		<b>Pulang:</b> 
																		<?php 
																		$sesudah= date("12:00:00");
																		$datetime0 = $s->jam_scan4;
																		$time = date('H:i:s', strtotime($datetime0));;
																		if ($time<$sesudah){echo '';}else{
																		echo $time;}
																		?>
																	</div>
																</div>

															</div>
															<?php
															$no++;
															}
															?>
															
														</div>
											</div>
	      </div>
	      <div class="modal-footer">
	        <button type="button" class="btn btn-primary" data-dismiss="modal">OK</button>
	      </div>
	    </div><!-- /.modal-content -->
	  </div><!-- /.modal-dialog -->
	</div><!-- /.modal -->
	
    <script type="text/javascript">
			window.jQuery || document.write("<script src='<?php echo base_url();?>assets/js/jquery.min.js'>"+"<"+"/script>");
	</script>
    <script src="<?php echo base_url();?>assets/js/bootstrap.min.js"></script>
<script>
 // $('#modal').modal('show');
</script>


