<?php

header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Headers: *');

require '../../modelo/ad_header.php';
$response = array();

$ad_headers = AdHeader::mdlGetAdHeaders();

if (!$ad_headers) {
    $response['response'] = 'error';
    $response['data'] = 'No se encontraron ad_headers';
    echo json_encode($response);
    return;
}

$response['response'] = 'success';
$response['data'] = $ad_headers;
echo json_encode($response);
return;