<?php include('concha.php'); ?><?php $file = "$logo_C";  // Dirección de la imagen
 
  $imagen = getimagesize($file);    //Sacamos la información
  $ancho_logo = $imagen[0];              //Ancho
  $alto_logo = $imagen[1];

  
 $alto_logo_nuevo =  $alto_logo;

?>

  <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 {
        
        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: #000!important;
        
        
    }
    
    .hvr-underline-from-center:before{
        background: #000!important;
        
    }
    
    .hvr-underline-from-left:before{
        background: #000!important;
        
    }
    
</style>


<header class="container-fluid 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="d-none d-xs-block col-12 col-sm-12 d-lg-block col-md-2 col-lg-2" style="text-align:center;">
                        
                            <a href="principal.php"><img src="<?php echo $logo_C ?>" class="img-fluid" style=" max-height:65px;padding-top:5px;"  alt="Logo"></a>
                        
                    </div>
                                        
                    <div  class="col-6 col-sm-8 col-md-9 col-lg-7">
                 
                        <nav class="navbar navbar-expand-lg navbar-light bg-light">
    
            

                            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#myNavbar">
                                          
                                <span class="navbar-toggler-icon"></span>
                                      
                            </button>
                

                            <a rel="home" href="<?php $dom ;?>/principal.php" class="navbar-brand d-lg-none " style="margin:0 auto;"><img class="img-fluid" style="max-height:45px;" src="<?php 
							$logo_C = str_replace('https:', '',  $logo_C); 
							$logo_C = str_replace('http:', '',  $logo_C); 
							echo $logo_C; ?>"></a>
                

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




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

$consulta = $conn->query($sql);
while ($row = $consulta->fetch_assoc())
{
$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 = $conn->query($sql55);
while ($row55 = $consulta55->fetch_assoc())
{
$hay_sub = 'si';

}
$consulta55->free_result();


?> 
<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 = $conn->query($sql55);
while ($row55 = $consulta55->fetch_assoc())
{
$titulo_cat = $row55["nombre"];

}
$consulta55->free_result();

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

    if ($tipo == 'seccion'){ 
	  
	  

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


$consulta22 = $conn->query($sql22);


while ($row22 = $consulta22->fetch_assoc())


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


$consulta22->free_result();
 $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"></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 = $conn->query($sql66);
while ($row66 = $consulta66->fetch_assoc())
{
$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 = $conn->query($sql55);
while ($row55 = $consulta55->fetch_assoc())
{
$titulo_cat = $row55["nombre"];

}
$consulta55->free_result();

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

	  if ($tipo == 'seccion'){ 
	  
	  

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


$consulta22 = $conn->query($sql22);


while ($row22 = $consulta22->fetch_assoc())


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


$consulta22->free_result();
 $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>
<?
}
$consulta66->free_result();

?>
 </ul> <?
  
  }

 ?> 
 </li>
<?
}
$consulta->free_result();
?>

                    </ul>
                    
                  </div>
     

                        </nav>

                   
                 
                    
                </div>
                    
                    <div class="col-6 col-sm-4 col-md-3 col-lg-3" style="text-align:center;padding:0;">

                        <ul class="nav mr-auto" role="group" aria-label="Redes sociales" style="margin:0;display:inline-flex;line-height:4;">
                            
                            
                             
                            <a href="https://www.facebook.com/undervoxro/" class="nav-link hvr-underline-from-center" target="_blank">
                                <i class="fab  fa-facebook " style="font-size:1.5em;"></i>
                                </a> 
                            
                          
                         
                            <a href="https://www.instagram.com/under.vox/" class="nav-link hvr-underline-from-center" target="_blank">
                                 <i class="fab  fa-instagram " style="font-size:1.5em;"></i>
                            </a> 
                           
                            
                            <a href="#" class="nav-link hvr-underline-from-center" target="_blank">
                                 <i class="fab  fa-twitter " style="font-size:1.5em;"></i>
                            </a> 
                       
                              
                        </ul>

                    </div>

                </div>
               
    
            </header>
            



