<?



include 'concha.php';

$titulo = "$nombresitio / Archivo";
include 'arriba_full.php'
?>


 <div class="news-summary <? if ($estiloweb == 4 || 61) { ?> col-lg-8 col-md-8<? } else { ?>col-lg-9 col-md-9 <? } ?> col-sm-12 col-12 p-0" >


<div>



                <div class="widget-head" style="">
                    <h3 <? if ($estiloweb <= 3){echo 'style="padding: 1px 5px 1px 5px; background-color:'; echo $d_color_fondo_menu; echo ';font-family:'; echo $style_titulo; echo ';font-size:25px;color:#ffffff;"'; } else {echo 'class="widget-title"';} ?>>
                        <span><? echo $lang_100075 ?></span>
                    </h3>
                </div>

        <div class="container-fluid">

              <div class="col-12"  style="margin-bottom:10px;">
                    <form id="form1" name="form1" method="GET" action="buscar.php" style="padding-top:30px;">

                      <span style=";font-family:<?php echo $style_titulo ?>;font-size:20px;color:<?php echo $d_color_titulo?>;">BUSCADOR:</span>
                      <input name="busqueda" type="text" class="form-control" size="30" value="" id="inputString" onkeyup="lookup(this.value);" onblur="fill();" />
                      <input name="Submit" type="submit" class="btn btn-outline-primary my-2 my-sm-0" value="<? echo $lang_buscar ?>" />
                    </form>
                  <hr />
              </div>


              <?
              //NOMBRE DEL ARCHIVO PHP
              $pagina = "archivo.php";
              //NOMBRE DE LA TABLA ADONDE SE QUIERE REALIZAR LA CONSULTA
              $tabla = "notas";
              //CANTIDAD DE RESULTADOS POR TABLA
              $c = 10;

              $ID = (int)$_GET['ID'];
              $i = (int)$_GET['i'];
              $p = (int)$_GET['p'];
              if ($i == NULL) {$i = 0; $p = 1;} else {};


              
              $sql = "SELECT ID,titulo,texto,bajada,d,m,a,carpetafoto,foto,ext_img FROM $tabla WHERE ver = 'si' ORDER BY ID desc LIMIT $i,$c";
              $consulta = $conn->query($sql);
              while ($row = $consulta->fetch_assoc())
              {


              $ID = $row["ID"];
              $titulo = $row["titulo"];
              $texto = $row["texto"];
              $bajada = $row["bajada"];
              $d = $row["d"];
              $m = $row["m"];
              $a = $row["a"];
              $carpetafoto = $row["carpetafoto"];
              $foto = $row["foto"]; $ext_img = $row["ext_img"];

              ?>


                  <div class="row mb-3">

                        <div class="col-lg-5 col-sm-5 col-12 p-0">
                            <?php    if ($foto == NULL) {} else {?>
                            <div class="grises">
                            <a href="<? echo $dom;?>/nota/<?php echo $ID ?>/<?php echo urls_amigables($titulo) ?>">
                              <? /* 1 */ if ($domold != '') { $dom_bandera = $dom; $dom = $domold; }; ?>

                                <!--img src="<?php echo $dom ?>/<?php echo $carpetafoto ?>/thumbnail_<?php echo $foto ?><?php echo $ext_img ?>" class="<? if ($estiloweb <= 3){echo "img-responsive";} else {echo "img-fluid";} ?> "/-->
                                <img loading="lazy"
                                    class="img-fluid lazy"
                                    src="<? $fotojj = substr($foto,0,4); if ($fotojj == 'http') { echo $foto; } else { echo "$dom/$carpetafoto/thumbnail_$foto$ext_img"; }; ?>"
                                    alt="<?php if ($utf == 1) {echo utf8_decode($titulo);} else {echo $titulo;}; ?>">
                                      <? /* 2 */ $dom = $dom_bandera; ?>
                                </a>
                            </div><?php };?>


                        </div>
                        <div class="col-lg-7 col-sm-7 col-12">
                            <div class="mom-post-meta nb-item-meta">

                            <span class="entry-date" style="font-family:<?php echo $style_titulo ?>;font-size:18px;"><?php echo $d ?>/<?php echo $m ?>/<?php echo $a ?></span></div>


                                    <a href="<? echo $dom;?>/nota/<?php echo $ID ?>/<?php echo urls_amigables($titulo) ?>">
                                        <h3 class="colorTitulo" style="font-family:<?php echo $style_titulo ?>;font-size:<?php echo $d_ta_titulo?>;">
                                        <?php if ($utf == 1) {echo utf8_decode($titulo);} else {echo $titulo;}; ?>
                                        </h3>
                                    </a>

                            <p style=""><?php   echo $bajada; ?></p>
                          </div>

                        </div>









                          <?php







                                    }
                                    $consulta->free_result();

                                    ?>
                                    <?php
                    $cant = 15000;


                                  $cant = $cant + $c - 1;
                                  $cant = $cant / $c;
                                  $cant = (int) $cant; //esto es un integer
                                  $pag = 1;
                                  $cuenta = 1;
                                  ?>
                                <div class=" mt-5 col-lg-12 col-12" style="margin-bottom:10px;">

                                  <nav aria-label="Page navigation example">
                                      <ul class="pagination justify-content-center">

                                                                <?php if ($p == 1) {} else { ?>

                                                  <li class="page-item">

                                                      <a class="page-link  btn btn-outline-primary" rel="nofollow" href="<?php echo $pagina ?>?i=<?php echo $i - $c ?>&amp;p=<?php echo $p - 1 ?>" aria-label="Previous">

                                                          <i class="fas fa-angle-left"></i></a>

                                                    </li>
                                                      <?php }?>




                                                    <?
                                                    while ($cuenta <= $cant) {
                                                    if ($cuenta == $p) {
                                                    ?>
                                                    <li class="page-item"><a class="page-link  btn btn-outline-primary" href='<?php echo $dom ?>/<?php echo $pagina ?>?i=<?php echo $pag ?>&amp;p=<?php echo $cuenta ?>'> <?php echo $cuenta ?></a></li>


                                                    <?
                                                      } else {

                                                      $pmenos1 = $p-1;
                                                      $pmenos2 = $p-2;
                                                      $pmenos3 = $p-3;
                                                      $pmenos4 = $p-4;

                                                      $pmas1 = $p+1;
                                                      $pmas2 = $p+2;
                                                      $pmas3 = $p+3;
                                                      $pmas4 = $p+4;



                                                            if ($cuenta == $pmenos1 or $cuenta == $pmenos2 or $cuenta == $pmenos3 or $cuenta == $pmenos4 or $cuenta == $pmas1 or $cuenta == $pmas2 or $cuenta == $pmas3 or $cuenta == $pmas4) { ?>

                                                              <li class="page-item"><a class="page-link   btn btn-outline-primary"  rel="nofollow"  href='<?php echo $dom ?>/<?php echo $pagina ?>?i=<?php echo $pag ?>&amp;p=<?php echo $cuenta ?>'> <?php echo $cuenta ?></a></li>
                                                                      <? } else {};

                                                            };

                                                            $pag = $pag + $c;
                                                            $cuenta++;
                                                            }
                                                            ?>

                                                            <?php if ($p == $cant) {} else { ?>

                                                        <li class="page-item">
                                                            <a class="page-link btn btn-outline-primary" href="<?php echo $pagina ?>?i=<?php echo $i + $c ?>&amp;p=<?php echo $p + 1 ?>" aria-label="Next">

                                                              <i class="fas fa-angle-right"></i></a>
                                                        </li>

                                                      <?php }?>
                                      </ul>
                                  </nav>




                                </div>


                  </div>


        </div>

</div>



<?php include 'abajo_full.php'?>
