<?php
if(count(get_included_files()) ==1) exit("Direct access not permitted.");
if(isset($_POST['ikdata'])){
header("Content-type: application/json");	
	$data=$_POST['ikdata'];
	$fungsi = strip_tags(stripslashes($data[0]));
	$ex=$fungsi($data);
	if($ex){
		echo $ex;
	}else{
		echo false;
	}
}else{
	echo false;
}


function uLogin($data){
	$db=pDatabase::getInstance();
	$user=stripslashes($data[1]);
	$pw=stripslashes($data[2]);
	return $db->userlogin($user,$pw);
}
function keluar($data){
	$db=pDatabase::getInstance();
	$keluar=$db->delSess();
	if($keluar){
		return true;
	}else{
		return false;
	}
}

?>