<?php 
    header("Access-Control-Allow-Origin: *");
    header('Access-Control-Allow-Credentials: true');
    header('Access-Control-Max-Age: 8640000');
    
    
    include '../../../concha.php';
    
    
                $sql = "SELECT ID,titulo,texto,bajada,audio,youtube,d,m,a,carpetafoto,foto,cat,home,impresiones, ext_img FROM notas WHERE destacado = '2' AND ver = 'si' ORDER BY ID desc LIMIT 1";
                $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"];
                $ext_img = $row["ext_img"];
                $cat = $row["cat"];
                $home = $row["home"];
                $impresiones = $row["impresiones"];
                $hay_nota_des2 = "si";
                $impresiones = $impresiones + 1;
                $sSQL="UPDATE  `$basedatos`.`notas` SET  `impresiones` =  '$impresiones' WHERE ID = '$ID'";
                mysql_db_query("$basedatos",$sSQL);
                }
                mysql_free_result($consulta);
                
                
                
                
                
                     $sql = "SELECT ID,titulo,texto,bajada,audio,youtube,d,m,a,carpetafoto,foto,cat,home,impresiones, ext_img FROM notas WHERE destacado = '1' AND ver = 'si' ORDER BY ID desc LIMIT 1";
                $consulta = mysql_query ($sql);
                while ($row = mysql_fetch_array($consulta))
                {
                $ID = $row["ID"];
                $i_publi = $i_publi + 1;
                $titulo1 = $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";
                $carpetafoto1 = $row["carpetafoto"];
                $foto1 = $row["foto"];
                $ext_img1 = $row["ext_img"];
                $cat = $row["cat"];
                $home = $row["home"];
                $impresiones = $row["impresiones"];
                $hay_nota_des2 = "si";
                $impresiones = $impresiones + 1;
                $sSQL="UPDATE  `$basedatos`.`notas` SET  `impresiones` =  '$impresiones' WHERE ID = '$ID'";
                mysql_db_query("$basedatos",$sSQL);
                }
                mysql_free_result($consulta);
                
                
                
                     $sql = "SELECT ID,titulo,texto,bajada,audio,youtube,d,m,a,carpetafoto,foto,cat,home,impresiones, ext_img FROM notas WHERE destacado = '1' AND ver = 'si' ORDER BY ID desc LIMIT 1,1";
                $consulta = mysql_query ($sql);
                while ($row = mysql_fetch_array($consulta))
                {
                $ID = $row["ID"];
                $i_publi = $i_publi + 1;
                $titulo2 = $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";
                $carpetafoto2 = $row["carpetafoto"];
                $foto2 = $row["foto"];
                $ext_img2 = $row["ext_img"];
                $cat = $row["cat"];
                $home = $row["home"];
                $impresiones = $row["impresiones"];
                $hay_nota_des2 = "si";
                $impresiones = $impresiones + 1;
                $sSQL="UPDATE  `$basedatos`.`notas` SET  `impresiones` =  '$impresiones' WHERE ID = '$ID'";
                mysql_db_query("$basedatos",$sSQL);
                }
                mysql_free_result($consulta);
                
                
                
                
                
                ?>
{"data":['<? echo $titulo ?>'], "img":['https://lu32.com.ar/<? echo $carpetafoto ?>/resize_<? echo $foto ?><? echo $ext_img ?>'], "data2":['<? echo $titulo1 ?>'], "img2":['https://lu32.com.ar/<? echo $carpetafoto1 ?>/resize_<? echo $foto1 ?><? echo $ext_img1 ?>'], "data3":['<? echo $titulo2 ?>'], "img3":['https://lu32.com.ar/<? echo $carpetafoto2 ?>/resize_<? echo $foto2 ?><? echo $ext_img2 ?>']}
