Formulario de Contacto. Para contactarse con nosotros sírvase completar el siguiente formulario
if (!$HTTP_POST_VARS){ ?>
Nombre:
Apellido:
Dirección:
Localidad:
Provincia:
C.P.:
Teléfono:
E-mail:
Detalle aquí su consulta o comentario:
}else{ //Estoy recibiendo el formulario, compongo el cuerpo $cuerpo = "Formulario enviado\n\n"; $cuerpo .= "Nombre: " . $HTTP_POST_VARS["nombre"] . "\n"; if (eregi("\r",$HTTP_POST_VARS["nombre"]) || eregi("\n",$HTTP_POST_VARS["nombre"]) || eregi("http",$HTTP_POST_VARS["nombre"]) || eregi("://www",$HTTP_POST_VARS["nombre"]) || eregi("url",$HTTP_POST_VARS["nombre"]) || eregi("@",$HTTP_POST_VARS["nombre"])) die("Posible email injection nombre"); $cuerpo .= "Apellido: " . $HTTP_POST_VARS["apellido"] . "\n"; if (eregi("\r",$HTTP_POST_VARS["apellido"]) || eregi("\n",$HTTP_POST_VARS["apellido"]) || eregi("http",$HTTP_POST_VARS["apellido"]) || eregi("://www",$HTTP_POST_VARS["apellido"]) || eregi("url",$HTTP_POST_VARS["apellido"]) || eregi("@",$HTTP_POST_VARS["apellido"])) die("Posible email injection apellido"); $cuerpo .= "Dirección: " . $HTTP_POST_VARS["direccion"] . "\n"; if (eregi("\r",$HTTP_POST_VARS["direccion"]) || eregi("\n",$HTTP_POST_VARS["direccion"]) || eregi("http",$HTTP_POST_VARS["direccion"]) || eregi("://www",$HTTP_POST_VARS["direccion"]) || eregi("url",$HTTP_POST_VARS["direccion"]) || eregi("@",$HTTP_POST_VARS["direccion"])) die("Posible email injection direccion"); $cuerpo .= "Localidad: " . $HTTP_POST_VARS["localidad"] . "\n"; if (eregi("\r",$HTTP_POST_VARS["localidad"]) || eregi("\n",$HTTP_POST_VARS["localidad"]) || eregi("http",$HTTP_POST_VARS["localidad"]) || eregi("://www",$HTTP_POST_VARS["localidad"]) || eregi("url",$HTTP_POST_VARS["localidad"]) || eregi("@",$HTTP_POST_VARS["localidad"])) die("Posible email injection localidad"); $cuerpo .= "Provincia: " . $HTTP_POST_VARS["provincia"] . "\n"; if (eregi("\r",$HTTP_POST_VARS["provincia"]) || eregi("\n",$HTTP_POST_VARS["provincia"]) || eregi("http",$HTTP_POST_VARS["provincia"]) || eregi("://www",$HTTP_POST_VARS["provincia"]) || eregi("url",$HTTP_POST_VARS["provincia"]) || eregi("@",$HTTP_POST_VARS["provincia"])) die("Posible email injection provincia"); $cuerpo .= "C.P.: " . $HTTP_POST_VARS["cp"] . "\n"; if (eregi("\r",$HTTP_POST_VARS["cp"]) || eregi("\n",$HTTP_POST_VARS["cp"]) || eregi("http",$HTTP_POST_VARS["cp"]) || eregi("://www",$HTTP_POST_VARS["cp"]) || eregi("url",$HTTP_POST_VARS["cp"]) || eregi("@",$HTTP_POST_VARS["cp"])) die("Posible email injection cp"); $cuerpo .= "Pais: " . $HTTP_POST_VARS["pais"] . "\n"; if (eregi("\r",$HTTP_POST_VARS["pais"]) || eregi("\n",$HTTP_POST_VARS["pais"]) || eregi("http",$HTTP_POST_VARS["pais"]) || eregi("://www",$HTTP_POST_VARS["pais"]) || eregi("url",$HTTP_POST_VARS["pais"]) || eregi("@",$HTTP_POST_VARS["pais"])) die("Posible email injection pais"); $cuerpo .= "Teléfono: " . $HTTP_POST_VARS["telefono"] . "\n"; if (eregi("\r",$HTTP_POST_VARS["telefono"]) || eregi("\n",$HTTP_POST_VARS["telefono"]) || eregi("http",$HTTP_POST_VARS["telefono"]) || eregi("://www",$HTTP_POST_VARS["telefono"]) || eregi("url",$HTTP_POST_VARS["telefono"]) || eregi("@",$HTTP_POST_VARS["telefono"])) die("Posible email injection telefono"); $cuerpo .= "E-mail: " . $HTTP_POST_VARS["correo"] . "\n"; if (eregi("\r",$HTTP_POST_VARS["correo"]) || eregi("\n",$HTTP_POST_VARS["correo"]) || eregi("http",$HTTP_POST_VARS["correo"]) || eregi("://www",$HTTP_POST_VARS["correo"]) || eregi("url",$HTTP_POST_VARS["correo"]) || eregi(",",$headers) || eregi(";",$headers)) die("Posible email injection correo"); $cuerpo .= "Comentarios: " . $HTTP_POST_VARS["comentarios"] . "\n"; if (eregi("\r",$HTTP_POST_VARS["comentarios"]) || eregi("\n",$HTTP_POST_VARS["comentarios"]) || eregi("http",$HTTP_POST_VARS["comentarios"]) || eregi("://www",$HTTP_POST_VARS["comentarios"]) || eregi("url",$HTTP_POST_VARS["comentarios"]) || eregi("@",$HTTP_POST_VARS["comentarios"])) die("Posible email injection comentarios"); $nombreform = $HTTP_POST_VARS["nombre"]; $correoform = $HTTP_POST_VARS["correo"]; if (eregi("\r",$correoform) || eregi("\n",$correoform) || eregi("http",$correoform) || eregi("://www",$correoform) || eregi("url",$correoform)) die("Posible email injection correos"); $headers .= "From: $nombreform <$correoform>\r\n"; if (eregi(",",$headers) || eregi(";",$headers) || eregi("http",$headers) || eregi("://www",$headers) || eregi("url",$headers)) die("Posible email injection correos"); $headers .= "CC: info@datasygma.com\r\n"; if (eregi(",",$headers) || eregi(";",$headers) || eregi("http",$headers) || eregi("://www",$headers) || eregi("url",$headers)) die("Posible email injection correos"); $headers .= "BCC: info@datasygma.com\r\n"; if (eregi(",",$headers) || eregi(";",$headers) || eregi("http",$headers) || eregi("://www",$headers) || eregi("url",$headers)) die("Posible email injection correos"); $headers .= "Subject: prueba\n"; if (eregi(",",$headers) || eregi(";",$headers) || eregi("http",$headers) || eregi("://www",$headers) || eregi("url",$headers)) die("Posible email injection correos"); //dirección de respuesta, si queremos que sea distinta que la del remitente $headers .= "Reply-To: $correoform\r\n"; if (eregi("http",$headers) || eregi("://www",$headers) || eregi("url",$headers)){ die("Posible email injection2"); }else{ //mando el correo... mail("esteban@datasygma.com.ar","Comentario recibido",$cuerpo,$headers); //doy las gracias por el envío echo "El formulario ha sido enviado correctamente. Muchas Gracias."; } } ?>