<?php include('concha.php');
  $hay = 0;
mysql_connect ("$host", "$usuario", "$contra");
mysql_select_db ("$basedatos");

$sql = "SELECT * FROM menu ORDER BY ID";

$consulta = mysql_query ($sql);
while ($row = mysql_fetch_array($consulta))
{
$nombre = $row["nombre"];
$tipo = $row["tipo"];
$link = $row["link"];
$ID_menu = $row["ID"];
 $IDsub = $row["IDsub"]; 
$hay = $hay + $IDsub;

}
mysql_free_result($consulta);

if ($hay == 0) {


?>

<?php

if ($hostdom == NULL) {$hostdom = "http://www.radiosnet.com.ar";} else {};

if ($rutadom == NULL) {$rutadom = "/home/content/90/7626090/html";} else {};?>
<?php echo $link_menu ?>
<style type="text/css">
<!--
.Estilo44 {
	font-family: "Trebuchet MS";
	font-size: 10px;
}
-->
</style>
  <script language=javascript>
function ventanaSecundaria56 (URL){
   window.open(URL,"ventana1","width=960,height=630,scrollbars=NO")
}
  </script>
  <span style=";font-family:<?php echo $style_menu ?>; font-size:16px;">
   <?php  echo $separador;?>
  <?php include('concha.php');
mysql_connect ("$host", "$usuario", "$contra");
mysql_select_db ("$basedatos");

$sql = "SELECT * FROM menu ORDER BY ID";

$consulta = mysql_query ($sql);
while ($row = mysql_fetch_array($consulta))
{
$nombre = $row["nombre"];
$tipo = $row["tipo"];
$link = $row["link"];
$ID_menu = $row["ID"];

?><a  class="esp"  href="<?php
    if ($tipo == 'noticias'){  
	



$sql55 = "SELECT * FROM categorias WHERE ID = '$link'";
$consulta55 = mysql_query ($sql55);
while ($row55 = mysql_fetch_array($consulta55))
{
$titulo_cat = $row55["nombre"];

}
mysql_free_result($consulta55);

	
	 $titulo_cat = urls_amigables($titulo_cat);
	
	
	 echo "$dom/noticias/$link/$titulo_cat";
	 
	 
	 };

	  if ($tipo == 'seccion'){ 
	  
	  

$sql22 = "SELECT * FROM menu WHERE ID = '$ID_menu'";


$consulta22 = mysql_query ($sql22);


while ($row22 = mysql_fetch_array($consulta22))


{
$titulo_sec = $row22["nombre"];
 }


mysql_free_result($consulta22);
 $titulo_sec = urls_amigables($titulo_sec);
	  
	  
	    echo "$dom/seccion/$ID_menu/$titulo_sec";};
	    if ($tipo == 'link'){   echo $link;};
    if ($tipo == 'precargado'){  
	
	if ($link == "javascript:ventanaSecundaria56('envivo')") {
	
	$link = "javascript:ventanaSecundaria56('$dom/envivo')";
	 echo "$link";
	 
	 
	 } else { echo "$dom/$link";}; }; 
  ?>" <? if ($tipo == 'link'){ ?> target="_blank" <? }; ?>><?php echo $nombre ?></a>
  <?php  echo $separador;
}
mysql_free_result($consulta);
?>
</span>
<? }
 else {
 ?>
 
<style type="text/css">

  
  .mi-menu  {

    border-radius:5px;
    height: auto;
    list-style-type: none;
    padding: 0;
    position: relative;
    text-align: center;
	margin-top: 0px; 
	margin-bottom: 0;
	 }

 .mi-menu  li {
    display: inline-block;
    height: 40px;
    list-style: none outside none;
    margin: 0;
    padding: 0;
    position: relative;
  }
  
  .mi-menu li a {

       
    color: <?php echo $d_color_menu ?>;
    display: block;
    font-family: <?php echo $style_menu ?>;
    font-size: 13px;
    font-weight: bold;
    line-height: 14px;
    padding: 0 14px;
    margin: 10px 0;
    text-decoration: none;
    /* animamos el cambio de color de los textos */
    -webkit-transition: color .2s ease-in-out;
    -moz-transition: color .2s ease-in-out;
    -o-transition: color .2s ease-in-out;
    -ms-transition: color .2s ease-in-out;
    transition: color .2s ease-in-out;
	white-space:nowrap /*evita que se hagan dos lineas en textos muy largos ;) */ 
  }
  
      /* los submenús */
  .mi-menu ul {
       background: <?php echo $d_color_fondo_menu ?>;
    border-radius: 0 0 5px 5px;
    margin: 0;
    opacity: 0;
    padding-left: 0;
    position: absolute;
    top: 40px;
    transition: opacity 0.25s ease 0.1s;
	
    
    /* animamos su visibildiad */
    -moz-transition: opacity .25s ease .1s;
    -webkit-transition: opacity .25s ease .1s;
    -o-transition: opacity .25s ease .1s;
    -ms-transition: opacity .25s ease .1s;
    transition: opacity .25s ease .1s;
  }
  /* son visibes al poner el cursor encima */
  .mi-menu li:hover > ul { opacity: 1; }
  
   /* cada un ode los items de los submenús */
  .mi-menu ul li {
    float: left;
    height: 0;
    left: 0;
    overflow: hidden;
    padding: 0;
    transition: height 0.25s ease 0.1s;
    width: 100%;
    z-index: 9999;
  }
    .mi-menu li:hover > ul li {
    height: 36px; /* los mostramos */
    overflow: visible;
    padding: 0;
	float:left;
	width: 100%; /*el texto ocupa todo el ancho, como mi pito*/
	z-index: 9999;
	opacity: 1;
  }
  .mi-menu ul li:last-child a { border: none; }
  
   .mi-menu ul li a {
    border: none;
    border-bottom: 1px solid <?php echo $d_color_fondo_menu ?>;
    margin: 0;
    padding: 5px 20px;
	float: left;
}

.mi-menu a:hover{
color: <?php echo $d_color_menu_sobre ?>; /*cambiamos el color del enlace cuando le pasamos el mouse por arriba*/
}

#menutotal{
	width: 100%;
	background-color: <?php echo $d_color_fondo_menu ?>;
    display: table-caption;
    height: auto;
	float: left;
	margin: 0 auto;
}
</style>

