<?
/*
Autor: Lic. Carlos Alberto Vaca Coronado
Version: 3.2.0
*/
require "../conexion/conectar.php";

$conexion = new CONDB();
$conexion->conectar();

$rfcemisor=$_POST['id'];
$tipodocto=$_POST['id2'];
$serie=$_POST['id3'];
$folio=$_POST['id4'];
$uuid=$_POST['id5'];
$numeroevento=$_POST['id6'];


$query="Select comentario from detallerecibedoce 
where rfcEmisor='$rfcemisor' and tipoDocto='$tipodocto' and serie='$serie' and folio='$folio' and uuid='$uuid' and numeroevento=$numeroevento limit 1";
$result = mysqli_query($conexion->CONEXION,$query);

if(mysqli_num_rows($result)>0){
	$tmp = mysqli_fetch_array($result,MYSQLI_ASSOC);
	if(trim($tmp["comentario"]) != "<<SAT>>"){
		echo str_replace("<<SAT>>","",$tmp["comentario"]);
	}else{
		echo "Falta verificaci&oacute;n del SAT";
	}
}

$conexion->desconectar();