


  <?


while ($i < 8){ 



  include 'concha.php';


mysql_connect ("$host", "$usuario", "$contra");


mysql_select_db ("$basedatos");


$sql = "SELECT * FROM notas ORDER BY ID desc LIMIT $i,1";


$consulta = mysql_query ($sql);


while ($row = mysql_fetch_array($consulta))


{


$ID = $row["ID"];





$titulo = $row["titulo"];
$bajada = $row["bajada"];

$texto = $row["texto"];


$audio = $row["audio"];


$listengo  = $row["listengo"];


$d = $row["d"];


$m = $row["m"];


$a = $row["a"];

$fecha = "$d - $m - $a";




$foto = $row["foto"]; $ext_img = $row["ext_img"];








?>













              


              


              


               <?


			   $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);


?>
             
               





              


              




<table width="300" border="0" align="center" cellpadding="3" cellspacing="0">
  <tr>
    <td class="Estilo2"><a href="nota.php?ID=<?php echo $ID ?>" class="tita"><?php echo $titulo ?></a></td>
  </tr>
  
  <?php  if ($foto == NULL) { } else { ?>   <tr>
    <td class="Estilo2"><a href="<? echo $dom;?>/nota/<?php echo $ID ?>/<?php echo urls_amigables($titulo) ?>"> <img  border="0" src="upload_pic/thumbnail_<?php echo $foto ?>.jpg" /></a></td>
  </tr> <?php  }; ?>
  <tr>
    <td><div align="justify"><span class="Estilo40"><?php echo $bajada ?></span> - <span class="Estilo4"><?php echo $fecha ?></span></div></td>
  </tr>
  <tr>
    <td><div align="right"><span class="Estilo4"> 
      <?php if ($n == 0) { ?>
      
      
      <a href="nota.php?ID=<?php echo $ID ?>">Dejar un comentario<? if ($texto == NULL) {} else {?> - Leer m&aacute;s...<? }; ?></a> 
      
      
      <?php } else {?>
      
      
      <a href="nota.php?ID=<?php echo $ID ?>"> <?php echo $n ?> comentarios<? if ($texto == NULL) {} else {?> - Leer m&aacute;s...<? }; ?></a>
      <?php };?>
    </span></div></td>
  </tr>
  <tr>
    <td align="center"><img  src="linea.gif" /></td>
  </tr>
</table>





<?php }


mysql_free_result($consulta);


?>

<?php 

$i= $i + 2;
  }; 
?>
