From 0bcdcf4ed6826c30e6eb97178b7281029ae1eea8 Mon Sep 17 00:00:00 2001 From: humano Date: Wed, 25 Mar 2020 14:34:16 -0500 Subject: [PATCH] modo grid para landing page --- funciones/funciones.php | 145 +++++++++++++++++----------------------- 1 file changed, 61 insertions(+), 84 deletions(-) diff --git a/funciones/funciones.php b/funciones/funciones.php index 82f9867..35cc1a6 100644 --- a/funciones/funciones.php +++ b/funciones/funciones.php @@ -6257,8 +6257,8 @@ if (mysqli_num_rows($sql)!='0'){ $href_2= "#cabecera#"; } - $link .= "
  • -
  • "; + $link .= "
  • +
  • "; } for ($x=$page; $x<=$pages;$x++) @@ -6274,9 +6274,9 @@ if (mysqli_num_rows($sql)!='0'){ $href_3= "#cabecera#"; } if ($page == $x){ - $link .= "
  • $x
  • "; + $link .= "
  • $x
  • "; }else{ - $link .= "
  • $x
  • "; + $link .= "
  • $x
  • "; } } $counter++; @@ -6292,8 +6292,8 @@ if (mysqli_num_rows($sql)!='0'){ $href_4= "$href_4"; $href_5= "$href_5"; } - $link .= "
  • -
  • "; } + $link .= "
  • +
  • "; } } $paginacion = ""; $encabezado = " @@ -7133,7 +7133,7 @@ $cols = (12/$divider); } $i++; //aquí escribimos el codigo que queremos repetir por la cantidad de elementos dentro del bloque, en este caso 4 - $echo .= "
    form_id $row[form_id]
    "; + $echo .= "
    $row[form_id]
    "; if($i%$divider==0){ //aquí escribimos el cierre de el bloque @@ -7157,6 +7157,11 @@ mysqli_data_seek($sql, 0); $contenido = ""; if(!isset($mapbox_token)) { include("milfs/includes/datos.php"); if(!isset($mapbox_token)) {$error_token = 1; } else {$error_token = "";}} while( $row = mysqli_fetch_array( $sql ) ) { + if($i%$divider==0){ + //aquí escribimos el principio de el bloque + $echo .="
    "; + } + //$link = " Consultar "; $imagen = buscar_imagen($row['id'],'','',''); $geo = buscar_campo_tipo($row['id'],"14"); @@ -7182,107 +7187,79 @@ mysqli_data_seek($sql, 0); else{ $favorita="b$row[id]?registros=10";} if($ultimo_mapa[0] !="") { - $campos = explode(" ",$ultimo_mapa[0]); + $campos = explode(" ",$ultimo_mapa[0]); $lat = $campos['0']; @$lon = $campos['1']; @$zoom = $campos['2']; - if($error_token != 1) { - $url_pin =urlencode("$_SESSION[site]milfs/images/iconos/pin.png"); - $miniatura = " + if($error_token != 1) { + $url_pin =urlencode("$_SESSION[site]milfs/images/iconos/pin.png"); + $miniatura = " - $row[nombre] -
    "; - /* $miniatura = " + $row[nombre] +
    "; + /* $miniatura = " - - ";*/ + + ";*/ - }else{ $miniatura ="
    No se ha definido un token de mapbox
    ";} + }else{ $miniatura ="
    No se ha definido un token de mapbox
    ";} } - //if($geo[0] !='') { $mapa= "$miniatura Ver mapa";}else {$mapa='';} - if($geo[0] !='') { $mapa= " Mapa";}else {$mapa='';} - $descripcion_limpia = strip_tags($row['descripcion']); - if($imagen !="") { - $imagen =" + //if($geo[0] !='') { $mapa= "$miniatura Ver mapa";}else {$mapa='';} + if($geo[0] !='') { $mapa= " Mapa"; + }else {$mapa='';} -
    - - $row[nombre] - - -
    - "; -} + $descripcion_limpia = strip_tags($row['descripcion']); + if($imagen !="") { + $imagen =" + +
    + + $row[nombre] + + +
    + "; + } $contenido ="

    $row[nombre]

    - -

    $descripcion_limpia

    "; // if ( $fila%2==0){ -if($llenar[0] !="0") {$boton_agregar ="
    Agregar
    ";} - else{$boton_agregar = "";} -if($ver_data[0] !="0") {$boton_ver_data =" OpenData";} - else{$boton_ver_data = "";} + if($llenar[0] !="0") {$boton_agregar ="
    Agregar
    ";} + else{$boton_agregar = "";} + if($ver_data[0] !="0") {$boton_ver_data =" OpenData";} + else{$boton_ver_data = "";} if($mostrar[0] !="0") { //// PRIVACIDAD $publico = remplacetas('form_id','id',"$row[id]",'publico',"") ; /// PRIVACIDAD -if($publico[0] =='1') { - $linea .= " - -
    -
    - -
    -
    - $imagen -
    -
    -

    $contenido

    -
    - $boton_agregar $mapa $boton_ver_data -
    -
    -
    -
    -
    - - "; - }else{ - if($llenar[0] !="0"){ - $linea .=" -
    -
    - -
    -
    - $imagen -
    -
    -

    - $row[nombre]

    -

    $row[descripcion]

    - $boton_agregar -
    -
    - -
    -
    - ";} - - } - }else { - - $linea .=" ";} + if($publico[0] =='1') + { $contenido=$contenido;} + else{ $contenido="";} + } + else { + $contenido =""; + } $fila++; + if($contenido ==""){ +$echo .= ""; + + }else{ +$echo .= "
    $contenido
    "; +$i++; +} + if($i%$divider==0){ +//aquí escribimos el cierre de el bloque + $echo .= " +
    "; + } } } $linea =" @@ -7291,7 +7268,7 @@ if($publico[0] =='1') { $linea "; -return "$echo $linea"; +return "$echo"; } function buscar_imagen($form,$control,$tipo,$empresa) {