<?php
//nilai session
$ku_hkode=$_GET['hkode'];
$tiga=$this->db->query("SELECT * from web_login where hkode='$ku_hkode'");
foreach ($tiga->result() as $rt) {
	$sesiku=$rt->sesiku;
	$sesinama=$rt->sesinama;
	$passx=$rt->passx;
	$departemen=$rt->departemen;
	$kd6_session=$rt->sesiku;
	$kodeabsen = $rt->sesiku;
	
}
//simpan
$hariini = date("Y-m-d");
if ((isset($_GET['aksi']) && $_GET['aksi'] == 'masuk'))
	{
	//nilai
	$hariini2=date("Ymd");
	$new_image_name = $sesiku.$hariini2.".jpg";
	//copy...
	move_uploaded_file($_FILES["file"]["tmp_name"], "./upload/selfie/masuk/".$new_image_name);
	exit();
	}
if ((isset($_GET['aksi']) && $_GET['aksi'] == 'pulang'))
	{
	//nilai
	$hariini2=date("Ymd");
	$new_image_name = $sesiku.$hariini2.".jpg";
	//copy...
	move_uploaded_file($_FILES["file"]["tmp_name"], "./upload/selfie/pulang/".$new_image_name);
	exit();
	}
if ((isset($_GET['aksi']) && $_GET['aksi'] == 'wfh'))
		{
		//nilai
		$hariini2=date("Ymd");
		$new_image_name = $sesiku.$hariini2.".jpg";
		//copy...
		move_uploaded_file($_FILES["file"]["tmp_name"], "./upload/selfie/wfh/".$new_image_name);
		exit();
		}
if ((isset($_GET['aksi']) && $_GET['aksi'] == 'absen2'))
		{
		//nilai
		$hariini2=date("Ymd");
		$new_image_name = $sesiku.$hariini2.".jpg";
		//copy...
		move_uploaded_file($_FILES["file"]["tmp_name"], "./upload/selfie/khusus/".$new_image_name);
		exit();
		}








//form
if ((isset($_GET['aksi']) && $_GET['aksi'] == 'form'))
	{
	/*
	//munculkan image terakhir
	$qyuk = mysql_query("SELECT * FROM m_orang ".
							"WHERE kd = '$sesiku'");
	$ryuk = mysql_fetch_assoc($qyuk);
	$yuk_kd = nosql($ryuk['kd']);
	$yuk_filex = balikin($ryuk['filex1']);


	echo '<table width="100%" border="0" cellpadding="5" cellspacing="5">
	<tr align="center">

	<td width="10">&nbsp;</td>
	<td valign="top">


	<img src="'.$sumber.'/filebox/pegawai/'.$yuk_filex.'" width="100%" />


	</td>

	<td width="10">&nbsp;</td>
	</tr>
	</table>

	<br>
	<br>
	<br>';

	 *
	 */


	//re-direct

	?>



	<script language='javascript'>
	//membuat document jquery
	$(document).ready(function(){
			window.location.href = "akun_profil.html";

	});

	</script>

	<?php
	exit();
	}





exit();
?>
