Contacto
(1430) Ciudad Autónoma de Buenos Aires
Tel/Whatsapp: 54 11 4056-2082
E-mail: san.lucas@slucas.com.ar
{source}
<?php
require_once "recaptchalib.php";
header('Content-Type: text/html; charset=iso-8859-1');
$NOMBRE = $_POST["NOMBRE"];
$EMAIL = $_POST["EMAIL"];
$TELEFONO = $_POST["TELEFONO"];
$CONSULTA = $_POST["CONSULTA"];
if($NOMBRE <> "" and $EMAIL <> "" and $TELEFONO <> "" and $CONSULTA <> ""){
// your secret key
$secret = "6LfBrOUfAAAAANBRM-85Bbn8QX02qHTOQvcmXdqZ";
// empty response
$response = null;
// check secret key
$reCaptcha = new ReCaptcha($secret);
// if submitted check response
if ($_POST["g-recaptcha-response"]) {
$response = $reCaptcha->verifyResponse(
$_SERVER["REMOTE_ADDR"],
$_POST["g-recaptcha-response"]
);
}
if ($response != null && $response->success) {
//ENVIA EMAIL
mail("san.lucas@slucas.com.ar","Contacto sitio web",
"Datos:
NOMBRE: $NOMBRE
EMAIL: $EMAIL
TELEFONO: $TELEFONO
CONSULTA: $CONSULTA
---------------------------------------------------
","FROM:Web San Lucas <webmaster@slucas.com.ar>");
$FORM = 0;
} else {
echo "Error de captcha";
$FORM = 1;
}
} else {
$FORM = 1;
}
if ($FORM == 1){
?>
<form action="https://slucas.com.ar/index.php/contacto" method="post">
<table border="0" width="100%" style="border-width: 0px;">
<tbody style="border-width: 0px;">
<tr style="border-width: 0px;">
<td width="164" style="border-width: 0px;">Nombre y Apellido</td>
</tr>
<tr style="border-width: 0px;">
<td style="border-width: 0px;"><input id="NOMBRE" name="NOMBRE" required="" type="text" /></td>
</tr>
<tr style="border-width: 0px;">
<td style="border-width: 0px;">Teléfono</td>
</tr>
<tr style="border-width: 0px;">
<td style="border-width: 0px;"><input id="TELEFONO" name="TELEFONO" required="" type="text" /></td>
</tr>
<tr style="border-width: 0px;">
<td style="border-width: 0px;">Email</td>
</tr>
<tr style="border-width: 0px;">
<td style="border-width: 0px;"><input id="EMAIL" name="EMAIL" required="" type="text" /></td>
</tr>
<tr style="border-width: 0px;">
<td style="border-width: 0px;">Consulta</td>
</tr>
<tr style="border-width: 0px;">
<td style="border-width: 0px;"><textarea id="CONSULTA" style="width: 100%;" name="CONSULTA" rows="5"></textarea>
<div class="g-recaptcha" data-sitekey="6LfBrOUfAAAAANSvHrfgXAwOV7uIuvFaFISFEq_U"> </div>
</td>
</tr>
<tr style="border-width: 0px;">
<td style="border-width: 0px;"><input id="submit" name="submit" type="submit" value="Enviar" /></td>
</tr>
</tbody>
</table>
</form>
<script src='https://www.google.com/recaptcha/api.js?hl=es'></script>
<?php
} else {
echo "<span style='color:red; font-size: 16px;'><strong>El mensaje ha sido enviado. Te responderemos a la brevedad.<br><br>San Lucas Construcciones S.A.</strong></span><br>";
}
?>
{/source}