This repository has been archived on 2024-12-02. You can view files and clone it, but cannot push or open issues or pull requests.
AlonsoYSal_Web/src/contacto.php
david 48a56355be - Programación PHP para el formulario de contacto.
- Validaciones HTML5 (algunos errores no se pueden quitar por la librería FancyBox)
- Actualización de FancyBox a v1.3.4
- Limpieza de ficheros

git-svn-id: https://192.168.0.254/svn/Proyectos.AlonsoYSal_Web/trunk@9 4d6e3d7e-063e-4044-a2d3-903626ba9061
2011-11-30 18:49:13 +00:00

226 lines
13 KiB
PHP

<!DOCTYPE html>
<?php
$para = 'info@rodax-software.com';
$nombre = stripslashes($_POST['nombre']);
$email = stripslashes($_POST['email']);
$asunto = "Solicitud de información a través de la web";
$mensaje = "";
$mensaje .= "Nombre: $nombre \r\n";
$mensaje .= "Email: $email \r\n";
$mensaje .= "Mensaje: \r\n" . stripslashes($_POST['mensaje']) . "\r\n\n";
$mensaje .= "--------------------------\r\n";
$mensaje .= "IP: " . $_SERVER["REMOTE_ADDR"] . "\r\n";
$mensaje .= "Navegador: " . $_SERVER["HTTP_USER_AGENT"];
?>
<html lang="es">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width;" />
<link rel="stylesheet" href="styles.css" />
<link rel="stylesheet" href="css/main.css"/>
<link rel="stylesheet" href="css/_print/main.css" media="print"/>
<!--[if IE]><link rel="stylesheet" href="_/css/_patches/win-ie-all.css" media="all" /><![endif]-->
<!--[if IE 7]><link rel="stylesheet" href="_/css/_patches/win-ie7.css" media="all" /><![endif]-->
<!--[if lt IE 7]><link rel="stylesheet" href="_/css/_patches/win-ie-old.css" media="all" /><![endif]-->
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<link href='http://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'/>
<link href="http://fonts.googleapis.com/css?family=Mako:regular" rel="stylesheet" type="text/css" />
<link rel="icon" href="favicon.png" />
<!--[if IE ]><link rel="stylesheet" href="ie.css" media="all"/><![endif]-->
<title>Alonso y Sal</title>
<meta name="description" content="place your description here" />
</head>
<body class="index">
<div id="inner-wrap">
<header>
<section id="logo">
<h1><a href="index.html">Arribas</a></h1>
<p>
<span class="coloured-1">«</span> desde 1980 <span class="coloured-1">»</span>
</p>
</section><!--logo ends here-->
</header>
<div id="main-content-index">
<div id="colours">
<span class="color color-1"></span>
<span class="color color-2"></span>
<span class="color color-3"></span>
<span class="color color-4"></span>
<span class="color color-5"></span>
</div><!--colours ends here-->
<div id="hero-slider">
<div>
<!--div class="mask"-->
<div class="slider-body">
<div class="panel" id="panel-1">
<section class="panelinfo">
<h2>Contacta con nosotros</h2>
<div class="form-wrapper">
<?php
if (count($_POST) == 0) {
$self = $_SERVER['PHP_SELF'];
?>
<form action="<?php echo $self; ?>" method="post" id="contact">
<fieldset>
<ol id="forma">
<li class="form-item">
<div class="errorbox-good">
<div class="ss-item ss-text">
<div class="ss-form-entry">
<label class="ss-q-title" for="entry_0">Nombre<span class="ss-required-asterisk">*</span></label>
<input type="text" name="nombre" value="" class="ss-q-short" id="entry_0" required>
</div><!--ss-item ss-item ss-text ends here-->
</div><!--ss-form-entry ends here-->
</div>
<!--errorbox-good ends here-->
</li>
<li class="form-item2">
<div class="errorbox-good">
<div class="ss-item ss-text">
<div class="ss-form-entry">
<label class="ss-q-title" for="entry_1">email<span class="ss-required-asterisk">*</span></label>
<input type="text" name="email" value="" class="ss-q-short" id="entry_1" required>
</div><!--ss-item ss-item ss-text ends here-->
</div><!--ss-form-entry ends here-->
</div>
<!--errorbox-good ends here-->
</li>
<li class="form-item3">
<div class="errorbox-good">
<div class="ss-item ss-paragraph-text"
>
<div class="ss-form-entry">
<label class="ss-q-title" for="entry_4">Mensaje<span class="ss-required-asterisk">*</span></label>
<textarea name="mensaje" rows="10" cols="75" class="ss-q-long" placeholder="" id="entry_4" required></textarea>
</div><!--ss-item ss-item ss-text ends here-->
</div><!--ss-form-entry ends here-->
</div>
<!--errorbox-good ends here-->
</li>
<li class="form-item6">
<input type="hidden" name="pageNumber" value="0">
<input type="hidden" name="backupCache" value="">
<div class="ss-item ss-navigate">
<div class="ss-form-entry">
<fieldset>
<button type=submit id="buttonsubmit">
&#10026; Enviar
</button>
</fieldset>
</div><!--ss-item ss-navigate ends here-->
</div><!--ss-form entry ends here-->
</li>
</ol>
</fieldset>
</form>
</div><!--form-wrapper ends here-->
<?php
} else {
error_reporting(0);
if (mail($para, $asunto, $mensaje, "From: $email\r\nReply-To: $email\r\nReturn-Path: $email\r\n"))
echo "<p>Gracias por su interés. En breve recibirá más información.</p>";
else
echo "<p>Se ha producido algún error al enviar la información.<br/>Por favor, inténtelo más tarde.</p>";
}
?>
</section>
</div>
</div>
</div>
<!-- .mask ends here-->
<div class="clear"></div>
</div>
<!-- #hero-slider ends here-->
<nav id="side">
<a href="index.html">Inicio</a>
<a href="acerca-de.html">Empresa</a>
<!--a href="service.html">services</a-->
<a href="galeria-exposiciones.html">Exposiciones</a>
<a href="galeria-montajes.html">Montajes</a>
<a href="ofertas.html">Ofertas</a>
<a href="localizacion.html">Tienda</a>
<a href="#" class="current">Contacto </a>
</nav>
<section id="social">
<figure>
<p>
Distribuidores de:
</p>
</figure>
<br/>
<br/>
<figure>
<a href="http://www.infercocinas.es/" target="new"><img src="images/logo_infer_cocinas.gif" alt="Infer Cocinas"/></a>
</figure>
</section>
</div><!--main-content-index ends here-->
<section id="hours">
<div id="panel-hours">
<div class="panelblock">
<article id="opening-hours">
<p>
Lunes&mdash;Viernes: 10:00&mdash;14:00 y 17:00&mdash;20:00 | Sábados: 10:00&mdash;14:00
</p>
</article>
</div><!--panelblock ends here-->
</div><!--panel-hours ends here-->
<div id="bottom-nav">
<a class="btn-slide" href="#"> <div id="triangle-down"></div> Horario</a>
</div>
</section><!--section hours ends here-->
</div><!--inner-wrap ends here-->
<div id="body-background"><img src="images/bg1.jpg" alt="interior full-size photo"/>
</div>
<!--scripts-->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script src="js/jquery.scrollTo-1.4.2-min.js"></script>
<script src="js/jquery.ez-bg-resize.js" charset="utf-8"></script>
<script src="js/lib.js" charset="utf-8"></script>
<script>
$(document).ready(function() {
$("#body-background").ezBgResize();
});
$(window).bind("resize", function() {
$("#body-background").ezBgResize();
});
</script>
<script>
//append click event to the UL list anchor tag
$('#hero-slider ul a').click(function() {
//reset all the items
$('#hero-slider ul a').removeClass('active');
//set current item as active
$(this).addClass('active');
//scroll it to the right position
$('.mask').scrollTo($(this).attr('rel'), 300);
//disable click event
return false;
});
</script>
<script>
$(document).ready(function() {
$(".btn-slide").click(function() {
$("#panel-hours").slideToggle("slow");
$(this).toggleClass("active");
return false;
});
});
</script>
</body>
</html>