Exemplo n.º 1
0
function asettetap_tanah()
{

		
	$modul = $_REQUEST['menuID'];
	$mode = $_REQUEST['mode'];
	$tab = $_REQUEST['tab'];
	$skpd_id = $_REQUEST['kodeSatker1'];
	$tahun = $_REQUEST['tahun_tanah'];
	$tipe=$_REQUEST['tipe_file'];

	$data=array(
	    "modul"=>$modul,
	    "mode"=>$mode,
	    "tahun"=>$tahun,
	    "skpd_id"=>$skpd_id,
	    "tab"=>$tab
	);

	//mendeklarasikan report_engine. FILE utama untuk reporting
	$REPORT=new report_engine();

	//menggunakan api untuk query berdasarkan variable yg telah dimasukan
	$REPORT->set_data($data);

	$satker = $skpd_id;

		if ($tahun !='')
		{
			$get_satker = $REPORT->validasi_data_satker_id($satker);
			
		}
		
	$paramGol = '01';
	$result_query = $REPORT->ceckGol($get_satker,$tahun,$paramGol);

	if ($result_query){
		print(json_encode(array('status'=>true, 'data'=>$result_query)));
	}else{
		print(json_encode(array('status'=>false)));
	}
	
	exit;
}
$satker = $skpd_id;

	if ($tglawalperolehan !='' && $tglakhirperolehan)
	{
		$get_satker = $REPORT->validasi_data_satker_id($satker);
		
	}

$hit = 1;
$flag = 'Lain';
$TypeRprtr = 'Lain';
$Info = '';
$exeTempTable = $REPORT->TempTable($hit,$flag,$TypeRprtr,$Info,$tglawalperolehan,$tglakhirperolehan,
$skpd_id);
$paramGol = 'Lain';
$resultParamGol = $REPORT->ceckGol($get_satker,$tglawalperolehan,$tglakhirperolehan,$paramGol);

$serviceJson=json_encode($resultParamGol);
//set gambar untuk laporan
$gambar = $FILE_GAMBAR_KABUPATEN;

//retrieve html
$html=$REPORT->retrieve_html_asetLainnya($resultParamGol,$gambar,$skpd_id,$tglawalperolehan,$tglakhirperolehan);

/*$count = count($html);
	for ($i = 0; $i < $count; $i++) {
		 echo $html[$i];     
	}
exit;*/
if($tipe=="3"){
	echo $serviceJson;