![Golpeado](http://static.forosdelweb.com/fdwtheme/images/smilies/pelea.png)
Código PHP:
<?
include("$urlPath/Noticias/conexion.php");
$conn = mysql_connect("$hostbd","$loginBaseDatos","$passwordBaseDatos");
mysql_select_db("$nombreBaseDatos");
$condic = "LIKE";
if(strcmp("$ind","otros")==0)
{
$condic = "NOT REGEXP";
$indic = "^[A-Z]";
}
else
$indic = "$ind%";
$q = mysql_query("SELECT count(id) FROM $NoticiasData WHERE mostrar='1' AND titulo $condic '$indic'");
$max = mysql_result($q,0);
$q = mysql_query("SELECT id, titulon, fecha_dia, fecha_mes, fecha_anio, cat, idgaleria FROM $NoticiasData WHERE mostrar='1' AND titulon $condic '$indic' ORDER BY id DESC LIMIT 4");
while($res = mysql_fetch_row($q))
{
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">
<tr>
<td width=\"4%\">";
if($res[5]=='0')
{
echo "
<img border=\"0\" src=\"$urlDirAtajo/Pix_News/Listar_Galeria_000.gif\" width=\"15\" height=\"15\">
";
}
else
{
echo "
<a href=\"$urlExtraGal/categories.php?cat_id=$res[6]\" target=\"_blank\"><img alt=\"Ver Galería de Fotos\" border=\"0\" src=\"$urlDirAtajo/Pix_News/Listar_Galeria_001.gif\" width=\"9\" height=\"16\"></a>
";
}
echo " </td>
<td width=\"20%\">fecha: $res[2]/$res[3]</td>
<td width=\"76%\"><a title=\"Noticia N° $res[0]\" href=\"$urlDirNoticia/noticia.php?id=$res[0]\"><b>$res[1]</b></a></td>
</tr>
<tr>
<td width=\"100%\" colspan=\"3\">
<hr size=\"1\">
</td>
</tr>
</table>";
}
?>
$q = mysql_query("SELECT id, titulon, fecha_dia, fecha_mes, fecha_anio,
muchas gracias por su ayuda.
![sonriente](http://static.forosdelweb.com/fdwtheme/images/smilies/smile.png)