Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/04/2004, 03:13
miniyo
 
Fecha de Ingreso: noviembre-2003
Mensajes: 45
Antigüedad: 20 años, 5 meses
Puntos: 0
Atascado con una cosa 'simple'

Hola

tengo tres archivos que permiten tener una pequeña charla entre dos usuarios:
uno es talk.html que contiene la siguiente tabla:

<table width="207" height="230" border="1" cellpadding="0" cellspacing="0" bordercolor="#061D35" bgcolor="#323638">
<tr>
<td height="206"><div align="center">
<p><strong><font color="#FFFFFF" size="2">Talk Post</font></strong>
<IFRAME SRC="box.php" WIDTH=210 HEIGHT=210 >
&nbsp;</p>
</div>
</td>
</tr>
< /table>


Luego un php (box.php) con el siguiente código:


?>
</head>

<style type="text/css">
<!--
body {
background-color: #CCCCCC;
}
-->
</style><body>
<div id="Layer1" style="position:absolute; left:159px; top:10px; width:188px; height:186px; z-index:1">
<table width="16%" height="191" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="119" bgcolor="#021422"><form name="form1" method="post" action="box.php">

<input name="name" type="text" id="name4" value="Tu nombre">
<br>
<textarea name="mes" cols="60" rows="20" id="textarea3" scroll=0 >Mensajes r·pidos</textarea>
<br>
<input name="submit" type="submit" id="submit" value="responder">
</form> </td>
</tr><tr>
<td bgcolor=#1C3942><?
$lines = file("talk.txt");
foreach($lines as $message){
$ex = explode("^^",$message);
$m = stripslashes($ex[2]);


echo "
<font size=2 color=#FFFFFF >From: $ex[1]<br>
<font size=2 color=#FFFFFF >Date: $ex[3]<br>
<font size=2 color=#FFFFFF > $m<br>
<hr>
";

}

?>
</tr>
</table>
</font></div>

</body>
</html>
<?
if("$mes" !== ""){

if("$badt" == "true"){
$badwords = file("badwords.txt");
$words = explode(" ",$mes);
foreach ($words as $word){
foreach($badwords as $bword){
$bword = ereg_replace("(\r\n|\n|\r)", "", $bword);
if("$bword" == "$word"){
$word = "$replace";
}
}
$mess[] = "$word ";
}
$mes = join($mess);
}


$ip = $_SERVER['REMOTE_ADDR'];
$date = date("M dS g:iA",time()+ $timefromserver);
$mes = ereg_replace("(\r\n|\n|\r)", "", $mes);
$input = "$ip^^$name^^$mes^^$date $timezone^^ \n";
$fp = fopen("talk.txt","a+");
fputs($fp,$input);
fclose($fp);
echo "<meta http-equiv=refresh content=0;URL=box.php>";
}
?>

Más un txt que almacena las charlas.

La pregunta es muy sencilla , quiero alinear en el centro de un lienzo (760x420) ambos archivos . Es decir , que tanto el html como el php encajen en el centro.

¿Esta es facil no?
PD : se me había olvidado comentar qué linea/s debo tocar para que me admita caracteres extraños , eñes , acentos , etc...


Saludos

Última edición por miniyo; 10/04/2004 a las 03:28