$Conta=1;
$qf="SELECT A.Cod_not,B.Titulo, A.Fecha from Noticias A, Noticias_idiomas B where A.Cod_not=B.Cod_not AND B.Codid=$Idi AND A.Cod_fam=3 AND A.Activo='Si' ORDER BY A.Fecha DESC";
//echo($qf);
$resf=mysql_query ($qf,$db);
if (mysql_num_rows($resf)>0) {
$Bann=0;
while ($rowf= mysql_fetch_row ($resf)) {
$Bann++;
$Cod_not2=$rowf[0];
$Titulo=stripslashes($rowf[1]);
$Fecha=fechaformat($rowf[2]);
?>
}?>
$qf2="select A.Foto,B.Titulo from Imagen A, Imagen_idiomas B where A.Foto!='' AND A.Foto!='Nofoto' AND A.Cod_img=B.Cod_img AND B.Codid=$Idi AND A.Cod_not=$Cod_not2 AND A.Activo='Si' ORDER BY A.Orden LIMIT 1";
//echo($qf2);
$resf2=mysql_query ($qf2,$db);
if (mysql_num_rows($resf2)>0) {
$rowf2= mysql_fetch_row ($resf2);
$Foto2=$rowf2[0];
$Tit1=stripslashes($rowf2[1]);
?>
}
?>