<?php include('concha.php'); ?>
<?php
  
$tablet_browser = 0;
$mobile_browser = 0;
$body_class = 'desktop';
 
if (preg_match('/(tablet|ipad|playbook)|(android(?!.*(mobi|opera mini)))/i', strtolower($_SERVER['HTTP_USER_AGENT']))) {
    $tablet_browser++;
    $body_class = "tablet";
}
 
if (preg_match('/(up.browser|up.link|mmp|symbian|smartphone|midp|wap|phone|android|iemobile)/i', strtolower($_SERVER['HTTP_USER_AGENT']))) {
    $mobile_browser++;
    $body_class = "mobile";
}
 
if ((strpos(strtolower($_SERVER['HTTP_ACCEPT']),'application/vnd.wap.xhtml+xml') > 0) or ((isset($_SERVER['HTTP_X_WAP_PROFILE']) or isset($_SERVER['HTTP_PROFILE'])))) {
    $mobile_browser++;
    $body_class = "mobile";
}
 
$mobile_ua = strtolower(substr($_SERVER['HTTP_USER_AGENT'], 0, 4));
$mobile_agents = array(
    'w3c ','acs-','alav','alca','amoi','audi','avan','benq','bird','blac',
    'blaz','brew','cell','cldc','cmd-','dang','doco','eric','hipt','inno',
    'ipaq','java','jigs','kddi','keji','leno','lg-c','lg-d','lg-g','lge-',
    'maui','maxo','midp','mits','mmef','mobi','mot-','moto','mwbp','nec-',
    'newt','noki','palm','pana','pant','phil','play','port','prox',
    'qwap','sage','sams','sany','sch-','sec-','send','seri','sgh-','shar',
    'sie-','siem','smal','smar','sony','sph-','symb','t-mo','teli','tim-',
    'tosh','tsm-','upg1','upsi','vk-v','voda','wap-','wapa','wapi','wapp',
    'wapr','webc','winw','winw','xda ','xda-');
 
if (in_array($mobile_ua,$mobile_agents)) {
    $mobile_browser++;
}
 
if (strpos(strtolower($_SERVER['HTTP_USER_AGENT']),'opera mini') > 0) {
    $mobile_browser++;
    //Check for tablets on opera mini alternative headers
    $stock_ua = strtolower(isset($_SERVER['HTTP_X_OPERAMINI_PHONE_UA'])?$_SERVER['HTTP_X_OPERAMINI_PHONE_UA']:(isset($_SERVER['HTTP_DEVICE_STOCK_UA'])?$_SERVER['HTTP_DEVICE_STOCK_UA']:''));
    if (preg_match('/(tablet|ipad|playbook)|(android(?!.*mobile))/i', $stock_ua)) {
      $tablet_browser++;
    }
}
if ($tablet_browser > 0) {
// Si es tablet has lo que necesites
   $es_tablet = 'si';
}
else if ($mobile_browser > 0) {
// Si es dispositivo mobil has lo que necesites
  $es_movil = 'si';
}
else {
// Si es ordenador de escritorio has lo que necesites
      $es_movil = 'no';
}  


?>

  <script language=javascript>
function ventanaSecundaria56 (URL){
   window.open(URL,"ventana1","width=960,height=630,scrollbars=NO")
}
  </script>
<style>
    
    
    .navbar{
        /*padding: 0px 0px 0px 15px!important;
        box-shadow: 2px 2px 3px #ccc;
                margin-bottom: 15px!important;*/
            }
    .nav-item span{
       /* padding: 9px;                            
        color: <?php echo $d_color_fondo_menu ?>;
        font-family: <?php echo $style_menu ?>;
        line-height: 2.5;*/
    }
    
 .nav-item:active,   
.nav-item:focus,
    .nav-item:hover span{
       /* background-color: <?php echo $d_color_fondo_menu ?>;
        color:#fff!important;*/
        
    }
    .caret{
        
    /*  color: <?php echo $d_color_fondo_menu ?>;*/
        
    }
    
    .dropdown-menu {
         background-color: <? echo $d_color_fondo_menu?>;
        padding: 0;
    }
    
    .show{
    
    
}
    .dropdown-menu li a{
    
 /*   padding: .5rem;
    font-size: 1rem;*/
    
}
    
    .dropdown-menu li a:hover{
    /*
    background-color: <?php echo $d_color_fondo_menu ?>;
    color:#fff!important;*/
        
}
    
    
   .nav-item .dropdown:hover ul{
     /*   display: block;*/
        
    }
    
    
    
      .nav-link{
        font-family: 'Raleway','Helvetica',sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
    color: <?php echo $d_color_menu ;?>!important;
        
        
    }
    
    .hvr-underline-from-center:before{
        background: <?php echo $d_color_menu ;?>!important;
        
    }
    
    .hvr-underline-from-left:before{
        background: <?php echo $d_color_menu ;?>!important;
        
    }
    
    .nav-item{
        line-height:1;
        
    }
    
