No esta mal, bien hecho xD
![:) :)](https://forum.elhacker.net/Smileys/navidad/smiley.gif)
![;) ;)](https://forum.elhacker.net/Smileys/navidad/wink.gif)
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú
<?php
if (phpversion() >= "4.2.0") {
if ( ini_get('register_globals') != 1 ) {
$supers = array('_REQUEST',
'_ENV',
'_SERVER',
'_POST',
'_GET',
'_COOKIE',
'_SESSION',
'_FILES',
'_GLOBALS' );
foreach( $supers as $__s) {
if ( (isset($$__s) == true) && (is_array( $$__s
) == true) ) extract( $$__s, EXTR_OVERWRITE );
}
unset($supers);
}
} else {
if ( ini_get('register_globals') != 1 ) {
$supers = array('HTTP_POST_VARS',
'HTTP_GET_VARS',
'HTTP_COOKIE_VARS',
'GLOBALS',
'HTTP_SESSION_VARS',
'HTTP_SERVER_VARS',
'HTTP_ENV_VARS'
);
foreach( $supers as $__s) {
if ( (isset($$__s) == true) && (is_array( $$__s
) == true) ) extract( $$__s, EXTR_OVERWRITE );
}
unset($supers);
}
}
if($_POST[nombre]=="")
{
echo "<meta HTTP-EQUIV='refresh' content='1;url=contacto.htm'>";
exit();
}
if($_POST[email]=="")
{
echo "<meta HTTP-EQUIV='refresh' content='1;url=contacto.htm'>";
exit();
}
if($_POST[mensaje]=="")
{
echo "<meta HTTP-EQUIV='refresh' content='1;url=contacto.htm'>";
exit();
}
$respuesta="index.htm"; // URL A LA QUE TE ENVIARA DESPUES DE ENVIARLO
/* AQUÍ ESPECIFICAS EL CORREO AL CUAL QUEIRES QUE SE ENVÍEN LOS DATOS
DEL FORMULARIO, SI QUIERES ENVIAR LOS DATOS A MÁS DE UN CORREO,
LOS PUEDES SEPARAR POR COMAS */
$para ="mail@mail.com"; //////////// AQUI TU EMAIL!
$sujeto = "Contacto"; //////////// EL SUJETO!
$encabezado = "From: $nombre <$email>";
$encabezado .= "\nReply-To: $email";
$encabezado .= "\nX-Mailer: PHP/" . phpversion();
$ip=$REMOTE_ADDR;
// AQUI EDITAS EL MENSAJE QUE TE LLEGARA
$mensaje .= "---------------------------------------------\n";
$mensaje .= "CONTACTO DESDE: $ip\n";
$mensaje .= "---------------------------------------------\n";
$mensaje .= "Nombre: $_POST[nombre]\n";
$mensaje .= "Email: $_POST[email]\n";
$mensaje .= "\n";
$mensaje .= "Mensaje:\n";
$mensaje .= "$_POST[mensaje]\n";
$mensaje .= "---------------------------------------------\n";
if(!mail($para, $sujeto, $mensaje, $encabezado))
{
echo "<meta HTTP-EQUIV='refresh' content='1;url=index.htm'>";
exit();
}
else
{
echo "<meta HTTP-EQUIV='refresh' content='1;url=$respuesta'>";
}
?>
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<title>Contacto / Chocolateria Gnomos</title>
</head>
<body>
<form action="correo.php" method="post" name="Correo">
<table border="0" cellpadding="5" width="90%"
bgcolor="#FFFFCC" style="border-collapse: collapse" bordercolor="#111111" cellspacing="0">
<tr>
<td align="center" valign="top" width="30%">
<font color="#800000" size="2" face="Century Gothic"><strong>Tu
nombre</strong></font></td>
<td align="center"><input type="text" size="40"
name="nombre"></td>
</tr>
<tr>
<td align="center" valign="top" width="30%">
<font color="#800000" face="Century Gothic" size="2"><strong>Tu
e-mail</strong></font></td>
<td align="center"><input type="text" size="40"
name="email"></td>
</tr>
<tr>
<td align="center" valign="top" width="30%">
<font color="#800000" face="Century Gothic" size="2"><strong>Tu
Mensaje</strong></font></td>
<td align="center"><textarea name="mensaje" rows="5"
cols="30" id="mensaje"></textarea> </td>
</tr>
<tr>
<td align="center" valign="top"><input type="submit"
name="Submit" value="Enviar"></td>
<td align="center"> </td>
</tr>
</table>
</form>
<p> </p>
</body>
</html>
<?
$lacarpeta = "unacarpeta";
$dir = opendir($lacarpeta);
while($file = readdir($dir)){
if($file != "." && $file != ".."){
?>
Y los archivos te los mostrará como
<?=$file?>
Puedes hacer un select u otras cosas para que se vea mas comodo
<?php
str_replace($REMOTE_ADDR,"");
?>