%PDF- %PDF-
| Direktori : /proc/3183/cwd/lacumbrejuriquilla.mx/ |
| Current File : //proc/3183/cwd/lacumbrejuriquilla.mx/mensaje.php |
<HTML>
<HEAD>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-P599GVVLPK"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-P599GVVLPK');
</script>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript" src="js/jquery.js"></script>
<link rel="stylesheet" type="text/css" href="css/styles.css">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
</HEAD>
<BODY>
<?php
// Ingresa tu clave secreta.....
define("RECAPTCHA_V3_SECRET_KEY", '6Lf4P1EaAAAAAJwImjpCfP6Wxv9jwvDaUPhB-0z3');
$token = $_POST['token'];
$action = $_POST['action'];
// call curl to POST request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"https://www.google.com/recaptcha/api/siteverify");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array('secret' => RECAPTCHA_V3_SECRET_KEY, 'response' => $token)));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$arrResponse = json_decode($response, true);
// verificar la respuesta
if($arrResponse["success"] == '1' && $arrResponse["action"] == $action && $arrResponse["score"] >= 0.6) {
// Si entra aqui, es un humano, puedes procesar el formulario
$Nombre = $_POST["nombre"];
$Email = $_POST["email"];
$Telefono = $_POST["telefono"];
$Mensaje = $_POST["mensaje"];
$MEDIO = "";
// $fecha = $_POST["fecha"];
if (isset($_POST["INFORMACION"])){
$MEDIO = $_POST["INFORMACION"];
}
require('class_ith.php');
list($vrNombre,$vrApellido)=fnformatnombre($Nombre);
$comentario="$Mensaje. (Medio: $MEDIO)";
$vrFecha = date("Y-m-d H:i:s");
if (!empty($_POST["fecha"])){
$date = date_create ($_POST["fecha"]);
$fecha= date_format($date,"d/m/Y");
$hora = $_POST["hora"].":00";
$comentario.="||CITA: $fecha|HORA: $hora";
}
$data = array(
'type' => "fnLeadWP",
'name' => $Nombre,
'celular' => $Telefono,
'email' => $Email,
'access' => 10,
'project' => 2,
'company' =>2,
'comentario' =>$comentario
);
$ch = curl_init("https://bsys.mx/siga_ventas/ws_leads_ventas/");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$result = curl_exec($ch); // Submit the POST request
curl_close($ch); // Close cURL session handle
$respuesta=json_decode($result,true);
/*
$iCl = new inf_ith(true);
if($iCl->connect_errno == 0){
$vrLead = " INSERT INTO tb_leads(nombre,apellidos, telefono, correo, medioID, empresaID, proyectoID, fechaRegistro, fechaMod,estatus, comentario) VALUES ('".$vrNombre."','".$vrApellido."','".$Telefono."','".$Email."',10,2,2,now(),now(),'Nuevo','$comentario');";
$iCl->scr =$vrLead;
$res = $iCl->qry('{"funcion": "consulta"}');
$vrBnd = false;
if($res->numero == 5){
$vrBnd=true;
}
}
$iCl->qrc();
//KJHLKJHKJHLH Inserto miriam 290121
*/
$Mensaje2 = $Nombre.':<br><br>'.$Mensaje.'<br><hr>Correo: '.$Email.'<br>Cel: '.$Telefono.'<br><br>Solicitó:'.$MEDIO.'<br><br>Fecha: '.$vrFecha;
$cabeceras = 'MIME-Version: 1.0' . "\r\n";
$cabeceras .= 'Content-type: text/html; charset=utf-8' . "\r\n";
$cabeceras .= 'From: La Cumbre Juriquilla<ventas@Lacumbrejuriquilla.mx';
// $enviado = mail("bsy.drt.ventas@gmail.com","Mensaje de ".$Nombre,$Mensaje2,$cabeceras);
//$enviado = mail("erickl8a.elo@gmail.com","Mensaje de ".$Nombre,$Mensaje2,$cabeceras);
// echo "ok!, eres un humano";
} else {
// Si entra aqui, es un robot....
echo "Lo siento, parece que eres un Robot y no se pudieron enviar tus datos";
}
?>
</BODY>