</style>


<header class="container header" style="margin:0 auto;"><meta http-equiv="Content-Type" content="text/html; charset=gb18030">
                <div class="row inner" style="max-width:1920px;">
                    
                  
                                        
                    <div  class="col-12 col-sm-12 col-md-12 col-lg-12">
                        
                        
                 
                        <nav class="navbar  navbar-light bg-light ">
    
                          

                            <a href="<? echo $dom ?>/principal.php"><img src="<?php $logo_C = str_replace('http://', 'https://', $logo_C); echo $logo_C;?> " class="img-fluid" style=" max-height:60px;  <?php   if ($es_movil == 'si') { ?>max-width:210px;  <?php };?> "  alt="Logo"></a>    
                

                            
                
                <ul class="nav  ml-auto" role="group" aria-label="Redes sociales" style="margin:0;display:inline-flex;line-height:4;">
  
                    
                    <li class="nav-item">
                    
                        <button class="navbar-toggler nav-link hvr-underline-from-center" type="button" data-toggle="collapse" data-target="#myNavbar" <?php if ($es_movil == 'no') { ?>style="border-right:1px solid #e4e4e4;" <?php };?> >
                                
                                <p style="margin: 0;display: inline-flex;font-size:14px;padding-bottom: 0;">   <?php if ($es_movil == 'no') { ?>MENU  <?php };?> </p>
                                
                                <i class="fas fa-bars" style="font-size:1.3em;color: <? echo $d_color_menu?>;"></i>
                                      
                            </button>
                    
                    </li>
                    
                  <?php   if ($es_movil == 'no') { ?>
                    
                    <li class="nav-item">
                        
                        <a   href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="nav-link"><i class="fas fa-search" style="font-size:1.5em;"></i>
                            </a>
                             <div class="dropdown-menu" style="border:0;width:100%;" aria-labelledby="dropdownMenuLink">
                                 <form method="post" action="buscar.php" style="" class="form-inline">
      
                                     <input class="form-control" style="width: 90%;
    padding-top: 11px;
    padding-bottom: 10px;
    border-top: 0;
    border-bottom: 0;" type="search" placeholder="Buscar" aria-label="Search">
      
                                     <button class="btn btn-outline-primary" style="width: 10%;" type="submit"><i class="fas fa-search" style="font-size:1.5em;"></i></button>
    
                                 </form>

                            </div>
                    
                        
                    </li>
                    
                    
                          
                           
                                           <?php  if ($facebook == NULL) {} else {?>

            <li class="nav-item">
                
                <a  class="nav-link hvr-underline-from-center" target="_blank" href="<?php echo $facebook ?>"><i class="fab fa-facebook" aria-hidden="true" style="font-size:1.5em;font-weight:200;color: <? echo $d_color_menu?>;"></i></a>
        
            </li>
              <?php };?>

                <?php  if ($twitter_btn == NULL) {} else {?>
                <li class="nav-item">

              <a  class="nav-link hvr-underline-from-center" target="_blank" href="<?php echo $twitter_btn ?>"><i class="fab fa-twitter" style="font-size:1.5em;font-weight:200;color: <? echo $d_color_menu?>;"></i></a>
</li>
              <?php };?>

              <?php  if ($social_aim == NULL) {} else {?>
              <li class="nav-item">

              <a  class="nav-link hvr-underline-from-center" target="_blank" href="<?php echo $social_aim ?>"><i class="fab fa-instagram" style="font-size:1.5em;font-weight:200;color: <? echo $d_color_menu?>;"></i></a>
</li>
              <?php };?>

              <?php  if ($social_ask == NULL) {} else {?>
              <li class="nav-item">

              <a  class="nav-link hvr-underline-from-center" target="_blank" href="<?php echo $social_ask ?>"> <img src="https://www.radiosnet.com.ar/iconos/1/ask.png" alt="" width="40" height="40" /></a>
</li>
              <?php };?>

              <?php  if ($social_blogger == NULL) {} else {?>
              <li class="nav-item">

              <a  class="nav-link hvr-underline-from-center" target="_blank" href="<?php echo $social_blogger ?>"><i class="fab fa-blogger" style="font-size:1.5em;font-weight:200;color: <? echo $d_color_menu?>;"></i></a>
</li>
              <?php };?>

              <?php  if ($social_flickr == NULL) {} else {?>
              <li class="nav-item">

              <a  class="nav-link hvr-underline-from-center" target="_blank" href="<?php echo $social_flickr ?>"><i class="fab fa-flickr" style="font-size:1.5em;font-weight:200;color: <? echo $d_color_menu?>;"></i></a>
</li>
              <?php };?>

              <?php  if ($social_google == NULL) {} else {?>
              <li class="nav-item">

              <a  class="nav-link hvr-underline-from-center" target="_blank" href="<?php echo $social_google ?>"><i class="fab fa-google" style="font-size:1.5em;font-weight:200;color: <? echo $d_color_menu?>;"></i></a>
</li>
              <?php };?>

              <?php  if ($social_myspace == NULL) {} else {?>
              <li class="nav-item">

              <a  class="nav-link hvr-underline-from-center" target="_blank" href="<?php echo $social_myspace ?>"> <img src="https://www.radiosnet.com.ar/iconos/1/myspace.png" alt="" width="40" height="40" /></a>
</li>
              <?php };?>

              <?php  if ($social_tumblr == NULL) {} else {?>
              <li class="nav-item">

              <a  class="nav-link hvr-underline-from-center" target="_blank" href="<?php echo $social_tumblr ?>"><i class="fab fa-tumblr" style="font-size:1.5em;font-weight:200;color: <? echo $d_color_menu?>;"></i></a>
</li>
              <?php };?>

              <?php  if ($social_vimeo == NULL) {} else {?>
              <li class="nav-item">

              <a  class="nav-link hvr-underline-from-center" target="_blank" href="<?php echo $social_vimeo ?>"><i class="fab fa-vimeo-v" style="font-size:1.5em;font-weight:200;color: <? echo $d_color_menu?>;"></i></a>
</li>
              <?php };?>

              <?php  if ($social_yahoo == NULL) {} else {?>
              <li class="nav-item">

              <a  class="nav-link hvr-underline-from-center" target="_blank" href="<?php echo $social_yahoo ?>"><i class="fab fa-yahoo" style="font-size:1.5em;font-weight:200;color: <? echo $d_color_menu?>;"></i></a>
</li>
              <?php };?>

              <?php  if ($social_youtube == NULL) {} else {?>
              <li class="nav-item">

              <a  class="nav-link hvr-underline-from-center" target="_blank" href="<?php echo $social_youtube ?>"><i class="fab fa-youtube" style="font-size:1.5em;font-weight:200;color: <? echo $d_color_menu?>;"></i></a>
</li>
              <?php };?>

        
                <?php if ($funcion1 == 'si') {  ?>
                <li class="nav-item">

                <a  class="nav-link hvr-underline-from-center" target="_blank" href="<?php echo $dom ?>/envivo"><img src="<?php echo $dom ?>/Fondo_Boton_Rojo.png" class="img-fluid" ></a>
                </li>
                <?php }; ?>
 
                <?php if ($weather2 == 'no') {} else {  ?>
                       
                <li class="nav-item">
                            
                           

<?php $json = file_get_contents("https://apidev.accuweather.com/currentconditions/v1/$infoclima.json?language=es&apikey=hoArfRosT1215");

 //decode JSON to array
 $data = json_decode($json,true);


foreach ($data as $value) {
    $como_esta =  $value["WeatherText"];
	
	$grados =  $value["Temperature"]["Metric"]["Value"];
	$icon =  $value["WeatherIcon"];
	
	$icon = str_pad($icon, 2, "0", STR_PAD_LEFT);
	
	?>
	
	<img class="nav-link svg" src="https://original.radiosnet.com.ar/images/iconos_clima/svg/<?php echo $icon ?>.svg"  style="height:27px!important;"/>
	
	<?
	
    # code...
}
 
 ?>



    </li>
    
                <li class="nav-item">
    
  
    
    <h6 class="nav-link" style="margin:0;padding-bottom: 0;"><?php echo $grados ?>°C</h6>
    <p class="nav-link" style="font-size:10px;margin:0;padding-top:0;"><?php echo $nombre_tiempo ?></p>
    
    
  
    
 
    
    
    
    
</li>

<?  } ; ///cierro el wather ?>


<?  } ; /// cierro el es_movil ?>
                              
                        </ul>
                        
                        
                        
                        
                        

                <div class="collapse navbar-collapse" id="myNavbar" style="max-width:1920px;">
  
                                <ul class="nav justify-content-center" >
                      
 
                                    
  <?

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

  $hay_sub = 'no';
