<?php include('concha.php'); ?>

  

<style>
    
    
    .navbar{
       /* padding: 0px 0px 0px 15px!important;
        box-shadow: 2px 2px 3px #ccc;
                margin-bottom: 15px!important;*/
                background-color: <?php echo $d_color_fondo_menu ?>;
            }
    .nav-link {
                                    
        color: <?php echo $d_color_menu ?>;
        font-family: <?php echo $style_titulo ?>;
        font-weight: 700;
    }
    
    .nav-item:active,   
    .nav-item:focus,
    .nav-item:hover {
        
        
    }
    .caret{
        
      color: <?php echo $d_color_fondo_menu ?>;  
        
    }
    
    .dropdown-menu {
        
        padding: 0;
    }
    
    .show{
    
    
    }
        .dropdown-menu li a{
        
        padding: .5rem;
        font-size: 1rem;
        
    }
        
        .dropdown-menu .nav-item .nav-link:hover{
        
        background-color: <?php echo $d_color_fondo_menu ?>;
        color: <?php echo $d_color_menu_sobre ?>;
            
    }
    
    
   .nav-item .dropdown:hover ul{
        display: block;
        
    }
    
</style>

<div id="header-wrapper" class="">
            <div class="topbar">
                <div class="<?if ($opcion101 == 1) { echo 'container-fluid';}if ($opcion101 == 0){echo 'container';}?>">
                    <div class="row">

                        <div class="col-6 col-sm-4 pr-0" style="max-height: 40px;overflow: hidden;">
                                <?
                                    $A = date('Y');
                                    $M = date('m');
                                    $D = date('j');
                                    $H = date('H');
                                    $MIN = date('i');
                                    $date = "$Y$M$D";
                                    if ($M == '01') {$m = $lang_enero;}
                                    if ($M == '02') {$m = $lang_febrero;}
                                    if ($M == '03') {$m = $lang_marzo;}
                                    if ($M == '04') {$m = $lang_abril;}
                                    if ($M == '05') {$m = $lang_mayo;}
                                    if ($M == '06') {$m = $lang_junio;}
                                    if ($M == '07') {$m = $lang_julio;}
                                    if ($M == '08') {$m = $lang_agosto;}
                                    if ($M == '09') {$m = $lang_septiembre;}
                                    if ($M == '10') {$m = $lang_octubre;}
                                    if ($M == '11') {$m = $lang_noviembre;}
                                    if ($M == '12') {$m = $lang_diciembre;}
                                ?>
                                <p class="mb-0 texto-fecha" id="text-fecha">
                                        <?php $diasemana=date('N'); // asignamos el numero del dia de hoy a la variable $diasemana ?>
                                        <?php //Procedemos a verificar si el dia de hoy es 1 lunes si es 2 martes... etc..  ?>
                                        <?php if($diasemana == "1" ){ echo $lang_lunes  ;}else{;}?>
                                        <?php if($diasemana == "2" ){ echo $lang_martes ;}else{;}?>
                                        <?php if($diasemana == "3" ){ echo $lang_miercoles ;}else{;}?>
                                        <?php if($diasemana == "4" ){ echo $lang_jueves ;}else{;}?>
                                        <?php if($diasemana == "5" ){ echo $lang_viernes ;}else{;}?>
                                        <?php if($diasemana == "6" ){ echo $lang_sabado ;}else{;}?>
                                        <?php if($diasemana == "7" ){ echo $lang_domingo ;}?>
                                        <?php echo $D ;?> de <?php echo $m ;?> de <?php echo $A ;?>
                                </p>
                        </div>
                        <div class="col-9 col-sm-4 d-none d-sm-block col-lg-4 p-0">
                            <?php  include 'marquesina3.php'; ?>
                        
                        </div>
                        <div class="col-6 col-sm-4 text-right">
                            <ul class="mb-0 d-flex justify-content-end">

                                        <?php if ($facebook == NULL) {} else {?>
                                            <li class="" style=" ">
                                                <a class="btn" target="_blank" href="<?php echo $facebook ?>"><i class="fab fa-facebook" aria-hidden="true" style=" color: <? echo $d_color_menu?>;"></i></a>
                                            </li>
                                        <?php };?>

                                        <?php if ($social_aim == NULL) {} else {?>
                                            <li class="" style=" ">
                                                <a class="btn" target="_blank" href="<?php echo $social_aim ?>"><i class="fab fa-instagram" aria-hidden="true" style=" color: <? echo $d_color_menu?>;"></i></a>
                                            </li>
                                        <?php };?>

                                        <?php if ($twitter_btn == NULL) {} else {?>
                                        <li class="" style=" ">
                                            <a class="btn" target="_blank" href="<?php echo $twitter_btn ?>"><i class="fab fa-twitter" style=" color: <? echo $d_color_menu?>;"></i></a>
                                        </li>
                                        <?php };?>

                                        <?php if ($social_blogger == NULL) {} else {?>
                                        <li class="" style=" ">
                                            <a class="btn" target="_blank" href="<?php echo $social_blogger ?>"><i class="fab fa-blogger" style=" color: <? echo $d_color_menu?>;"></i></a>
                                        </li>
                                        <?php };?>

                                        <?php if ($social_flickr == NULL) {} else {?>
                                        <li class="" style=" ">
                                            <a class="btn" target="_blank" href="<?php echo $social_flickr ?>"><i class="fab fa-flickr" style=" color: <? echo $d_color_menu?>;"></i></a>
                                        </li>
                                        <?php };?>

                                        <?php if ($social_google == NULL) {} else {?>
                                        <li class="" style=" ">
                                            <a class="btn" target="_blank" href="<?php echo $social_google ?>"><i class="fab fa-google" style=" color: <? echo $d_color_menu?>;"></i></a>
                                        </li>
                                        <?php };?>
                                      
                                        <?php  if ($social_tumblr == NULL) {} else {?>
                                        <li class="" style=" ">
                                            <a class="btn" target="_blank" href="<?php echo $social_tumblr ?>"><i class="fab fa-instagram" style=" color: <? echo $d_color_menu?>;"></i></a>
                                        </li>
                                        <?php };?>

                                        <?php if ($social_vimeo == NULL) {} else {?>
                                        <li class="" style=" ">
                                            <a class="btn" target="_blank" href="<?php echo $social_vimeo ?>"><i class="fab fa-vimeo-v" style=" color: <? echo $d_color_menu?>;"></i></a>
                                        </li>
                                        <?php };?>

                                        <?php if ($social_yahoo == NULL) {} else {?>
                                        <li class=" " style=" ">
                                            <a class="btn" target="_blank" href="<?php echo $social_yahoo ?>"><i class="fab fa-yahoo" style=" color: <? echo $d_color_menu?>;"></i></a>
                                        </li>
                                        <?php };?>

                                        <?php  if ($social_youtube == NULL) {} else {?>
                                        <li class=" " style=" ">
                                            <a  class="btn" target="_blank" href="<?php echo $social_youtube ?>"><i class="fab fa-youtube" style=" color: <? echo $d_color_menu?>;"></i></a>
                                        </li>
                                        <?php };?>

                            </ul>
                        </div>
                    </div>
                </div>
            </div>
            
            
            
            <header class="container-fluid header">
            
                    <div class="<?if ($opcion101 == 1) { echo 'container-fluid';}if ($opcion101 == 0){echo 'container';}?>">
                    
                    
                        <div class="row">
                        
                      <?php   include 'mostrar_prop_header.php'; ?>
            
                        
                             <?  if ($funcion1 == 'si') { ?>

                            <div class="col-6 col-md-3 col-lg-3 d-flex justify-content-center align-items-center">
                                <div class="container-fluid">
                                    <div class="row">
                                                
                                        <div class="col-5" style="text-align:center;padding:10px;">
                                            <img src="<? echo $dom;?>/upload_pic/resize_<?php echo $imagen ?>.jpg"  class="img-fluid" style="max-width:100%;">
                                        </div>
                                            
                                                                          
                                        <div  class="col-7" style="padding:10px;text-align: center;" >        
                                        <h6 style="margin-bottom:0;text-transform:uppercase;font-weight:700;" class=""><?php echo $nombre_pro ?></h6>
                                            <p style="margin-bottom:0;padding-bottom:0;color:#000;font-weight:600; font-size:11px;"><?php echo $lang_EN_VIVO ?></p>
                                            <p style="margin-bottom:0;padding-bottom:0;color:#000;font-weight:600; font-size:11px;"><b><?php echo  $ini2 ?></b> a <b><?php echo $fin2 ?></b></p>
                                            
                                          <p>  <i class="fas fa-play"></i></p>
                                        </div> 
                                                                        
                                    </div>
                                </div>                             
                            </div>

                            <div class="d-none col-6 d-lg-block col-md-6 col-lg-6 text-center">

                                    <a href="<?php echo $dom ?>/principal.php"><img src="<?
                                        $logo_C = str_replace('http://', 'https://', $logo_C); echo $logo_C; ?>"
                                        class="img-fluid"
                                        style="padding-top:20px; padding-bottom: 20px;max-height: 170px;"
                                        alt="<?php echo $nombresitio ?>" title="<?php echo $nombresitio ?>"></a>

                            </div>

                            <div  class="col-6 col-md-3 col-lg-3 d-flex justify-content-center align-items-center">
                                <? if ($weather2 == 'si'){ include 'weather4.php';} else {}  ?>
                            </div>

                            <?php } else { ?>

                            <div class="d-none d-block col-6 d-lg-block col-md-6 col-lg-6">

                                    <a href="<?php echo $dom ?>/principal.php"><img src="<?
                                        $logo_C = str_replace('http://', 'https://', $logo_C); echo $logo_C; ?>"
                                        class="img-fluid"
                                        style="padding-top:20px; padding-bottom: 20px;max-height: 170px;"
                                        alt="<?php echo $nombresitio ?>" title="<?php echo $nombresitio ?>"></a>

                            </div>

                            <div  class="col-6 col-md-6 col-lg-6 d-flex justify-content-center align-items-center">
                                <? if ($weather2 == 'si'){ include 'weather4.php';} else {}  ?>
                            </div>

                            <? } ?>



                        </div>
                    </div>
            </header>


        </div>

