echo $texto[h1]; ?>
if($enviar=="SI")
{
if($_POST['asunto']==NULL){ $error1="NO"; }
if($_POST['contenido']==NULL){ $error2="NO"; }
//compruebo el email
if ((strlen($email) >= 6) && (substr_count($email,"@") == 1) && (substr($email,0,1) != "@") && (substr($email,strlen($email)-1,1) != "@")){
if ((!strstr($email,"'")) && (!strstr($email,"\"")) && (!strstr($email,"\\")) && (!strstr($email,"\$")) && (!strstr($email," "))) {
//miro si tiene caracter .
if (substr_count($email,".")>= 1){
//obtengo la terminacion del dominio
$term_dom = substr(strrchr ($email, '.'),1);
//compruebo que la terminación del dominio sea correcta
if (strlen($term_dom)>1 && strlen($term_dom)<5 && (!strstr($term_dom,"@")) ){
//compruebo que lo de antes del dominio sea correcto
$antes_dom = substr($email,0,strlen($email) - strlen($term_dom) - 1);
$caracter_ult = substr($antes_dom,strlen($antes_dom)-1,1);
if ($caracter_ult != "@" && $caracter_ult != ".")
{
$mail_correcto = 1;
}
}
}
}
}
if ($mail_correcto !=1 ){ $error3="NO"; }
if(($error1!='NO') and ($error2!="NO") and ($error3!='NO'))
{
require_once ("includes/class.phpmailer.php");
$mail = new phpmailer();
$mail->PluginDir = "includes/";
include_once("includes/datos_correo.php");
$mail->AddReplyTo($email);
$mail->AddAddress('info@peluqueriacartaya.es');
$mail->Subject = utf8_decode($asunto);
$mail->Body = 'Mensaje enviado desde la web:
'.$email.'Contenido
'.utf8_decode($contenido).'
';
$mail->AltBody = "Contacto desde www.peluqueriacartaya.es";
if(!$mail->Send())
{ ?>
ERROR - El mensaje NO ha sido enviado. Prueba nuevamente.
}
else
{ ?>
El mensaje ha sido enviado correctamente.
}
// Limpio la variable del correo
$mail->ClearAddresses();
}
else
{
?>
ERROR - Corrije los campos en rojo para continuar.
}
}
?>
echo $texto[txt1]; ?>
| Teléfono: |
959 39 12 02 - Preguntar por Sole |
| Email: |
info@peluqueriacartaya.es |
| Dirección: |
Calle Perú, nº10 -
21.450 Cartaya (Huelva) |
| |
|
|
include_once('contenido/pie.php'); ?>