Ver Mensaje Individual
  #46 (permalink)  
Antiguo 11/06/2007, 05:51
elbastardo
 
Fecha de Ingreso: septiembre-2006
Mensajes: 141
Antigüedad: 17 años, 8 meses
Puntos: 1
Re: Drama con fecha y actualización de sitio

Hasta aquí hemos tocado:

Código PHP:
<?php
if ($fechax == "SI")
{
?>
<?php
$fecha_hoy 
date("Y-m-d");
$noti_hoy mysql_query(" SELECT * FROM noticia"
                                  
." WHERE home = 'si' "
                                  
." AND destacado = 'si' "
                                  
." AND fecha = '$fecha_hoy' "
                                  
."  ORDER BY id_noticia DESC limit 1");
while (
$result mysql_fetch_array($noti_hoy))
{
?>  
<div align="center"><center>
<table width="510" border="0" bgcolor="#FAFBFE" style="border-collapse: collapse" bordercolor="#111111" cellpadding="2" cellspacing="4"><tr> 
<td bgcolor="#FF9900" class="listadolinks Estilo1"> <font color="#000000" size="1" face="arial">&gt;&gt;</font><font color="#000000" size="1" face="arial"> 
<?php
$opiti
=$result['id_categoria'];
$sql2=("SELECT * FROM categoria WHERE id_categoria = '$opiti'");
$resultado2=mysql_query($sql2);
while (
$row2=mysql_fetch_array($resultado2))
{
echo 
$row2['categoria'];
}
?>
</font></td>
</tr>
<tr> 
<td align="center" class="titulo1"> <?php echo $result['titulo']; ?></td>
</tr>
<tr>
<td><div align="center">
<?php 
$id1
=$result['id_noticia'];
$sql3=("SELECT * FROM imagenes WHERE id_noticia= '$id1' limit 1");
$resultado3=mysql_query($sql3,$link);
while (
$row3=mysql_fetch_array($resultado3))
{
?>
<img src="imagenes_noticia/<?php echo $row3['imagen']; ?>" border="1" />
<?
}
?>
</div></td></tr>
<tr> 
<td class="txt-noticias"><?php echo $result['bajada']; ?></td>
</tr>
<tr>
<td class="txt-noticias"><div align="right">
<a href="noticia.php?id=<?php echo $result['id_noticia']; ?>" class="listadolinks Estilo1">&gt; Ampliar</a></div></td></tr>
</table>
</center>
</div>
<?php
}
}
else
{
?>
<?php
$noti_hoy 
mysql_query(" SELECT * FROM noticia"
                                  
." WHERE home = 'si' "
                                  
." AND destacado = 'si' "
                                  
."  ORDER BY id_noticia DESC limit 1");
while (
$result mysql_fetch_array($noti_hoy))
{
?> 
<div align="center"><center>
<table width="510" border="0" bgcolor="#FAFBFE" style="border-collapse: collapse" bordercolor="#111111" cellpadding="2" cellspacing="4"><tr> 
<td bgcolor="#FF9900" class="listadolinks Estilo1"> <font color="#000000" size="1" face="arial">&gt;&gt;</font><font color="#000000" size="1" face="arial"> 
<?php
$opiti
=$result['id_categoria'];
$sql2=("SELECT * FROM categoria WHERE id_categoria='$opiti'");
$resultado2=mysql_query($sql2);
while (
$row2=mysql_fetch_array($resultado2))
{
echo 
$row2['categoria'];
}
?>
</font></td>
</tr>
<tr> 
<td align="center" class="titulo1"> <?php echo $result['titulo']; ?></td>
</tr>
<tr>
<td><div align="center">
<?php 
$id1
=$result['id_noticia'];
$sql3=("SELECT * FROM imagenes WHERE id_noticia= '$id1' limit 1");
$resultado3=mysql_query($sql3,$link);
while (
$row3=mysql_fetch_array($resultado3))
{
?>
<img src="imagenes_noticia/<?php echo $row3['imagen']; ?>" border="1" />
<?
}
?>
</div></td></tr>
<tr> 
<td class="txt-noticias"><?php echo $result['bajada']; ?></td>
</tr>
<tr>
<td class="txt-noticias"><div align="right">
<a href="noticia.php?id=<?php echo $result['id_noticia']; ?>" class="listadolinks Estilo1">&gt; Ampliar</a></div></td></tr>
</table>
</center>
</div>
<?php
}
?>
</td>
<?php
y sigue con: