
<?php
 
 include_once('conexao.php');
 include_once('DAO/DAOnewsletter.php');
 $Daonewsletter  = new Daonewsletter();	
	
	$result =  $Daonewsletter->Listarnewsletter();
		
		foreach($result as $row){
			
			$json[] = array(
				$row["newsletter_id"],
				$row["newsletter_email"], 
				
		
				date("d/m/Y H:i", strtotime($row["newsletter_dt_cadastro"])),
				 

				'		 
				<a href="javascript:void(0)" onclick="deletar_registro('."'".$row["newsletter_id"]."'".','."'".$row["newsletter_email"]."'".')" 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);

     
?>


                                   


