
<?php
 
 include_once('conexao.php');
 include_once('DAO/DAOcurriculo.php');
 $Daocurriculo  = new Daocurriculo();	
	
	$result =  $Daocurriculo->Listarcurriculo();
		
		foreach($result as $row){
			
	
			
			$json[] = array(
				$row["cur_id"],
				$row["cur_nome_candidato"], 
				$row["cur_telefone_candidato"], 
				$row["cur_email_candidato"], 
				
				
				
				
		
				date("d/m/Y H:i", strtotime($row["cur_dt_cadastro"])),
				 

				'<a href="view-curriculo.php?acao=editar&cur_id='.$row["cur_id"].'" data-toggle="tooltip" title="Editar">
				<button type="button" class="btn btn-info btn-sm"><span class="ft-edit-2" aria-hidden="true"></span></button>
				</a>
				<a target="_blank" href="uploads/curriculo/'.$row["cur_curriculo"].'" data-toggle="tooltip" title="Download" > 
				 <button type="button" class="btn btn-warning btn-sm"><span class="fa fa-download" aria-hidden="true"></span></button>
				 </a>	
			 
				<a href="javascript:void(0)" onclick="deletar_registro('."'".$row["cur_id"]."'".','."'".$row["cur_nome_candidato"]."'".','."'".$row["car_imagem"]."'".')" data-toggle="tooltip" title="Excluir" > 
				<button type="button" class="btn btn-danger btn-sm"><span class="ft-trash-2" aria-hidden="true"></span></button>
				</a>'
			);
		}
		$response = array();

		$response['aaData'] = $json;
		echo json_encode($response);

     
?>


                                   


