Problema foro PHP con netscape 6 y 7.0 Hola :) ,
No se pueden escribir mensajes en mi foro PHP con el navegador Netscape 6.0 y 7.0.
<a href='ir.asp?http://www.uesabadell.org/forum/index.php' target='_blank'>http://www.uesabadell.org/forum/index.ph...</a>
Problema con el formulario iframe?
Alguna sugerencia?
Este es el código de la página.
gracias.
<?
include"header.php";
echo"<br><br><br>";
function parser($cadena){
global $conexion,$prefijo;
$result=mysql_query("SELECT * FROM ".$prefijo."_malas_palabras",$conex ion);
while($row=mysql_fetch_row($result)){
$cadena = ereg_replace("$row[1]","$row[2]",$cadena);
}
$cadena = ereg_replace("'", "''", $cadena);
return $cadena;
}
if (!isset($que)){
echo"<center>Como llegaste hasta aqui?</center>";
include"footer.php";
die;
}
if ($que=='guardar'){
if ($mensaje=='<FONT face=verdana size=-1></FONT>' || $nombre=='' || $titulo==''){echo"<br><br><br& gt;<center>"._CREARERROR1."<br& gt;<br><br><br><input class=\"clsButton\" type=\"button\" value=\"Volver\" OnClick=\"javascript:history.back()\"> ;</center>"; }
else{
$mensaje=parser($mensaje);
$titulo=parser($titulo);
$nombre=parser($nombre);
if(!isset($papi)){$papi=0;}
$result = mysql_query("SELECT anonimos FROM ".$prefijo."_foros where id='$fid'",$conexion);
$row = mysql_fetch_row($result);
if(!isset($fpusuario) && $row[0]==0){echo"<br><br><center>& quot;._CREARMSG2."<br><br><br& gt;<br><a href=\"index.php?fid=$fid\"><img src=\"img/$lenguaje/aceptar.gif\" border=0 align=absmiddle></a></center>";}
else{$result = mysql_query("INSERT INTO ".$prefijo."_mensajes (id,f_id,autor,mensaje,fecha,padre,titulo) VALUES ('', '$fid','$nombre','$mensaje',NOW(),'$papi','$titulo ') ",$conexion);
/************************************************** *******/
/* codigo añadido para el tema de mensajes nuevos ********/
/************************************************** *******/
$result2 = mysql_query("SELECT nick FROM ".$prefijo."_usuarios ",$conexion);
while ($row = mysql_fetch_row($result2) ) {
if ($row[0] != $nombre){
if ($papi != 0) {
$result = mysql_query("INSERT INTO ".$prefijo."_mensajes_nuevos (id_mensaje, usuario) VALUES ('$papi', '$row[0]') ",$conexion);
} else {
$result = mysql_query("INSERT INTO ".$prefijo."_foros_nuevos (id_foro, usuario) VALUES ('$fid', '$row[0]')", $conexion);
}
}
}
/************************************************** *******/
echo"<br><br><center><b& gt;";
if($papi==0)echo""._TOPICO."";
else echo""._MENSAJE."";
echo" "._CREADO."!</b><br><br><br><input class=\"clsButton2\" type=\"button\" value=\"Aceptar\" OnClick=\"javascript:location='$retorno_url'\ "></center>";
}
}
}
if ($que=='topico' || $que=='mensaje'){
$result = mysql_query("SELECT anonimos,abierto FROM ".$prefijo."_foros where id='$fid'",$conexion);
$row = mysql_fetch_row($result);
if($row[1]==0){echo"<br><br><center>& quot;._INDEXMSG3."</center><br><br><br>"; include"footer.php"; exit();}
if(!isset($fpusuario) && $row[0]==0)echo"<br><br><center>&q uot;._CREARMSG2."<br><br><br&g t;<br><a href=\"javascript:history.back()\">&l t;img src=\"img/$lenguaje/aceptar.gif\" border=0 align=absmiddle></a></center>";
else{
echo"
<script language=\"JavaScript\">
<!-- Hide from older browsers...
function FormatText(command, option){
frames.mensaje.document.execCommand(command, true, option);
frames.mensaje.focus();
}
// -->
</script>
<table width=500 cellspacing=1 cellpadding=2 align=center bgcolor=#CCCCCC>
<tr>
<td bgcolor=FFFFFF><center><b>";
if ($que=='topico'){echo""._CREARTOPICO.&qu ot;"; $retorno_url="index.php?fid=$fid";}
elseif($que=='mensaje'){echo""._CREARMEN SAJE.""; $retorno_url="index.php?fid=$fid&up=$padr e";}
echo"</b></center></td></tr>
<tr>
<td bgcolor=EEEEEE>
<form name=\"crear\" method=\"post\" action=\"crear.php?que=guardar\">
<input type=\"hidden\" name=\"retorno_url\" value=\"$retorno_url\">
<table width=\"300\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\">
<tr><td colspan=2>"._CREARMSG1."<br>< ;br></td></tr>
<tr>
<td align=\"left\" valign=\"middle\">"._NOMBRE.&quo t;:</td>
<td>";
if(isset($fpusuario)){
echo"$infocookie[0]";
}
else echo""._ANONIMO."";
echo"</td>
</tr>";
if ($que=='topico')echo"
<tr>
<td align=\"left\" valign=\"middle\"><b>"._TI TULO.":</b></td>
<td>
<input class=\"clsTextbox\" type=\"text\" name=\"titulo\">
</td>
</tr>";
echo"<tr>
<td align=\"left\" valign=\"top\"><b>"._MENSA JE.":</b></td>
<td>
<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td>
<img src=\"img/post_button_cut.gif\" width=\"25\" height=\"24\" align=\"absmiddle\" OnClick=\"FormatText('cut')\" style=\"cursor: hand;\" alt=\"Tallar\">
<img src=\"img/post_button_copy.gif\" width=\"25\" height=\"24\" align=\"absmiddle\" OnClick=\"FormatText('copy')\" style=\"cursor: hand;\" alt=\"Copiar\">
<img src=\"img/post_button_paste.gif\" width=\"25\" height=\"24\" align=\"absmiddle\" OnClick=\"FormatText('paste')\" style=\"cursor: hand;\" alt=\"Enganxar\">
<img src=\"img/post_button_bold.gif\" width=\"25\" height=\"24\" align=\"absmiddle\" alt=\"Negreta\" OnClick=\"FormatText('bold', '')\" style=\"cursor: hand;\">
<img src=\"img/post_button_italic.gif\" width=\"25\" height=\"24\" align=\"absmiddle\" alt=\"Cursiva\" OnClick=\"FormatText('italic', '')\" style=\"cursor: hand;\">
<img src=\"img/post_button_underline.gif\" width=\"25\" height=\"24\" align=\"absmiddle\" alt=\"Subratllat\" OnClick=\"FormatText('underline', '')\" style=\"cursor: hand;\">
<img src=\"img/post_button_left_just.gif\" width=\"25\" height=\"24\" align=\"absmiddle\" OnClick=\"FormatText('JustifyLeft', '')\" style=\"cursor: hand;\" alt=\"Alinear a l`esquerra\">
<img src=\"img/post_button_centre.gif\" width=\"25\" height=\"24\" align=\"absmiddle\" border=\"0\" alt=\"Centrar\" OnClick=\"FormatText('JustifyCenter', '')\" style=\"cursor: hand;\">
<img src=\"img/post_button_right_just.gif\" width=\"25\" height=\"24\" align=\"absmiddle\" OnClick=\"FormatText('JustifyRight', '')\" style=\"cursor: hand;\" alt=\"Alinear a la dreta\">
<img src=\"img/post_button_list.gif\" width=\"25\" height=\"24\" align=\"absmiddle\" border=\"0\" alt=\"Llista\" OnClick=\"FormatText('InsertUnorderedList', '')\" style=\"cursor: hand;\">
<img src=\"img/post_button_outdent.gif\" width=\"25\" height=\"24\" align=\"absmiddle\" OnClick=\"FormatText('Outdent', '')\" style=\"cursor: hand;\" alt=\"Reduir sagnia\">
<img src=\"img/post_button_indent.gif\" width=\"25\" height=\"24\" align=\"absmiddle\" border=\"0\" alt=\"Aumentar sangnia\" OnClick=\"FormatText('indent', '')\" style=\"cursor: hand;\">
<img src=\"img/post_button_hyperlink.gif\" width=\"25\" height=\"24\" align=\"absmiddle\" border=\"0\" alt=\"Crear hipervíncle\" OnClick=\"FormatText('createLink')\" style=\"cursor: hand;\">
</td>
</tr>
</table>
<iframe class=\"texto\" src=\"blank.html\" id=\"mensaje\"></iframe>
<script language=\"javascript\">
frames.mensaje.document.designMode = \"On\";
</script>
<br>
<input type=\"hidden\" name=\"mensaje\" value=\"\">
</td>
</tr>
<tr>
<td align=\"left\" valign=\"top\">&nbsp;</td>
<td align=\"right\">
<input class=\"clsButton\" type=\"button\" value=\"Cancelar\" OnClick=\"javascript:history.back()\"> ;
<input type=\"submit\" value=\"Aceptar\" class=\"clsButton2\" name=\"Aceptar\" OnClick=\"document.crear.mensaje.value = frames.mensaje.document.body.innerHTML;\" tabindex=\"30\">
<input type=\"hidden\" name=\"fid\" value=\"$fid\">";
if(isset($fpusuario))echo" <input type=\"hidden\" name=\"nombre\" value=\"$infocookie[0]\">";
else echo"<input type=\"hidden\" name=\"nombre\" value=\"anonimo\">";
if ($que=='mensaje')echo"<input type=\"hidden\" name=\"titulo\" value=\"mensaje comun\">";
if(isset($padre))echo"<input type=\"hidden\" name=\"papi\" value=\"$padre\">";
echo"</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
";}
}
include"footer.php";
?> |