$sql55 = "SELECT * FROM menu WHERE IDsub = '$ID_menu' LIMIT 1";
$consulta55 = mysql_query ($sql55);
while ($row55 = mysql_fetch_array($consulta55))
{
$hay_sub = 'si';

}
mysql_free_result($consulta55);


?> 
                                    
                                    
<li <?php if($hay_sub == 'si') { ?> class="nav-item dropdown" <? } else { ?>  class="nav-item" <?php };?>>
     
    <a class="nav-link hvr-underline-from-center" <?php if($hay_sub == 'si') { ?> class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false" <?php };?> 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" <? }; ?>>
        
        <? if($hay_sub == 'si') { ?>
        
        <? echo $nombre ?>
                
        <i class="fas fa-caret-down" style="color: <? echo $d_color_menu?>;"></i>
        
        <? } else { ?>
        
        <? echo $nombre ?>
        
        <? } ;?>
    
    </a>
  
  
  
  <?
  
  
  
  if ($hay_sub == 'si') {
  ?>
   <ul class="dropdown-menu">
  <?
  
  
$sql66 = "SELECT * FROM menu WHERE IDsub = '$ID_menu' ORDER BY ID";

$consulta66 = mysql_query ($sql66);
while ($row66 = mysql_fetch_array($consulta66))
{
$nombre = $row66["nombre"];
$tipo = $row66["tipo"];
$link = $row66["link"];
$ID_menu = $row66["ID"];

?> 
<li class="nav-item"><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" <? }; ?> class="nav-link hvr-underline-from-left"><?php echo $nombre ?></a>
</li>
<?
}
mysql_free_result($consulta66);

?>
 </ul> <?
  
  }

 ?> 
 </li>
   
                                    
