<?php require_once '../../masterpage/webservice_master.php'; 
	
	header("Access-Control-Allow-Origin: *");
	$surveyor_ID=$_POST['surveyor_ID'];
	$cond = "surveyor_ID='".$surveyor_ID."' AND isActive = 1 AND isDelete = 0 AND  	isCompletedBySurveyor=0";
	$rows = $obj->fetchRowall('lfs_asign_survey',$cond);
	
	$row=array();
	$i=0;
	if($rows){
	foreach ($rows as $rowvalue) {
		$conds = "project_ID='".$rowvalue['project_ID']."' AND isActive = 1 AND isDelete = 0 ";
		$rows = $obj->fetchRowall('lfs_projects',$conds);
		
					if($rows[0]['p_Images1']!=''){
						$image_url = file_get_contents('../../../images/project/'.$rows[0]['p_Images1']);
				$rows[0]['p_Images1']=base64_encode($image_url);
					}
				
				if($rows[0]['p_Images2']!=''){
				$image_url1 = file_get_contents('../../../images/project/'.$rows[0]['p_Images2']);
				$rows[0]['p_Images2']=base64_encode($image_url1);
					}
$row[$i]=$rows[0];
	
	$i++;	
	}
}


	if(!empty($row)){
		echo json_encode($row);
	}
	else
	{
		echo json_encode(0);
	}

?>
