  <?
$hay = "NO"; 


  include 'concha.php';
mysql_connect ("$host", "$usuario", "$contra");
mysql_select_db ("$basedatos");
$sql = "SELECT * FROM notas WHERE destacado = 'si' AND ver = 'si'";
$consulta = mysql_query ($sql);
while ($row = mysql_fetch_array($consulta))
{
$hay = "SI";
 }
mysql_free_result($consulta);




if ($hay == 'SI') {



while ($i < 8){ 



  include 'concha.php';


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


mysql_select_db ("$basedatos");


$sql = "SELECT * FROM notas WHERE destacado = 'si' AND ver = 'si' ORDER BY ID desc LIMIT $i,1";


$consulta = mysql_query ($sql);


while ($row = mysql_fetch_array($consulta))


{

$i_publi = $i_publi + 1;


$ID = $row["ID"];


$youtube  = $row["youtube"];


$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"];

$cat = $row["cat"];

$carpetafoto = $row["carpetafoto"];


if ($cat == 0) {} else {

$sql2 = "SELECT * FROM categorias WHERE ID = '$cat'";


$consulta2 = mysql_query ($sql2);


while ($row2 = mysql_fetch_array($consulta2))


{

$cat = $row2["nombre"];


 }


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


?>
              

              


              




<table width="370" border="0" align="center" cellpadding="3" cellspacing="0" bgcolor="<?php echo $d_color_destacada?>">
 <?php if ($cat == '0') {} else {?> 
 <tr>
    <td colspan="2" class="Estilo4" height="1"><?php echo $cat ?></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 $d_fu_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 $carpetafoto?>/thumbnail_<?php echo $foto ?>.jpg" width="370" height="155"  border="0" /></a></td>
  </tr> <?php  }; ?>
  
    
  <?php  if ($youtube == NULL) { } else { ?>   <tr>
    <td colspan="2" class="Estilo2" align="center"><object width="365" height="320">
                       <param name="movie" value="http://www.youtube.com/v/<?php echo $youtube ?>&amp;hl=es&amp;fs=1&amp;rel=0" />
                       </param>
                       <param name="allowFullScreen" value="true" />
                       </param>
                       <param name="allowscriptaccess" value="always" />
                       </param>
                       <embed src="http://www.youtube.com/v/<?php echo $youtube ?>&amp;hl=es&amp;fs=1&amp;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="370" height="320"></embed>
                     </object></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"><div align="center"><img  src="linea.gif" /></div></td>
  </tr>
  
  
  
  
  
  
  
    <tr>
      <td colspan="2"> 
    <?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 $carpetafoto?>/resize_<?php echo $img ?>.jpg" width="370"   border="0" /><?php   if ($url == NULL) {} else { ?> </a><?php };?>  (<a href="quitar_publicidad_jpg_noticias.php?ID=<?php echo $i_publi ?>">QUITAR PUBLICIDAD</a>)
  <tr>
    <td colspan="2" align="center"><img  src="linea.gif" /></td>
  </tr>
<?



 }


mysql_free_result($consulta2);
?>
    </td>
    </tr>
    <tr>
    <td colspan="2">
    
 
  <div align="center">
  

<?php
////////////GIF
mysql_connect ("$host", "$usuario", "$contra");
mysql_select_db ("$basedatos");
$sql2 = "SELECT * FROM publicidades_gif WHERE lugar = '$i_publi'";
$consulta2 = mysql_query ($sql2);
while ($row2 = mysql_fetch_array($consulta2))
{
$img = $row2["img"];
$url = $row2["url"];

$carpetafoto = $row2["carpetafoto"];

?>

<tr>
<td colspan="2" align="center">
<?php   if ($url == NULL) {} else { ?><a href="<?php echo $url ?>"  target="_blank" class="Estilo1"><?php };?><img src="<?php echo $dom ?>/<?php echo $carpetafoto?>/<?php echo $img ?>" width="<? echo $marco1px ?>" alt="PUBLICIDAD"   border="0" /><?php   if ($url == NULL) {} else { ?> </a><?php };?>
  </td>
</tr>
<tr>
<td colspan="2" align="center"><img  src="linea.gif" /></td>
</tr>
<?
}
mysql_free_result($consulta2);
//////////////////// FIN GIF
?>

      <?php
////////////SLIDE
mysql_connect ("$host", "$usuario", "$contra");
mysql_select_db ("$basedatos");
$sql2 = "SELECT ID FROM publicidades_slide WHERE lugar = '$i_publi'";
$consulta2 = mysql_query ($sql2);
while ($row2 = mysql_fetch_array($consulta2))
{
$ID_p = $row2["ID"];

$width_slide = "$marco1px";  include 'publicidad_slider_virgen.php';

}
mysql_free_result($consulta2);
//////////////////// FIN SLIDE
?> Para quitar del lugar dirigase al panel de control

  
  <?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>
          (<a href="quitar_publicidad_flash_noticias.php?ID=<?php echo $i_publi ?>">QUITAR PUBLICIDAD</a>)
      <tr>
    <td colspan="2" align="center"><img  src="linea.gif" /></td>
  </tr>

      <?
	  }
mysql_free_result($consulta44);

?></div>    </td>
  </tr>
    <tr>
      <td colspan="2">  <div align="center">
    <form id="form1" name="form1" method="post" action="panel/poner_publicidad_en_noticias.php">
    
    <input name="button" type="submit" class="Estilo29" id="button" value="PONER UNA PUBLICIDAD JPG AQUI" />
    
    <input name="lugar" type="hidden" value="<?php echo $i_publi ?>" />
 
    <input name="button" type="submit" class="Estilo29" id="button" value="PONER UNA PUBLICIDAD FLASH AQUI" />
    
         <input name="button" type="submit" class="Estilo29" id="button" value="PONER UNA PUBLICIDAD GIF/PNG AQUI" />
         
               <input name="button" type="submit" class="Estilo29" id="button" value="PONER UNA PUBLICIDAD SLIDE AQUI" />
     </form>
     
    
  </div></td>
    </tr>
</table>





<?php }


mysql_free_result($consulta);


?>

<?php 

$i= $i + 2;



  }; $i = 0;
  } else {};
?>