<?
}
mysql_free_result($consulta);
?>

                                    <!-- menu desplegable li class="nav-item dropdown">
                                     <a class="nav-link hvr-underline-from-center" data-toggle="dropdown" aria-expanded="false" href="">
    Disciplinas <i class="fas fa-caret-down" style="color: #FFFFFF;"></i></a>
                                        
 
  
     <ul class="dropdown-menu ">
   
<li class="nav-item">
    <a href="https://original.radiosnet.com.ar/noticias/5000121/futbol" class="nav-link hvr-underline-from-left">Fútbol</a>
    
</li>
 
<li class="nav-item"><a href="https://original.radiosnet.com.ar/noticias/5000122/basquet" class="nav-link hvr-underline-from-left">Basquet</a>
</li>
         
         <li class="nav-item dropdown-submenu">
        <a class="test nav-link hvr-underline-from-left" tabindex="-1" href="#">New dropdown <span class="caret"></span></a>
        
        <ul class="dropdown-menu">
          <li class="nav-item"><a class="nav-link hvr-underline-from-lef" tabindex="-1" href="#">dropdown</a></li>
          <li class="nav-item"><a class="nav-link hvr-underline-from-lef" tabindex="-1" href="#">level dropdown</a></li>
          <li class="dropdown-submenu">
            <a class="test nav-link hvr-underline-from-left" href="#">Anotdropdown <span class="caret"></span></a>
            <ul class="dropdown-menu">
              <li class="nav-item"><a class="nav-link hvr-underline-from-lef" href="#">dropdown</a></li>
              <li class="nav-item"><a class="nav-link hvr-underline-from-lef" href="#">3rddropdown</a></li>
            </ul>
          </li>
            <li class="nav-item"><a class="nav-link hvr-underline-from-lef" tabindex="-1" href="#">2ndlevel</a></li><li class="nav-item"><a class="nav-link hvr-underline-from-lef" tabindex="-1" href="#">2nd</a></li>
        </ul>
      </li>
        
         <li class="nav-item"><a href="https://original.radiosnet.com.ar/noticias/5000122/basquet" class="nav-link hvr-underline-from-left">Basquet</a>
</li>
         
 </ul>  
                                
                                    </li-->
                                    
                    </ul>
                    
                    
                  </div>
     
                            

                        </nav>

                  
                 
                    
                </div>
                    
                    

                </div>
               
    
            </header>
            



