Re: Seguridad en Libro de Visitas GatorV, Que es eso de CAPTCHA?
Aqui les dejo el codigo completo del archivo por si me pueden ayudar, jeje: Código PHP:
<table width="684" border="0" align="right" cellpadding="0" cellspacing="0" class="mrg-uno-arriba"> <tr> <td width="688" valign="top"><div align="right"> <p><img src="images/titulos/interactua_elmuro.jpg" width="684" height="60"></p> <table width="684" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="mrg-dos-right"> <p><font face="Geneva, Arial, Helvetica, sans-serif" size="1">Conectado desde <font color="#999999"><?php echo $REMOTE_ADDR; ?></font></font><br> <font color="#000000" face="Geneva, Arial, Helvetica, sans-serif" size="1"> <?php $hoy=strftime("%A %d de %B de %Y, %H:%M"); $hoy=str_replace("Monday","Lunes",$hoy); $hoy=str_replace("Tuesday","Martes",$hoy); $hoy=str_replace("Wednesday","Miercoles",$hoy); $hoy=str_replace("Thursday","Jueves",$hoy); $hoy=str_replace("Friday","Viernes",$hoy); $hoy=str_replace("Saturday","Sabado",$hoy); $hoy=str_replace("Sunday","Domingo",$hoy); $hoy=str_replace("January","Enero",$hoy); $hoy=str_replace("February","Febrero",$hoy); $hoy=str_replace("March","Marzo",$hoy); $hoy=str_replace("April","Abril",$hoy); $hoy=str_replace("May","Mayo",$hoy); $hoy=str_replace("June","Junio",$hoy); $hoy=str_replace("July","Julio",$hoy); $hoy=str_replace("August","Agosto",$hoy); $hoy=str_replace("September","Septiembre",$hoy); $hoy=str_replace("October","Octubre",$hoy); $hoy=str_replace("November","Noviembre",$hoy); $hoy=str_replace("December","Diciembre",$hoy); echo $hoy; include("conexion.php"); ?> horas. </font></p> <? if ($enviar == "si") { $asunto=$_POST["asunto"]; $comprobar_asunto=substr($asunto,0,5); if (empty($mensaje) or empty($nombre) or $comprobar_asunto == "<META") { echo '<p align="center"><font face="Geneva, Arial, Helvetica, sans-serif" size="3" color="red"><b>EXISTE UN ERROR EN EL MENSAJE. POR FAVOR REVISALO.</b></font></p>'; } else { require("conexion.php"); mysql_db_query("$db","insert into elmuro (nombre,email,fecha,ip,mensaje,asunto) values ('$nombre','$email','$fecha','$ip','$mensaje','$asunto')"); echo '<p align="center"><font face="Geneva, Arial, Helvetica, sans-serif" size="3"><b>Tu Mensaje fue insertado correctamente</b></font></p>'; $resultx=mysql_db_query("$db","select * from elmuro ORDER BY id ASC"); //Mostramos los registros while ($row=mysql_fetch_array($resultx)) { $idz = ''.$row["id"].''; } mysql_free_result($resultx) ; /* recipientes */ $para = "[email protected]"; /* mensaje */ $asuntop = 'Muro Todoalbo.cl - '.$asunto.''; $mensajep = ' <html> <head> <title>Muro Todoalbo.cl</title> </head> <body> <strong>Nombre:</strong> '.$nombre.'<br> <strong>E-Mail:</strong> '.$email.'<br> <strong>Fecha:</strong> '.$fecha.'<br> <strong>Asunto:</strong> '.$asunto.'<br> <br> <strong>Mensaje:</strong> '.$mensaje.'<br> <br> <em>Ip: '.$ip.'</em><br><br> <a href="http://www.todoalbo.cl/set/borrar.php?id='.$idz.'" target="_blank">Borrar Mensaje</a> </body> </html> '; /* Para enviar correo HTML, puede definir la cabecera Content-type. */ $cabeceras = "MIME-Version: 1.0\r\n"; $cabeceras .= "Content-type: text/html; charset=iso-8859-1\r\n"; /* cabeceras adicionales */ $cabeceras .= "From: ".$nombre." <".$email.">\r\n"; /* y ahora, enviarlo */ mail($para, $asuntop, $mensajep, $cabeceras); } } ?><div align="center"><table height="60" border="0" cellspacing="0" bgcolor="#E1E1E1" class="borde-negro"> <tr> <td><? $cuantos="4"; $as_categ_id="1285"; $buscar="colo colo"; $pais="MLC"; include("mercadosocios/horizontal.php"); ?></td> </tr> </table></div> <p align="center"><font face="Geneva, Arial, Helvetica, sans-serif" size="3"><b>- <a href="#escribir">Escribir Mensaje</a> <font color="#000000">-<br> </font>- <a href="javascript: window.location.reload()">Recargar</a> - </b></font></p> <?php include("conexion.php"); $con = mysql_connect("$host","$user","$pass") or die (mysql_error()); mysql_select_db("$db",$con) or die (mysql_error()); $_pagi_sql = "SELECT * FROM elmuro ORDER BY id DESC"; $_pagi_cuantos = 10; $_pagi_nav_num_enlaces = 15; include("paginator.php"); while($row = mysql_fetch_array($_pagi_result)) { ?> <table width=480 height="0" border=0 align=center cellpadding=6 cellspacing=6 bgcolor=#CCCCCC> <tr> <td width="546" height="107" align=left bgcolor="#666666"> <font face="Geneva, Arial, Helvetica, sans-serif" size="2" color="#FFFFFF"><b>Nombre: </b> <? echo $row["nombre"];?><br> <b>E-Mail: </b><? echo $row["email"];?><br> <b>Asunto: </b><? echo $row["asunto"];?><br> <b>Fecha:</b> <? echo $row["fecha"];?> <br><br> <b>Mensaje:</b><br> <? echo nl2br($row["mensaje"]);?> <br> <font size="1"><b>Ip: </b><? echo $row["ip"];?></font></font></td> </tr> </table><br><? }?> <table width=480 height="18" border=0 align="center" cellpadding=0 cellspacing=0 bordercolor="#000000" bgcolor="#FFFFFF"> <tr> <td width="667" height="1" align=center bordercolor="#FF0000" bgcolor="#CCCCCC"><font face="Geneva, Arial, Helvetica, sans-serif" size="2"><? echo $_pagi_navegacion;?></font></td> </tr> </table><br> <table border=1 width=480 cellspacing=1 cellpadding=0 bgcolor=#FFFFFF align="center" bordercolor="#000000"> <tr> <td align=left bgcolor=#999999 bordercolor="#FFFFFF" ><div align="center"><font face="Geneva, Arial, Helvetica, sans-serif"><b> <font size="2" color="#000000"><a name="escribir" id="escribir">::: Añadir mensaje :::</a></font></b> </font></div></td> </tr> <tr> <td align=center height=5 bordercolor="#FFFFFF"><form method="post" action="?sec=elmuro&enviar=si"> <input name="fecha" type="hidden" value="<?php //setlocale(LC_TIME,"spanish"); $hoy=strftime("%A %d de %B de %Y"); $hoy=str_replace("Monday","Lunes",$hoy); $hoy=str_replace("Tuesday","Martes",$hoy); $hoy=str_replace("Wednesday","Miercoles",$hoy); $hoy=str_replace("Thursday","Jueves",$hoy); $hoy=str_replace("Friday","Viernes",$hoy); $hoy=str_replace("Saturday","Sabado",$hoy); $hoy=str_replace("Sunday","Domingo",$hoy); $hoy=str_replace("January","Enero",$hoy); $hoy=str_replace("February","Febrero",$hoy); $hoy=str_replace("March","Marzo",$hoy); $hoy=str_replace("April","Abril",$hoy); $hoy=str_replace("May","Mayo",$hoy); $hoy=str_replace("June","Junio",$hoy); $hoy=str_replace("July","Julio",$hoy); $hoy=str_replace("August","Agosto",$hoy); $hoy=str_replace("September","Septiembre",$hoy); $hoy=str_replace("October","Octubre",$hoy); $hoy=str_replace("November","Noviembre",$hoy); $hoy=str_replace("December","Diciembre",$hoy); echo $hoy; /*6015 6560*/ ?>"> <input name="ip" type="hidden" value="<?php echo $REMOTE_ADDR; ?>"> <font face="Geneva, Arial, Helvetica, sans-serif"> </font> <table border=0 cellspacing=5 height="75"> <tr> <td width="200" height="25" align=right><font face="Geneva, Arial, Helvetica, sans-serif"><b><font size=2>Nombre:</font></b></font></td> <td width="324" height="25" bgcolor="#FFFFFF"><font face="Geneva, Arial, Helvetica, sans-serif"> <input type=text name="nombre" size="40" maxlength="40" class="form-fondo"> </font></td> </tr> <tr> <td width="200" height="1" align=right><font face="Geneva, Arial, Helvetica, sans-serif"><b><font size=2>E-Mail:</font></b></font></td> <td width="324" height="1" bgcolor="#FFFFFF"><font face="Geneva, Arial, Helvetica, sans-serif"> <input type=text name="email" size="40" class="form-fondo"> </font></td> </tr> <tr> <td width="200" height="1" align=right><font face="Geneva, Arial, Helvetica, sans-serif"><b><font size="2">Asunto:</font></b></font></td> <td width="324" height="1" valign="middle" bgcolor="#FFFFFF"><font face="Geneva, Arial, Helvetica, sans-serif"> <input name="asunto" type=text id="asunto" size="40" class="form-fondo"> </font></td> </tr> </table> <font face="Geneva, Arial, Helvetica, sans-serif" size="2"> <b>Mensaje</b><br></font> <textarea name="mensaje" wrap="virtual" cols="40" rows="5" class="form-fondo"></textarea> <br> <br> <br> <input name="submit" type="submit" value=" Añadir " class="form-fondo"> <input name="reset" type="reset" value=" Borrar " class="form-fondo"> </font> </form></td> </tr> </table></td> </tr> </table> </div></td> </tr> </table>
__________________ Pedro Pablo Vivanco D.
Webmaster todoalbo.cl
[email protected] http://www.todoalbo.cl
"Dios creo el Cielo, Colo-Colo le puso todas sus Estrellas" |