Ver Mensaje Individual
  #1 (permalink)  
Antiguo 16/10/2010, 15:51
Avatar de miaweb
miaweb
 
Fecha de Ingreso: mayo-2009
Ubicación: Rosario
Mensajes: 9
Antigüedad: 15 años
Puntos: 0
Formulario de contacto web " EL MEJOR"

Formulario de contacto web " EL MEJOR"
A ver quien me ayuda a mejorarlo!!..
Va en dos partes.
Este es "La Solución a renegar"
Sigueme....


parte visual (1)



<?php session_start();
$ojo = "verificado";
session_register("ojo");
?>
<html>
<head>

<link href="../contacto/style.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
<!--
function MM_validateForm() { //v4.0
if (document.getElementById){
var i,p,q,nm,test,num,min,max,errors='',args=MM_valida teForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
if (val) { nm=val.name; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
} if (errors) alert('The following error(s) occurred:\n'+errors);
document.MM_returnValue = (errors == '');
} }
//-->
</script>
<style type="text/css">
<!--
.Estilo3 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; }
.Estilo4 {font-size: 12px}
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #FFFFFF;
font-weight: bold;
}
body {
background-color: #FFFFFF;
}
.Estilo6 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #00CC00; }
.Estilo7 {color: #00FF00}
.Estilo8 {font-size: 18px}
.Estilo9 {color: #CCCCCC}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body>
<bgsound src="#" id="beep" autostart="true">
<form action="../contacto/contacto2.php" method="post" enctype="application/x-www-form-urlencoded" name="form1" onSubmit="MM_validateForm('empresa2','','R','tel2' ,'','R','email2','','RisEmail');return document.MM_returnValue">
<table width="64%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="32%"><span class="Estilo6">&nbsp; Nombre y Apellido</span></td>
<td width="68%">
<input name="nombre" type="text" class="frm1 " id="nombre2"></td>
</tr>
<tr>
<td><span class="Estilo6">&nbsp; Empresa</span></td>
<td>
<input name="empresa" type="text" class="frm1 " id="empresa2"> </td>
</tr>
<tr>
<td><span class="Estilo6">&nbsp; Tel&eacute;fono</span></td>
<td>
<input name="tel" type="text" class="frm1 " id="tel2"> </td>
</tr>
<tr>
<td><span class="Estilo6">&nbsp; Direcci&oacute;n </span></td>
<td>
<input name="direccion" type="text" class="frm1 " id="direccion2"> </td>
</tr>
<tr>
<td><span class="Estilo6">&nbsp; Localidad </span></td>
<td>
<input name="localidad" type="text" class="frm1 " id="localidad"> </td>
</tr>
<tr>
<td><span class="Estilo6">&nbsp; E-Mail</span></td>
<td>
<input name="email" type="text" class="frm1 " id="email2"> </td>
</tr>
<tr>
<td>&nbsp; </td>
<td><span class="Estilo4"></span> </td>
</tr>
<tr>
<td><span class="Estilo6">&nbsp; Comentarios:</span></td>
<td>
<textarea name="obs" cols="30" rows="6" class="frm2 Estilo3 Estilo4" id="textarea"></textarea> </td>
</tr>
</table>
<p align="center">
<input name="Submit" type="submit" class="celda1" value="Enviar"></p>
</form>
</body>
</html>



Parte interna (2)


<?php session_start(); ?>

<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">
<!--
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #FFFFFF;
font-weight: bold;
}
body {
background-color: #00cc00;
}
.Estilo1 {font-size: 16px}
-->
</style></head>
<body>
<div align="center">
<p>&nbsp; </p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>
<?php

if ($ojo == "verificado"){


@mail ("[email protected]", "Formulario de Contacto - De Mi pagia Web", "

---------------------------------------------
DATOS DEL CONTACTO
---------------------------------------------
Nombre: $nombre
Empresa: $empresa
Email: $email
Direccion: $direccion
Telefono: $tel
Localidad: $localidad
---------------------------------------------
Comentario:
$obs

---------------------------------------------
Sent From : $REMOTE_ADDR


", "From: $email\r\nBcc:[email protected]");

@mail ("$email", "Formulario de Contacto - De Mi pagia Web", "

---------------------------------------------
DATOS DEL CONTACTO
---------------------------------------------
Nombre: $nombre
Empresa: $empresa
Email: $email
Direccion: $direccion
Telefono: $tel
Localidad: $localidad
---------------------------------------------
Comentario:
$obs

---------------------------------------------
Sent From : $REMOTE_ADDR


", "From: [email protected]");

echo "Su mensaje ha sido enviado";
}


?>
</p>
</div>
<div align="center"><a href="http://www.mipaginaweb.com.ar/unpeso/index.html" title="regresar" target="_parent" class="Estilo1">REGRESAR</a></div>
</body>
</html>

Acepta el desafío y avisame..