<?php

if ($hostdom == NULL) {$hostdom = "http://www.radiosnet.com.ar";} else {};

if ($rutadom == NULL) {$rutadom = "/home/content/90/7626090/html";} else {};?>
<?php echo $link_menu ?>
 <script language=javascript>
function ventanaSecundaria56 (URL){
   window.open(URL,"ventana1","width=960,height=630,scrollbars=NO")
}
  </script>
<ul> 
  <?php include('concha.php');
mysql_connect ("$host", "$usuario", "$contra");
mysql_select_db ("$basedatos");

$sql = "SELECT * FROM menu WHERE IDsub = 0 ORDER BY ID";

$consulta = mysql_query ($sql);
while ($row = mysql_fetch_array($consulta))
{
$nombre = $row["nombre"];
$tipo = $row["tipo"];
$link = $row["link"];
$ID_menu = $row["ID"];

?><li><a href="<?php
    if ($tipo == 'noticias'){   
	$sql55 = "SELECT * FROM categorias WHERE ID = '$link'";
$consulta55 = mysql_query ($sql55);
while ($row55 = mysql_fetch_array($consulta55))
{
$titulo_cat = $row55["nombre"];

}
mysql_free_result($consulta55);


	
	 $titulo_cat = urls_amigables($titulo_cat);
	
	
	 echo "$dom/noticias/$link/$titulo_cat";
	 
	 
	 };

	  if ($tipo == 'seccion'){ 
	  
	  

$sql22 = "SELECT * FROM menu WHERE ID = '$ID_menu'";


$consulta22 = mysql_query ($sql22);


while ($row22 = mysql_fetch_array($consulta22))


{
$titulo_sec = $row22["nombre"];
 }


mysql_free_result($consulta22);
 $titulo_sec = urls_amigables($titulo_sec);
	  
	  
	    echo "$dom/seccion/$ID_menu/$titulo_sec";};
	    if ($tipo == 'link'){   echo $link;};
    if ($tipo == 'precargado'){  
	
	if ($link == "javascript:ventanaSecundaria56('envivo')") {
	
	$link = "javascript:ventanaSecundaria56('$dom/envivo')";
	 echo "$link";	 
	 } else { echo "$dom/$link";}; };   
  ?>" <? if ($tipo == 'link'){ ?> target="_blank" <? }; ?>><?php echo $nombre ?></a>
  <ul>
  <?
  
$sql6 = "SELECT * FROM menu WHERE IDsub = $ID_menu ORDER BY nombre";

$consulta6 = mysql_query ($sql6);
while ($row6 = mysql_fetch_array($consulta6))
{
$nombre = $row6["nombre"];
$tipo = $row6["tipo"];
$link = $row6["link"];
$ID_menu = $row6["ID"];

?>
<li><a  href="<?php
    if ($tipo == 'noticias'){ 
	
	

$sql55 = "SELECT * FROM categorias WHERE ID = '$link'";
$consulta55 = mysql_query ($sql55);
while ($row55 = mysql_fetch_array($consulta55))
{
$titulo_cat = $row55["nombre"];

}
mysql_free_result($consulta55);


	
	 $titulo_cat = urls_amigables($titulo_cat);
	
	
	 echo "$dom/noticias/$link/$titulo_cat";
	 
	 
	 };

	  if ($tipo == 'seccion'){ 
	  
	  

$sql22 = "SELECT * FROM menu WHERE ID = '$ID_menu'";


$consulta22 = mysql_query ($sql22);


while ($row22 = mysql_fetch_array($consulta22))


{
$titulo_sec = $row22["nombre"];
 }

mysql_free_result($consulta22);
 $titulo_sec = urls_amigables($titulo_sec);
		    echo "$dom/seccion/$ID_menu/$titulo_sec";};
	
	    if ($tipo == 'link'){   echo $link;};
    if ($tipo == 'precargado'){  
	
	if ($link == "javascript:ventanaSecundaria56('envivo')") {
	
	$link = "javascript:ventanaSecundaria56('$dom/envivo')";
	 echo "$link";
	 } else { echo "$dom/$link";}; }; 
    ?>" <? if ($tipo == 'link'){ ?> target="_blank" <? }; ?>><?php echo $nombre ?></a>       
        </li><?

}
mysql_free_result($consulta6);


 ?></ul> 
   </li><?

}
mysql_free_result($consulta);


 ?></ul>
 <?php 
};?>
