   <?
include 'marco1des_seccion.php';
while ($i < $cantidad_notas){ 
include 'concha.php';
mysql_connect ("$host", "$usuario", "$contra");
mysql_select_db ("$basedatos");
$sql = "SELECT ID,titulo,bajada,audio,youtube,d,m,a,carpetafoto,foto,cat,home,impresiones FROM notas WHERE destacado = 'no' AND cat = '$catba' AND ver = 'si' ORDER BY ID desc LIMIT $i,1";
$consulta = mysql_query ($sql);
while ($row = mysql_fetch_array($consulta))
{
$ID = $row["ID"];
$i_publi = $i_publi + 1;
$titulo = $row["titulo"];
$bajada = $row["bajada"];
$texto = $row["texto"];
$audio = $row["audio"];
$listengo  = $row["listengo"];
$youtube  = $row["youtube"];
$d = $row["d"];
$m = $row["m"];
$a = $row["a"];
$fecha = "$d - $m - $a";
$carpetafoto = $row["carpetafoto"];
$foto = $row["foto"]; $ext_img = $row["ext_img"];
$cat = $row["cat"];

$impresiones = $row["impresiones"];
$impresiones = $impresiones + 1;
$sSQL="UPDATE  `$basedatos`.`notas` SET  `impresiones` =  '$impresiones' WHERE ID = '$ID'";
mysql_db_query("$basedatos",$sSQL);
if ($cat == 0) {} else {
$sql2 = "SELECT * FROM categorias WHERE ID = '$cat'";
$consulta2 = mysql_query ($sql2);
while ($row2 = mysql_fetch_array($consulta2))
{
$cat = $row2["nombre"];
$color_cat = $row2["color"];
}
mysql_free_result($consulta2);
}
?>
<?
$n = 0;
$sql2 = "SELECT * FROM comentarios WHERE IDD = '$ID' and ver = 'si'";
$consulta2 = mysql_query ($sql2);
while ($row2 = mysql_fetch_array($consulta2))
{
$n = $n + 1;
}
mysql_free_result($consulta2);
?>
<link href="estilo.css" rel="stylesheet" type="text/css" />
<table width="<? echo $marco1px ?>" border="0" align="center" cellpadding="3" cellspacing="0">
<?php if ($cat == '0') {} else {?> <tr>
<td colspan="2" class="Estilo4" height="1"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="<?php echo $color_cat ?>">&nbsp;<span style=";font-family:<?php echo $style_titulo ?>;font-size:11px;"><?php echo $cat ?></span>&nbsp;</td>
</tr>
</table>
</td>
</tr><?php };?>
<tr>
<td colspan="2"><a href="<? echo $dom;?>/nota/<?php echo $ID ?>/<?php echo urls_amigables($titulo) ?>" class="tita"><span style=";font-family:<?php echo $style_titulo ?>;font-size:<?php echo $d_ta_titulo?>;color:<?php echo $d_color_titulo?>;"><?php echo $titulo ?></span></a></td>
</tr>
<?php  if ($foto == NULL) { } else { ?>   <tr>
<td colspan="2" class="Estilo2"><a href="<? echo $dom;?>/nota/<?php echo $ID ?>/<?php echo urls_amigables($titulo) ?>"> <img src="<?php echo $dom ?>/<?php echo $carpetafoto ?>/thumbnail_<?php echo $foto ?><?php echo $ext_img ?>" width="<? echo $marco1px ?>"  border="0" /></a></td>
</tr> <?php  }; ?>
<?php  if ($youtube == NULL) { } else { ?>   <tr>
<td colspan="2" class="Estilo2" align="center"><iframe width="<? echo $marco1px ?>" height="315" src="https://www.youtube.com/embed/<?php echo $youtube ?>" frameborder="0" allowfullscreen></iframe></td>
</tr> <?php  }; ?>
<tr>
<td colspan="2"><div align="justify"><span style=";font-family:<?php echo $d_fu_texto ?>;font-size:<?php echo $d_ta_texto ?>;color:#6B6B6B;line-height:16px;"><?php echo $bajada ?></span> - <span class="Estilo4"><?php echo $fecha ?></span></div>
<?php if ($audio == NULL) {} else {include 'audio.php';};?></td>
</tr>
<tr>
<td width="368"><div align="right"><span class="Estilo4"> 
<?php if ($n == 0) { ?>
<a href="<? echo $dom;?>/nota/<?php echo $ID ?>/<?php echo urls_amigables($titulo) ?>">Dejar un comentario<? if ($texto == NULL) {} else {?> - Leer m&aacute;s...<? }; ?></a> 
<?php } else {?>
<a href="<? echo $dom;?>/nota/<?php echo $ID ?>/<?php echo urls_amigables($titulo) ?>"> <?php echo $n ?> comentarios<? if ($texto == NULL) {} else {?> - Leer m&aacute;s...<? }; ?></a>
<?php };?>
</span></div></td>
<td width="47">  

<?php include 'compartir_nota_facebook.php';?>
  </td>
  
</tr>
<tr>
<td colspan="2" align="center"><img  src="<?php echo $dom ?>/linea.gif" /></td>
</tr>
<tr>
<td colspan="2" align="center">
<?php 
mysql_connect ("$host", "$usuario", "$contra");
mysql_select_db ("$basedatos");
$sql2 = "SELECT * FROM publicidades WHERE lugar = '$i_publi'";
$consulta2 = mysql_query ($sql2);
while ($row2 = mysql_fetch_array($consulta2))
{
$img = $row2["img"];
$url = $row2["url"];


$carpetafoto = $row2["carpetafoto"];

?>
<?php   if ($url == NULL) {} else { ?><a href="<?php echo $url ?>"  target="_blank" class="Estilo1"><?php };?><img src="<?php echo $dom ?>/<?php echo $carpetafoto?>/resize_<?php echo $img ?>.jpg" width="<? echo $marco1px ?>"   border="0" /><?php   if ($url == NULL) {} else { ?> </a><?php };?>
<tr>
<td colspan="2" align="center"><img  src="<?php echo $dom ?>/linea.gif" /></td>
</tr>
<?
}
mysql_free_result($consulta2);
?>
<tr><td colspan="2"></td>
<tr><td colspan="2">
<div align="center"><?php     $tam_ancho = 370;
mysql_connect ("$host", "$usuario", "$contra");
mysql_select_db ("$basedatos");
$sql44 = "SELECT * FROM publicidades_swf WHERE lugar = $i_publi";
$consulta44 = mysql_query ($sql44);
while ($row44 = mysql_fetch_array($consulta44))
{
$ID = $row44["ID"];
$swf = $row44["swf"];
$carpetafoto = $row44["carpetafoto"];
$ancho = $row44["ancho"];
$alto = $row44["alto"];
$lugar = $row44["lugar"];
$tam_alto = $alto * $tam_ancho / $ancho;
?>
<object  width="<?php echo $tam_ancho ?>" height="<?php echo $tam_alto ?>">
<param name="src" value="<? echo $dom ?>/<? echo $carpetafoto ?>/<?php echo $swf ?>" />
<embed src="<? echo $dom ?>/<? echo $carpetafoto ?>/<?php echo $swf ?>" pluginspage="http://www.adobe.com/shockwave/download/" width="<?php echo $tam_ancho ?>" height="<?php echo $tam_alto ?>"></embed>
</object>
<tr>
<td colspan="2" align="center"><img  src="<?php echo $dom ?>/linea.gif" /></td>
</tr>
<?
}
mysql_free_result($consulta44);
?></div>
</tr>
</table>
<?php }
mysql_free_result($consulta);
?>
<?php 
$i= $i + 2;
}; 
?>
