
<?php

header("Access-Control-Allow-Origin: *");
date_default_timezone_set('America/Sao_Paulo');
header('Content-Type: application/json');

ini_set('display_errors', 0 );
error_reporting(0);

//Carrega framework
include('../cms/loader.php');

$sql  = 'SELECT * FROM noticias';
$sql .= " WHERE Ativo = 'Y' AND Data <= NOW()";
$sql .= ' ORDER BY Data DESC';

$res = $db->LoadObjects($sql);

die(json_encode($res));
?>