<?php #Incluir messages include 'messages.php'; include '../core/localapi.php'; if ($_POST) { echo localAPI::post($_POST); } ?> <!DOCTYPE html> <html lang="es-MX"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Mensajes - WVT</title> <meta name="description" content="WVT: Mensajes" /> <meta name="keywords" content="wvt, tracking" /> <meta name="MobileOptimized" content="width" /> <meta name="HandheldFriendly" content="true" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="image_src" href="" /> <!-- Bootstrap core CSS --> <link href="http://netdna.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"> <link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet"> <link href='http://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'> <!-- Custom styles for this template -->
<?php #Procesar peticiones ajax if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') { include '../core/localapi.php'; if ($_POST) { $json_return = localAPI::post($_POST); $return = json_decode($json_return); } if ($return->status == '201') { header("HTTP/1.0 201 Created"); } if ($return->status == '409') { header("HTTP/1.0 409 Conflict"); } header("Content-type: application/json; charset=utf-8"); echo $json_return; } else { header("HTTP/1.0 405 Method Not Allowed"); header('Access-Control-Allow-Methods: POST, GET'); die; }