1
0
Fork 0

implementacion de carga dinamica de imagenes con lazy loading

This commit is contained in:
humano 2017-10-30 11:26:26 -05:00
parent 4ffa9517ff
commit eac6eddd0d
1 changed files with 4 additions and 3 deletions

View File

@ -11065,7 +11065,7 @@ if (mysqli_num_rows($sql)!='0'){
$td .= "<td class='planilla_$row[id_campo]' >$imagen</td>";
}else {$imagen='';}
if(!isset($_REQUEST['print'])) { $src ="data-src";}else{ $src =" print src"; }
while( $row = mysqli_fetch_array( $sql ) ) {
$campo_tipo = remplacetas('form_campos','id',$row[id_campo],'campo_tipo');
@ -11107,7 +11107,7 @@ $td .= "<td class='planilla_$row[id_campo]' >$imagen</td>";
}else {
$size="150" ;
}
if($contenido !=""){$contenido = "<img class=' lazy img img-responsive' data-src='$_SESSION[site]milfs/images/secure/?file=$size/$contenido' style='max-height: $size"."px !important;' src=''>"; }
if($contenido !=""){$contenido = "<img class=' lazy img img-responsive' $src='$_SESSION[site]milfs/images/secure/?file=$size/$contenido' style='max-height: $size"."px !important;' >"; }
else{$contenido="";}
}
elseif($campo_tipo=='14'){
@ -11119,8 +11119,9 @@ $td .= "<td class='planilla_$row[id_campo]' >$imagen</td>";
//@require("includes/datos.php");
$url_pin =urlencode("$_SESSION[site]milfs/images/iconos/pin.png");
//http://staticmap.openstreetmap.de/staticmap.php?center=40.714728,-73.998672&zoom=14&size=865x512&maptype=mapnik
$contenido = "
<img class='lazy img-round' data-src='http://staticmap.openstreetmap.de/staticmap.php?center=$lon,$lat&zoom=$zoom&size=250x100&maptype=mapnik&markers=$lon,$lat,red-pushpin' >
<img class='lazy img-round img img-responsive' $src ='http://staticmap.openstreetmap.de/staticmap.php?center=$lon,$lat&zoom=$zoom&size=250x100&maptype=mapnik&markers=$lon,$lat,red-pushpin' >
";
} else { $contenido ='';}