$fecha=date ("d/m/Y");
$hora=time("h:m");
?>
LEE ESTO PRIMERO SI QUIERES AYUDA PARA IDENTIFICAR UN CARTUCHO
require (".htpasswd");
$indice=$_GET["indice"];
$idconnect=mysqli_connect($lloc,$usuari,$password,$dbname);
if ($idconnect==0) {
echo "Lo sentimos no se ha podido";
echo "conectar con la base de datos.";
}
else {
mysqli_select_db($dbname,$idconnect);
$idresult=mysqli_query ($idconnect,"SELECT * from zboard WHERE indice=$indice order by indice desc");
if ($idresult==0) echo "La sentencia es incorrecta.";
else {
echo "
";
while ($registro=mysqli_fetch_array($idresult))
{
//$missatge=preg_replace("\r","
",$registro[texto]);
$missatge=$registro[texto];
//
$IP0=$registro["IP"];
$IPCapada= substr($IP0,6);
// Agafa el contingut de I.P.i mostra el texte a partir de la sisena lletra
//$IPresta2= substr($IP1,15);
// Agafa el contingut de I.P.i mostra les xifres posteriors a la 15
$IPfinal="";
$IPfinal.=" ******";
$IPfinal.= $IPCapada;
$IPfinal.= " ";
echo "Fecha: ".$registro["fecha"]." ";
echo "Autor: ".$registro["nom"]." I.P.".$IPfinal." ";
echo " Tema: ".$registro["asunto"]." ";
echo " Mensaje: ".$missatge." ";
if ($registro["enlace"]==NULL) echo" ";
else{
echo"Enlace: ".$registro["enlace"]." ";
}
if ($registro["imatge"]==NULL) echo" ";
else{
echo"";
}
if ($registro["remote"]==NULL) echo" ";
else{
echo"";
}
echo " |
";
$indiceres=$registro["indice"];
$idresult2=mysqli_query ("SELECT * from zboard WHERE $indiceres=respuesta order by indice asc",$idconnect);
if ($idresult2==0) echo "";
else {
while ($registro2=mysqli_fetch_array($idresult2))
{
//$missatge2=Preg_replace("\r","
",$registro2[texto]);
$missatge2=$registro2[texto];
//
$IP1=$registro2["IP"];
$IPCapada2= substr($IP1,6);
// Agafa el contingut de I.P.i mostra el texte a partir de la quarta lletra
//$IPresta2= substr($IP1,15);
// Agafa el contingut de I.P.i mostra les xifres posteriors a la 15
$IPfinal2="";
$IPfinal2.=" ******";
$IPfinal2.= $IPCapada2;
$IPfinal2.= " ";
//$IPfinal2= $IPresta2;
echo "Fecha: ".$registro2["fecha"]." ";
echo "Autor: ".$registro2["nom"]."           I.P. y ruta:".$IPfinal2." ";
echo " Tema: ".$registro2["asunto"]." ";
echo " Mensaje: ".$missatge2."";
if ($registro2["enlace"]==NULL) echo" ";
else{
echo" Enlace: ".$registro2["enlace"]." ";
}
if ($registro2["imatge"]==NULL) echo" ";
else{
echo"";
}
if ($registro2["remote"]==NULL) echo" ";
else{
echo"";
}
echo " |
";
}}}}
echo "
";
//* mysqli_free_result ($idresult); *//
}
mysqli_close($idconnect);
?>