<?php
include_once 'db_functions.php';     
$db = new DB_Functions();  

$ref_no = $_REQUEST['LeaveNo'];
$cancel_by = $_REQUEST['CancelBy'];
$cancel_remark = $_REQUEST['CancelRemark'];

$response = array(); 

if($ref_no != ""){
	$res = $db->LeaveCancel($ref_no, $cancel_by, $cancel_remark);   
	if($res==1){ 
		$response[] = array('status'=>'1','response'=>'Canceled Successfully.');
	}else{
		$response[] = array('status'=>'0','response'=>'Some Error Occurred.');
	}
}else{
	$response[] = array('status'=>'0','response'=>'Some Error Occurred.');
}

echo json_encode($response); 
?>