forked from qwerty/tupali
cache para mapero
This commit is contained in:
parent
e25e18eb5e
commit
e13e076e69
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,4 +1,5 @@
|
||||
upload/
|
||||
upload/
|
||||
milfs/includes/datos.php
|
||||
.gitmodules
|
||||
librerias/calendar/demos/
|
||||
cache/
|
||||
|
5350
cache/geojson_1038.json
vendored
5350
cache/geojson_1038.json
vendored
File diff suppressed because it is too large
Load Diff
41444
cache/geojson_1045.json
vendored
41444
cache/geojson_1045.json
vendored
File diff suppressed because it is too large
Load Diff
10168
cache/geojson_74.json
vendored
10168
cache/geojson_74.json
vendored
File diff suppressed because it is too large
Load Diff
0
cache/index.php
vendored
0
cache/index.php
vendored
33
mapero.php
33
mapero.php
@ -262,7 +262,7 @@ print $css_adicional;
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="map" title='<?php echo $mapa_aviso; ?>'><div class='text-center'><br><br><br><br><img src='images/load.gif'></div></div>
|
||||
<div id="map" title='<?php echo $mapa_aviso; ?>'><div class='text-center'><br><br><br><br><img src='images/load.gif'></div></div>
|
||||
<script src="librerias/leaflet/leaflet.js" crossorigin=""></script>
|
||||
<script src="librerias/leaflet/leaflet-providers.js"></script>
|
||||
<script src="librerias/leaflet/js/leaflet-sidebar.js"></script>
|
||||
@ -273,10 +273,33 @@ print $css_adicional;
|
||||
<script src="./librerias/bootstrap/js/bootstrap.min.js" ></script>
|
||||
|
||||
<!-- <script src="librerias/jquery/jquery-2.1.4.min.js"></script> -->
|
||||
<?php $cadena_busqueda = $_REQUEST['buscar'];
|
||||
if(isset($_REQUEST['buscar'])){
|
||||
<?php
|
||||
$cadena_busqueda = urlencode($_REQUEST['buscar']);
|
||||
|
||||
/*
|
||||
if (!copy($geojson_original, $nuevo_fichero)) {
|
||||
echo "Error al copiar $geojson_original ...\n";
|
||||
}
|
||||
*/
|
||||
//if(isset($_REQUEST['buscar'])){
|
||||
$nombre_geojson = "cache/".md5($_SERVER[QUERY_STRING]).".json";
|
||||
$cachetime = 1;
|
||||
|
||||
if (is_readable($nombre_geojson) && time() - $cachetime < filemtime($nombre_geojson) ) {
|
||||
$geojson= "$nombre_geojson";
|
||||
}else{
|
||||
include("milfs/includes/datos.php");
|
||||
ob_start();
|
||||
include ("$site"."milfs/geojson.js.php?id=$_REQUEST[id]&buscar=$cadena_busqueda&item=$_REQUEST[item]");
|
||||
$cache = ob_get_contents();
|
||||
ob_end_clean();
|
||||
$nuevo_fichero = "cache/".md5($_SERVER[QUERY_STRING]).".json";
|
||||
$fp = fopen("$nuevo_fichero", 'w');
|
||||
fwrite($fp, "$cache");
|
||||
fclose($fp);
|
||||
$geojson = "milfs/geojson.js.php?id=$_REQUEST[id]&buscar=$cadena_busqueda&item=$_REQUEST[item]";
|
||||
}else{
|
||||
}
|
||||
/* }else{
|
||||
$nombre_geojson = "cache/geojson_$_REQUEST[id].json";
|
||||
if (is_readable($nombre_geojson)) {
|
||||
$geojson= "$nombre_geojson";
|
||||
@ -285,7 +308,7 @@ print $css_adicional;
|
||||
}
|
||||
//$geojson ="geojsoncaen.js.php";
|
||||
}
|
||||
|
||||
*/
|
||||
?>
|
||||
|
||||
<script type="text/javascript" src="<?php echo $geojson; ?>"></script>
|
||||
|
Loading…
Reference in New Issue
Block a user