<div id="sidebar" class="col-12 col-sm-8 p-0 col-md-4 col-lg-4 ">

    <div class="inner_sidebar">

        <?            
                            $hay_des_2 = 'no';        
                            mysql_connect ("$host", "$usuario", "$contra");
                            mysql_select_db ("$basedatos");
                            $sql = "SELECT ID FROM notas WHERE destacado = '2' AND ver = 'si' AND home = 'si' ORDER BY ID desc LIMIT 1";
                            $consulta = mysql_query ($sql);
                            while ($row = mysql_fetch_array($consulta))
                            {
                            $ID_cac = $row["ID"];
                            $hay_des_2 = 'si';
                            }
                            mysql_free_result($consulta);
                            ?>

        <?

                            mysql_connect ("$host", "$usuario", "$contra");
                            mysql_select_db ("$basedatos");
                            $sql = "SELECT ID,titulo,texto,bajada,audio,youtube,d,m,a,carpetafoto,foto,cat,home,impresiones FROM notas WHERE destacado = '2' AND ver = 'si' AND home = 'si' ORDER BY ID desc LIMIT 4";
                            $consulta = mysql_query ($sql);
                            while ($row = mysql_fetch_array($consulta))
                            {
                            $ID = $row["ID"];
                            $i_publi = $i_publi + 1;
                            $titulo = $row["titulo"];
                            $bajada = $row["bajada"];
                            $texto = $row["texto"];
                            $audio = $row["audio"];
                            $youtube  = $row["youtube"];
                            $d = $row["d"];
                            $m = $row["m"];
                            $a = $row["a"];
                            $fecha = "$d - $m - $a";
                            $carpetafoto = $row["carpetafoto"];
                            $foto = $row["foto"];
                            $cat = $row["cat"];
                            $home = $row["home"];
                            $impresiones = $row["impresiones"];
                            $impresiones = $impresiones + 1;
                            $sSQL="UPDATE  `$basedatos`.`notas` SET  `impresiones` =  '$impresiones' WHERE ID = '$ID'";
                            mysql_db_query("$basedatos",$sSQL);
                            $M = $m;
                            if ($M == '01') {$m = "enero";};
                            if ($M == '02') {$m = "febrero";};
                            if ($M == '03') {$m = "marzo";};
                            if ($M == '04') {$m = "abril";};
                            if ($M == '05') {$m = "mayo";};
                            if ($M == '06') {$m = "junio";};
                            if ($M == '07') {$m = "julio";};
                            if ($M == '08') {$m = "agosto";};
                            if ($M == '09') {$m = "septiembre";};
                            if ($M == '10') {$m = "octubre";};
                            if ($M == '11') {$m = "noviembre";};
                            if ($M == '12') {$m = "diciembre";};

                            if ($cat == 0) {} else {
                            $sql2 = "SELECT * FROM categorias WHERE ID = '$cat'";
                            $consulta2 = mysql_query ($sql2);
                            while ($row2 = mysql_fetch_array($consulta2))
                            {
                            $cat = $row2["nombre"];
                            $color_cat = $row2["color"];
                            }
                            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);
                            ?>


        <?php       ////aca arranca el articulo?>

        <?php 

$i= $i + 1;

}
mysql_free_result($consulta);
//aca termina article
?>


        <?  include 'propagandas_div.php'; ?>

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


</div>

<!-- esto es el footer -->
<?php if ($estiloweb == 76) { include 'footer.planeta.php'; }; ?>
<!-- termina el footer -->

<? include 'clix_footer.php';?>

<script>
    // Set the options to make LazyLoad self-initialize
    window.lazyLoadOptions = {
        elements_selector: ".lazy",
        // ... more custom settings?
    };
    // Listen to the initialization event and get the instance of LazyLoad
    window.addEventListener('LazyLoad::Initialized', function (event) {
        window.lazyLoadInstance = event.detail.instance;
    }, false);
</script>
<script async src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@12.4.0/dist/lazyload.min.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/wow/1.1.2/wow.min.js"></script>
<script>
    // new WOW().init();
    //  console.log('asdasd34');
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
    integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous">
</script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
    integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous">
</script>
<script src="https://radioshosting.com/css/js/lightbox-plus-jquery.min.js"></script>
<script src="js/jquery.fittext.js"></script>
<!--script type="text/javascript" src="./js/rAF.js"></script>
<script type="text/javascript" src="./js/ResizeSensor.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/sticky-sidebar@3.3.1/dist/sticky-sidebar.js"></script-->
<script src="https://unpkg.com/flickity@2/dist/flickity.pkgd.min.js"></script>
<script src="https://unpkg.com/isotope-layout@3/dist/isotope.pkgd.js"></script>

<script async type="text/javascript">
    window.setInterval(function () {
        $('.grid').isotope({
            itemSelector: '.grid-item'
        });
    }, 2000);
</script>

<script type="text/javascript">
    window.setInterval(function () {
        $('.grid2').isotope({
            itemSelector: '.grid-item2'
        });
    }, 2000);
</script>

<script language=javascript>
    function ventanaSecundaria56(URL) {
        window.open(URL, "ventana1", "width=960,height=630,scrollbars=NO")
    }
</script>

<script>
    $(function () {

        var a = $(".carousel-captionh1").fitText(1.2, {
            minFontSize: '14px',
            maxFontSize: '18px'
        });
        $(".colorTitulo").fitText(1.2, {
            minFontSize: '14px',
            maxFontSize: '24px'
        });
        $(".carousel-caption h2").fitText(1.2, {
            minFontSize: '14px',
            maxFontSize: '30px'
        });
        $(".tituloVideo").fitText(1.2, {
            minFontSize: '14px',
            maxFontSize: '30px'
        });
        $(".tarso").fitText(1.2, {
            minFontSize: '20px',
            maxFontSize: '50px'
        });
        $(".tarso2").fitText(1.2, {
            minFontSize: '5px',
            maxFontSize: '11px'
        });


        // var sidebar = new StickySidebar('#sidebar', {
        //     containerSelector: '#main-content',
        //     innerWrapperSelector: '.sidebar__inner',
        //     topSpacing: 60,
        //     bottomSpacing: 20,
        //     minWidth: 450
        // });


        $(function () {

            jQuery('img.svg').each(function () {
                var $img = jQuery(this);
                var imgID = $img.attr('id');
                var imgClass = $img.attr('class');
                var imgURL = $img.attr('src');
                //console.log('lalasl', imgURL);
                jQuery.get(imgURL, function (data) {

                    // Get the SVG tag, ignore the rest
                    var $svg = jQuery(data).find('svg');

                    // Add replaced image's ID to the new SVG
                    if (typeof imgID !== 'undefined') {
                        $svg = $svg.attr('id', imgID);
                    }
                    // Add replaced image's classes to the new SVG
                    if (typeof imgClass !== 'undefined') {
                        $svg = $svg.attr('class', imgClass + ' replaced-svg');
                    }

                    // Remove any invalid XML tags as per http://validator.w3.org
                    $svg = $svg.removeAttr('xmlns:a');

                    // Check if the viewport is set, else we gonna set it if we can.
                    /*if(!$svg.attr('viewBox') && $svg.attr('height') && $svg.attr('width')) {
                        $svg.attr('viewBox', '0 0 ' + $svg.attr('height') + ' ' + $svg.attr('width'))
                    }*/

                    // Replace image with new SVG
                    $img.replaceWith($svg);

                }, 'xml');

            });
        });

    });
</script>
<?php include 'google.php';?>
</body>

</html>