                        <article style="margin-bottom:20px;">

                          <div class="base-box2">



                                  <div class="widget-head" style="margin-bottom: 16px;">

                                      <h3 class="widget-title"><span>DIARIOS DE HOY</span></h3>

                                  </div>


<? $rand =  rand(1,4) ?>

                                  <!-- TABLE CONSTRUCTION-->
                                          <table id='table2' style="text-align:center; width: 100%;">
                                              <!-- HEADING FORMATION -->
                                          


                                              <script>
                                                  $(document).ready(function () {

                                                      // FETCHING DATA FROM JSON FILE
                                                      $.getJSON("https://diarios.x7.com.ar/api/v1/preferencias/diarios_json.php",
                                                              function (data2) {
                                                          var student2 = '';

                                                          // ITERATING THROUGH OBJECTS
                                                          $.each(data2, function (key, value2) {

                                                              //CONSTRUCTION OF ROWS HAVING
                                                              // DATA FROM JSON OBJECT
               


                                    student2 += '<tr><td>';

<? if ($rand == 1) { ?>

                                                              student2 += '<a class="" data-lightbox="example-set" id="imagensidebar" href="' +
                                                                  value2.clarin_grande + '">';
                                                                  
                                                                     student2 += '<img src=' +
                                                                  value2.clarin_chico + '>';
                                                                  
                                                                  
                                                                  
                                                                  <? } ?>
                                                   <? if ($rand == 2) { ?>

                                                              student2 += '<a class="" data-lightbox="example-set" id="imagensidebar" href="' +
                                                                  value2.nacion_grande + '">';
                                                                  
                                                                     student2 += '<img src=' +
                                                                  value2.nacion_chico + '>';
                                                                  
                                                                  
                                                                  
                                                                  <? } ?>     
                                                                  
                                                                                       <? if ($rand == 3) { ?>

                                                              student2 += '<a class="" data-lightbox="example-set" id="imagensidebar" href="' +
                                                                  value2.ole_grande + '">';
                                                                  
                                                                     student2 += '<img src=' +
                                                                  value2.ole_chico + '>';
                                                                  
                                                                  
                                                                  
                                                                  <? } ?>               
                                                                  
                                                                  
                                                                       <? if ($rand == 4) { ?>

                                                              student2 += '<a class="" data-lightbox="example-set" id="imagensidebar" href="' +
                                                                  value2.pagina12_grande + '">';
                                                                  
                                                                     student2 += '<img src=' +
                                                                  value2.pagina12_chico + '>';
                                                                  
                                                                  
                                                                  
                                                                  <? } ?>             
                                                                  
                                                                  
                                                                    student2 += '</a>';

                                                                  
                                                                  student2 += '</td>';

                                                   
                                                              student2 += '</tr>';
                                                          });

                                                          //INSERTING ROWS INTO TABLE
                                                          $('#table2').append(student2);
                                                      });
                                                  });
                                              </script>






</table>
  </div> <div class="col-12" style="text-align:center">
<a href="<? echo $dom ?>/diarios.php">VER MÁS TAPAS</a></div>
</article>