<nav class="navbar navbar-default sticky-top navbar-expand-lg">
    
            
                    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#myNavbar">
                                    
                        <i class="fas fa-bars" style="color: <? echo $d_color_menu?>;"></i>
                  
                    </button>
                
    <a rel="home" href="<?php echo $dom ;?>/principal.php" class="navbar-brand d-lg-none " style="margin:0 auto;"><img class="img-fluid" style="max-height:35px;" 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 justify-content-center" id="myNavbar" style="">
      <ul class="<? if ($estiloweb <= 3){echo "nav navbar-nav";} else {echo "navbar-nav ";} ?>" >
                      

        <?php 

          
            $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" <?php if($hay_sub == 'si') { ?> class="dropdown-toggle" data-toggle="dropdown" <?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 ?> <? } 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" ><?php echo $nombre ?></a>
            </li>
            <?
            }
           $consulta66->free_result();

            ?>
            </ul> <?
              
              }

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

                    </ul>
                    
                  </div>
     
</nav>


                        <? if($funcion10 == 'si'){?>
    <div class="container my-3">
            <div class="row mb-3">
                <div class="col-12 text-center p-0 d-flex justify-content-center align-items-center" style="height:150px;background-image:url('https://www.argentina.gob.ar/sites/default/files/styles/jumbotron/public/2020-header-web-coronavirus-2.jpg?itok=mn2bHUNt');">
                    <a class="stretched-link" href="https://www.argentina.gob.ar/salud/coronavirus-COVID-19" target="_blank">
                        <h2>MÁS INFORMACIÓN SOBRE COVID-19</h2>
                    </a>
                </div>
                <div class="col-12 d-flex justify-content-center" style="background-color:red;">
                    
                    <div class="container-fluid p-0">
                        <div class="row">
                            <div class="col-6 col-md-3 ">
                                <ul style="list-style:none;padding:0;">
                                    <li style="list-style:none;text-align:center;"><p style="color:#ffffff;">Fecha</p></li>
                                    <li style="list-style:none;text-align:center;"><h2 class="colorTitulo info" style="color:#ffffff;"></h2></li>
                                </ul>
                            </div>
                            <div class="col-6 col-md-3 ">
                                <ul style="list-style:none;padding:0;">
                                    <li style="list-style:none;text-align:center;"><p style="color:#ffffff;">Contagios</p></li>
                                    <li style="list-style:none;text-align:center;"><h2 class="colorTitulo info2" style="color:#ffffff;"></h2></li>
                                </ul>
                            </div>
                            <div class="col-6 col-md-3 ">
                                <ul style="list-style:none;padding:0;">
                                    <li style="list-style:none;text-align:center;"><p style="color:#ffffff;">Recuperados</p></li>
                                    <li style="list-style:none;text-align:center;"><h2 class="colorTitulo info4" style="color:#ffffff;"></h2></li>
                                </ul>
                            </div>
                            <div class="col-6 col-md-3 ">
                                <ul style="list-style:none;padding:0;">
                                    <li style="list-style:none;text-align:center;"><p style="color:#ffffff;">Muertes</p></li>
                                    <li style="list-style:none;text-align:center;"><h2 class="colorTitulo info3" style="color:#ffffff;"></h2></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    
                </div>
            </div>
        </div>
    
<?} else {} ?>
    <script>
        fetch("https://pomber.github.io/covid19/timeseries.json")
      .then(response => response.json())
      .then(data => {
        let yi = data["Argentina"].reverse();
        console.log(JSON.stringify(yi[0]));
        $('.info').text(yi[0].date);
        $('.info2').text(yi[0].confirmed);
        $('.info3').text(yi[0].deaths);
        $('.info4').text(yi[0].recovered);
      })

    </script>