92 lines
3.6 KiB
PHP
92 lines
3.6 KiB
PHP
|
|
<?php
|
|||
|
|
// ####################################################
|
|||
|
|
// consultar.php
|
|||
|
|
// parte de shoop
|
|||
|
|
// <20> faustino forcen 2005
|
|||
|
|
|
|||
|
|
// ####################################################
|
|||
|
|
// este script muestra una pantalla donde el usuario hace una pregunta determinada
|
|||
|
|
// posibles valores de $tipo:
|
|||
|
|
// 'precio' - necesito el precio del producto descrito en $texto
|
|||
|
|
// 'find' - no encuentro algo
|
|||
|
|
// 'dispo' - cuando un producto estara disponible
|
|||
|
|
// 'buzon' - es una sugerencia
|
|||
|
|
// 'friend' - mandale esta url a un colega.
|
|||
|
|
|
|||
|
|
// en funcion del valor de $tipo el texto que se muestra en el campo consulta varia.
|
|||
|
|
|
|||
|
|
$pregunta = $amigo = $precio = 0;
|
|||
|
|
$tipo = $_REQUEST['k'];
|
|||
|
|
switch($tipo) {
|
|||
|
|
case 'precio':
|
|||
|
|
$precio = 1;
|
|||
|
|
case 'dispo';
|
|||
|
|
$pregunta = 1;
|
|||
|
|
$modelo = str_replace('etperse', '&', $_REQUEST['m']);
|
|||
|
|
$id = $_REQUEST['id'];
|
|||
|
|
break;
|
|||
|
|
case 'friend';
|
|||
|
|
$amigo = 1;
|
|||
|
|
$modelo = str_replace('etperse', '&', $_REQUEST['m']);
|
|||
|
|
break;
|
|||
|
|
case 'find':
|
|||
|
|
case 'buzon':
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if($pregunta) {
|
|||
|
|
$texto = 'Hola,' . "\r" . 'desearía conocer ' . ($precio ? 'el precio' : 'la disponibilidad') .
|
|||
|
|
' del/la ' . $modelo . ' que anuncian en su página web.' . "\r" . "\r" . 'Muchas gracias.';
|
|||
|
|
}
|
|||
|
|
?>
|
|||
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|||
|
|
<html>
|
|||
|
|
<head>
|
|||
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|||
|
|
<link href="_incl/ca.css" rel="stylesheet" type="text/css">
|
|||
|
|
<link href="_incl/sformi.css" rel="stylesheet" type="text/css">
|
|||
|
|
<title>clave audio</title>
|
|||
|
|
|
|||
|
|
<script language="javascript">
|
|||
|
|
function doSubmit() {
|
|||
|
|
var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
|
|||
|
|
if (!filter.test(document.consulta.email.value)){
|
|||
|
|
alert("El email no parece correcto. Compruebelo, por favor.");
|
|||
|
|
} else {
|
|||
|
|
document.consulta.submit();
|
|||
|
|
window.close();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
</script>
|
|||
|
|
<style type="text/css">
|
|||
|
|
<!--
|
|||
|
|
.Estilo1 {font-size: 10px}
|
|||
|
|
-->
|
|||
|
|
</style>
|
|||
|
|
</head>
|
|||
|
|
<body>
|
|||
|
|
<table id="top" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFDC00" width="100%">
|
|||
|
|
<tr>
|
|||
|
|
<td width="118" bgcolor="#000000"><div align="center"><img src="_imgs/logo100.gif" width="100" height="49"></div></td>
|
|||
|
|
<td valign="bottom" width="400" class="title">SOLICITUD DE INFORMACIÓN</td></tr></table>
|
|||
|
|
<form name="consulta" method="post" action="consulta_send.php">
|
|||
|
|
<div align="left">
|
|||
|
|
<input name="id" type="hidden" id="id" value="<?php echo $id; ?>">
|
|||
|
|
</div>
|
|||
|
|
<table border="0" cellspacing="8" cellpadding="0">
|
|||
|
|
<tr><td width="100" class="data"> </td>
|
|||
|
|
<td width="350" class="data Estilo1">Los datos que introduce en este formulario no se conservan en ninguna base de datos. Se utilizan para darle información detallada sobre nuestros productos.<br \>
|
|||
|
|
Responderemos a su cuestión a la mayor brevedad posible.</td>
|
|||
|
|
</tr>
|
|||
|
|
<tr><td align="right" class="lbl">Su email:</td>
|
|||
|
|
<td width="350"><input name="email" type="text" id="email" size="" style="width: 350px;font: 11px Verdana, Arial, Helvetica;"></td></tr>
|
|||
|
|
<tr><td align="right" valign="top" class="lbl">Su consulta:</td>
|
|||
|
|
<td width="350"><textarea name="consulta" rows="6" cols="" style="width: 350px; font: 11px Verdana, Arial, Helvetica;"><?php echo $texto; ?></textarea></td></tr>
|
|||
|
|
<tr><td></td>
|
|||
|
|
<td width="350" align="right"><input name="cancel" type="button" class="data" onClick="javascript:window.close();" value="Cancelar">
|
|||
|
|
<input name="OK" type="button" class="lbl" onClick="javascript:doSubmit();" value="OK"></td></tr>
|
|||
|
|
</table>
|
|||
|
|
</form>
|
|||
|
|
<script language="javascript">document.consulta.email.focus();</script>
|
|||
|
|
</body>
|
|||
|
|
</html>
|