<?php
if(count(get_included_files()) ==1) exit("Direct access not permitted.");
if(isset($_POST['ikdata'])){
if (!isset($_SESSION)) session_start();
$db=pDatabase::getInstance();
if(!$db->ceckmodule($cl)) exit;

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 ubahpassword($data){
	$db=pDatabase::getInstance();
	if(!$db->userlogin($_SESSION['profile']['username'],$data[1])) return 2;
	$query="update tb_username set password=? where id=?";
	$pass=$db->genPassword(sha1($data[2]));
	$rs=$db->query($query,array($pass,$_SESSION['profile']['id']));
	return $rs;
}


?>