Ver Mensaje Individual
  #1 (permalink)  
Antiguo 12/05/2003, 10:47
Avatar de aprendiz_82
aprendiz_82
 
Fecha de Ingreso: diciembre-2002
Ubicación: algun lugar....
Mensajes: 536
Antigüedad: 21 años, 3 meses
Puntos: 1
me pueden ayudar porfavor?!

Hola , como les va? , bueno vengo a solicitar su ayuda porque tengo un problemilla , resulta que yo andaba buscando un sistema de recomendación de sitios web y me encontre con un script muy agradable y muy sencillo , el script estaba en ingles y modifique algunas cosas para pasarlas al español , pero el problema es :

Se supone que cuando uno ingresa una dirección de correo , si la dirección esta mal escrita debe darse una advertencia , para que el usuario pueda corregir la dirección , pues resulta que en este script no sucede eso , ya que si se ingresa un nombre , el sistema se va directamente al mensaje de agradecimiento y no avisa del error , entonces:

A que dirección se enviara el mensaje , si lo que se a escrito es un simple nombre?

Por eso les quisiera dejar el codigo del script para que ustedes lo vean y talvez me pudieran ayudar a corregir el error , ademas yo tengo un sitio donde pruebo los scripts les voy a dejar la dirección para que lo vean , de antemano gracias.

http://index1.webcindario.com/index.html

------------------------------------------------------------------------------------

INDEX.PHP

<!-- PleaseTell Script by JND Designs, 8th March 2002 -->
<!-- Pls visit www.jnddesigns.net or email us : [email protected] -->
<!-- PLS DO NOT REMOVE THIS NOTICE -->
<?
// Check the Install.txt file for installation help
include('config.php');
?>
<style>
body,td{font-family:verdana,arial;font-size:9pt}
</style>
<title>
<?=$PageTitle;?>
</title>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function createForm(number) {
data = "";
inter = "'";
if (number < 16 && number > -1) {
for (i=2; i <= number; i++) {
if (i < 10) spaces=" ";
else spaces=" ";
data = data + "Amigo " + i + " :" + spaces + "<input type='text' size=35 name='f[]'><br>";
}
if (document.layers) {
document.layers.cust.document.write(data);
document.layers.cust.document.close();
}
else {
if (document.all) {
cust.innerHTML = data;
}
}
}
else {
window.alert("Please select up to 15 entries.");
}
}

// End -->
</script>
<h2 align="center"><?=$PageHeader;?></h2>
<?
If(!$sub){
?>
<form name=counter>
<div align="center">
<table width="60%" border="0" cellspacing="1" cellpadding="0" bgcolor="#000066" align="center">
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#99ccff">
<tr>
<td align="center"><b>Numero de Emails a Enviar</b>:
<select name="number">
<option value="1" SELECTED>1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
</select>
<input type=button value="Actualizar" onClick="createForm(counter.number.value);" name="button" class="but">
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</form>
<form action="<?=$PHP_SELF;?>" method="POST" name="webform">
<table width="60%" align="center" bgcolor="#333333" cellspacing="1" cellpadding="0">
<tr><td>
<table width="100%" align="center" cellpadding="2" cellspacing="0" bgcolor="#99ccff">
<tr>


<td align="center"><b>Tu Nombre</b>:
<input type="text" name="Name" size="35"></td>
</tr>
<tr>

<td align="center"><b>Tu Email</b>:
<input type="text" name="Email" size="35"></td>
</tr>
<tr valign="bottom">
<td align="center" height="31"><b>Ingresa El Mail De Destino</b></td>
</tr>
<tr><td></td></tr>
<tr><td align="center"><b>Amigo 1</b> : <input type="text" name="f[]" size="35"><br>
<span id="cust" style="position:relative;"></span>
</td></tr>
<tr><td align="center"><br><b>Tu Mensaje</b>:<br><textarea name="Message" cols="35" rows="5"><?=$PreMessage?></textarea></td></tr>
<tr align="center">
<td> <input type="submit" name="sub" value=" Enviar " class="but"></td>
</tr>
</table>
</td></tr></table>
</form>
<div align="center"><font size="-2">Created by <a href="http://www.jnddesigns.net">JND Designs</a> the PHP specialists</font></div>
<?
} else{
Function error($req){
echo"<br><br><h3 align=\"center\"><font color=\"#FF0000\">$req needed</font><br><a href=\"javascript:history.back()\">&laquo; Back</a></h3>";exit;
}
If(!$Name){error('Name');}
If(!$Email){error('Email');}
if($f[0] == ""){error('Friend 1 Email');}
$count= count($f);
For ($i= 1; $i <= $count; $i++) {
if (!$f[$i] == ""){
if(!eregi("[0-9a-z]([-_.+]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,}$", $f[$i])) {
$friend=$i+1;
echo"<br><br><h3 align=\"center\">El Mail De Tu Amigo $friend, <br><b><font color=\"#FF0000\">$f[$i]</font></b>, <br>Parece No Ser Valido. </h3><br><h3 align=\"center\"><a href=\"javascript:history.back(-1);\">&laquo; Back</a></h3>"; exit; }
}
}
If(!$Message){error('Message');}

echo"<h3 align=\"center\">Gracias Por Recomendarnos.</h3>";
for ($i= 0; $i <= $count; $i++) {
mail($f[$i], $Subject, $Message,"From: $Name<$Email>\r\nReply-To: $Name<$Email>\r\n");
}

If(isset($MailToMe)){
$msg= "Name: $Name
Email: $Email
-------------------------------------------------------------------
Mails sent to:\n";
$msg .=implode("\n", $f);
$msg .="\n-------------------------------------------------------------------";
mail($AdminEmail,"PleaseTell Form",$msg,"From: $Name<$Email>\r\nReply-To: $AdminEmail\r\n");
}

}

------------------------------------------------------------------------------------

CONFIG.PHP


<?
// PleaseTell Script by JND Designs, 8th March 2002
// Pls visit www.jnddesigns.net or email us : [email protected]
// PLS DO NOT REMOVE THIS NOTICE

$PageTitle="PleaseTell v.1.0 by JND Designs"; // On that top bar :)
$PageHeader="PleaseTell v.1.0"; // Page Header

$Subject = "Un Amigo Te Invita A Su Casa!"; //Subject of the mail sent out
$AdminEmail="[email protected]"; // This is Your Email address
$PreMessage ="La Familia Halliwell Quiere Invitarte A Su Casa , Entra En: http://lacasahalliwell.ya.st , Esperamos Que Te Agrade."; // Message to be seen in the form
$MailToMe="1" // 0 - No, 1 - Yes
?>
__________________
El Poder De Uno , El Poder De Todos:pirata:
Que Pasa
Femenina Online