Foros del Web » Programando para Internet » PHP »

pagina inicio y codigo URGE!!!

Estas en el tema de pagina inicio y codigo URGE!!! en el foro de PHP en Foros del Web. hola, mi pagina de inicio está terminada, en ella tengo puesto un gestor de noticias para que me muestre los titulares de prensa, pero cuando ...
  #1 (permalink)  
Antiguo 24/03/2006, 01:57
 
Fecha de Ingreso: marzo-2006
Mensajes: 17
Antigüedad: 18 años, 1 mes
Puntos: 0
pagina inicio y codigo URGE!!!

hola, mi pagina de inicio está terminada, en ella tengo puesto un gestor de noticias para que me muestre los titulares de prensa, pero cuando abro mi pagina de inicio index.php donde deberian de salir los titulares, me sale el codigo del gestor...y no se que es lo que falla.
la base de datos esta cargada con phpmyadmin....podriais ayudarme?Gracias
  #2 (permalink)  
Antiguo 24/03/2006, 04:24
 
Fecha de Ingreso: diciembre-2004
Mensajes: 721
Antigüedad: 19 años, 3 meses
Puntos: 2
¿Me mostras el codigo para poderte ayudar mejor?

Seguro el codigo te quedo fuera de <?php ***** ?> o algo por el estilo.

Saludos.
  #3 (permalink)  
Antiguo 24/03/2006, 04:39
 
Fecha de Ingreso: marzo-2006
Mensajes: 17
Antigüedad: 18 años, 1 mes
Puntos: 0
Exclamación

esto es el codigo, te he quitado lo que no sirve, aqui está todo el cogido del gestor de noticias.He cambiado la direccion porque no me dejaba publicarlas.Si necesitas algo mas dimelo.Gracias

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<table width="100%" height="0" border="0" cellpadding="5" cellspacing="0">
<tr>
<td width="1179" height="259"><img src="images/presentacion.gif"> <br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="84" valign="top">
<div align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong> <img src="images/MONUMENTO.jpg" width="79" height="186" quality="high" bgcolor="#FFFFFF"> </strong></font></div></td>
<td valign="bottom">
<p class="normal"><span class="resaltado">texto.</p></td>
</tr>
</table> </td>
</tr>
<tr>
<td height="261"><p><img src="images/titulares.gif"> </p>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="right"><font color="#FFFFFF"><strong><a direccion target="_blank"><?php echo $periodistadigital->channel_image; ?><br>
</a> <br>
</strong></font></div></td>
</tr>
<tr>
<td>
<?php
$periodistadigital_RSSmax=3;
if($periodistadigital_RSSmax==0 || $periodistadigital_RSSmax>count($periodistadigital->titles))$periodistadigital_RSSmax=count($periodis tadigital->titles);
for($itemNum=0;$itemNum<$periodistadigital_RSSmax; $itemNum++){?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><font size="1"><span class="normal"><strong><font color="#006600"><?php echo $periodistadigital->titles[$itemNum]; ?></font></strong> <br>
<?php echo $periodistadigital->descriptions[$itemNum]; ?> </span></font>
<hr>
</td>
</tr>
</table>
<?php } ?>
</td>
</tr>
</table>
<div align="right"><br>
<a href="noticias_rss.php">Leer m&aacute;s titulares de prensa</a></div></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="5" cellspacing="0">
<tr>
<td width="47%" height="154"><p><img src="images/noticias.gif"></p>
<?php
$query = "SELECT noticias.titulo AS titulo, noticias.descripcion AS descripcion, noticias.texto_link AS texto_link, noticias.foto AS foto, noticias.link AS link, noticias.linkfoto AS linkfoto, noticias.documento AS documento, noticias.documentofoto AS documentofoto, noticias.fecha AS fecha, noticias.vincularlink AS vincularlink, noticias.vincularfoto AS vincularfoto
FROM noticias
ORDER BY noticias.fecha DESC";

$result = mysql_query($query);
if(!$result) {
//echo "Could not successfully run query ($query) from DB: " . mysql_error();
goto("error4_.html");
exit;
}
if(mysql_num_rows($result) != 0) {

while($row = mysql_fetch_assoc($result)) {
$titulo = str_replace("\n", "<br>", $row['titulo']);
$descripcion = str_replace("\n", "<br>", $row['descripcion']);
$texto_link = str_replace("\n", "<br>", $row['texto_link']);
$foto = rawurlencode($row['foto']);
$link = $row['link'];
$linkfoto = $row['linkfoto'];
$documento = rawurlencode($row['documento']);
$documentofoto = rawurlencode($row['documentofoto']);
$vincularlink = $row['vincularlink'];
$vincularfoto = $row['vincularfoto'];

echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n";
echo "<tr>\n";
if ($foto)
{
//if ($vincularfoto == 1 && $linkfoto){
if ($linkfoto){
echo "<td width=\"125\"><a href=\"$linkfoto\" target=\"_blank\"><img src=\"noticias/$foto\" border=\"0\" width=\"120\"></a></td>\n";
}
//else if ($vincularfoto == 2 && $documentofoto){
else if ($documentofoto){
echo "<td width=\"125\"><a href=\"noticias/$documentofoto\" target=\"mainFrame\"><img src=\"noticias/$foto\" border=\"0\" width=\"120\"></a></td>\n";
}
else {
echo "<td width=\"125\"><img src=\"noticias/$foto\" width=\"120\"></td>\n";
}
}


echo "<td class=\"normal\"><span class=\"resaltado\">$titulo</span>&nbsp;$descripcion&nbsp;";

if ($texto_link)
{
//if ($vincularlink == 1 && $link){
if ($link){
echo "<a href=\"$link\" target=\"_blank\">$texto_link</a>";
}
//else if ($vincularlink == 2 && $documento){
else if ($documento){
echo "<a href=\"noticias/$documento\" target=\"mainFrame\">$texto_link</a>";
}
}

echo "</td>\n";


echo "</tr>\n";
echo "<tr height=\"7\">&nbsp;</tr>\n";
echo "</table>\n";
}

mysql_free_result($result);
}

?>
</tr>
</table>
</body>
</html>
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 22:04.