<?php



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



if(isset($_REQUEST["sf"])){//2017-06-06

	if($_REQUEST["sf"]!=""){

		$strFecha = $_REQUEST["sf"];

	}else{

		$strFecha = "";

	}

}else{

	$strFecha = date("Y-m-d");

}



if(isset($_REQUEST["topCuantos"])){

	if($_REQUEST["topCuantos"]!=""){

		$topCuantos = $_REQUEST["topCuantos"];

	}else{

		$topCuantos = "";

	}

}else{

	$topCuantos = "50";

}





?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>VERIFY EMAIL 1.0</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!-- JQuery -->

<link rel="stylesheet" href="css/jquery-ui.css">



<script type="text/javascript" src="../js/jquery.min.js"></script>

<script type="text/javascript" src="../js/jquery-ui.min.js"></script>

<script type="text/javascript" src="../js/moment.js"></script>

<!-- GENERAL -->

<!--<script type="text/javascript" src="../js/Funciones.js"></script>-->

<!-- GENERAL -->



<script >



$( document ).ready(function() {

	

});





var intEnviadosGral = 0;

var arrDestinatarios = [];

var nConsulta = 0;



var intSolicitudesDia = 0;

var intEnviadosDia = 0;

var strLetrero = "";



var bEnviarCorreoAdmin = true;



function getDatos(){



	nConsulta++;

	$("#divLista").html('<img src="images/consultando.gif"/>');

	

	$("#divLetrero").html( "Consultas: "+ nConsulta );



	arrDestinatarios = [];

	

	var sQuery = "verify-email.php";



	var strDatos = "mode=getPacientes";

	strDatos += "&rnd="+ Math.random();



	$.ajax({

		url: sQuery,

		type: 'POST',

		dataType: 'text',

		data: strDatos

		,success: function(dataNew){

		   	console.log(dataNew);



			$("#divLista").html(dataNew);

			

			var intSegundos = 120; // Cada 2 minutos 

			intSegundos = 60; // Cada 1 minutos 



			setTimeout(function(){ getDatos(); }, (intSegundos*1000) );



		}

		,error:function(xhr, ajaxOptions, thrownError){ 

			

			console.log("ERROR linea 269: "+ xhr.responseText);

			 

			//reloadPage();

			getDatos();

			

		}

	});

	

}



</script>

<style>

body{

	font-size:12px;

	margin:0;

	padding:5;

}

</style>

</head>

<body> <!-- -->



	<div id="divStatsDialog" title="Estadistica" style='border:1px; margin-top:5px;'>

        <div id="divStatsFiltros" style="float:left; width:100%;">

        	<input type="button" id="btnBuscar" value="Buscar" onclick="getDatos()" />

        </div>

    </div>



    <div id="divCabecera" style=" float:left; width:100%; height:24px; background:white; padding: 8px 0px 8px 0px;">

        <div id="divLetrero" style="width:55%; height:17px; float:left; font-size:14px; font-weight:bold; border:1px solid #000;"></div>

        <div id="divEnviados" style="width:25%; height:17px; float:left; font-size:14px; font-weight:bold; border:1px solid #000;"></div>

        <div id="divFechaHora" style="width:19%; height:17px; float:left; font-size:14px; font-weight:bold; background-color:#D1FE30; border:1px solid #000;"></div>

    </div>

    

    <div id="divLista" style="float:left; width:98%; height:auto; margin-top:0px; margin-bottom:50px; display:inline-block; overflow:auto;">

    </div>

    

</body>

</html>

