Fork de milfs para hacer limpieza de algunas cosas
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

160 lines
5.9KB

  1. <?php
  2. session_start();
  3. //ini_set('display_errors', 'On');
  4. require ('xajax/xajax.inc.php');
  5. $xajax = new xajax();
  6. require ('funciones/funciones.php');
  7. require ('funciones/convert.php');
  8. require ("funciones/conex.php");
  9. require ("includes/markdown.php");
  10. $xajax->processRequests();
  11. if($_REQUEST[id2] =='') {$agregar= $_REQUEST[id];}else {$agregar = $_REQUEST[id2];}
  12. $formulario_nombre = remplacetas('form_id','id',$_REQUEST[id],'nombre') ;
  13. $agregar_nombre = remplacetas('form_id','id',$agregar,'nombre') ;
  14. ?>
  15. <!DOCTYPE html>
  16. <html>
  17. <head>
  18. <meta charset=utf-8 />
  19. <title><?php echo $formulario_nombre[0] ?> MILFS</title>
  20. <meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
  21. <script src='https://api.tiles.mapbox.com/mapbox.js/v2.1.2/mapbox.js'></script>
  22. <link href='https://api.tiles.mapbox.com/mapbox.js/v2.1.2/mapbox.css' rel='stylesheet' />
  23. <style>
  24. body { margin:0; padding:0; }
  25. #map { position:absolute; top:0; bottom:0; width:100%; }
  26. </style>
  27. </head>
  28. <!DOCTYPE html>
  29. <html lang="en">
  30. <head >
  31. <title><?php echo $formulario_nombre[0] ?> MILFS</title>
  32. <meta charset="utf-8">
  33. <meta name="viewport" content="user-scalable=no, width=device-width, maximum-scale=1, initial-scale=1">
  34. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  35. <meta name="viewport" content="width=device-width, initial-scale=1">
  36. <meta name="description" content="">
  37. <meta name="author" content="fredyrivera" >
  38. <?php $xajax->printJavascript("xajax/"); ?>
  39. <link rel="shortcut icon" href="favicon-152.png">
  40. <link rel="apple-touch-icon-precomposed" href="favicon-152.png">
  41. <link href="css/font-awesome/css/font-awesome.css" rel="stylesheet">
  42. <link href="http://getbootstrap.com/examples/sticky-footer-navbar/sticky-footer-navbar.css" rel="stylesheet">
  43. <script src='https://api.tiles.mapbox.com/mapbox.js/v2.1.2/mapbox.js'></script>
  44. <link href='https://api.tiles.mapbox.com/mapbox.js/v2.1.2/mapbox.css' rel='stylesheet' />
  45. <!-- <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css" /> -->
  46. <link href="css/bootstrap.min.css" rel="stylesheet">
  47. <link href="css/estilos.php?hghgS" rel="stylesheet">
  48. <style type="text/css">
  49. body { padding: 0; margin: 0; }
  50. .leaflet-popup-content { width:600px !important; }
  51. body { margin:0; padding:0; }
  52. #map { position:absolute; top:0; bottom:0; width:100%; }
  53. </style>
  54. <script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
  55. <!-- <link rel="points" type="application/json" href="json.lab.php?id=<?php echo $_REQUEST["id"] ?>"> -->
  56. </head>
  57. <body >
  58. <audio id="foobar" src="images/audios/audio6.mp3" preload="auto" autoplay loop controls></audio>
  59. <style>
  60. .info {
  61. width: 800px;
  62. height: 90%;
  63. overflow-y: auto;
  64. overflow-x: hidden;
  65. position:absolute;
  66. top:100px;
  67. left:50px;
  68. }
  69. .info div {
  70. border-radius:3px;
  71. }
  72. </style>
  73. <div id='map'></div>
  74. <div id='info' class='info' draggable="true"></div>
  75. <script>
  76. L.mapbox.accessToken = 'pk.eyJ1IjoiaHVtYW5vIiwiYSI6IlgyRTFNdFEifQ.OmQBXmcVg_zq-vMpr8P5vQ';
  77. var map = L.mapbox.map('map', 'humano.jki5hno0')
  78. .setView([40, -74.50], 15);
  79. // As with any other AJAX request, this technique is subject to the Same Origin Policy:
  80. // http://en.wikipedia.org/wiki/Same_origin_policy
  81. var featureLayer = L.mapbox.featureLayer()
  82. //.loadURL('json.lab.php?id=<?php echo $id ?>')
  83. .loadURL('json.lab.php?id=<?php echo $_REQUEST[id] ?>&id2=<?php echo $_REQUEST[id2] ?>')
  84. // Once this layer loads, we set a timer to load it again in a few seconds.
  85. .on('ready', run)
  86. .addTo(map);
  87. // Add custom popups to each using our custom feature properties
  88. featureLayer.on('layeradd', function(e) {
  89. var marker = e.layer,
  90. feature = marker.feature;
  91. // Create custom popup content
  92. var popupContent = '' + feature.properties.name + '' +
  93. feature.properties.title +'';
  94. var aviso = feature.properties.name;
  95. info.innerHTML = aviso;
  96. // http://leafletjs.com/reference.html#popup
  97. marker.bindPopup(popupContent,{
  98. closeButton: false,
  99. minWidth: 320
  100. });
  101. marker.setIcon(L.icon(feature.properties.icon));
  102. });
  103. function run() {
  104. featureLayer.eachLayer(function(l) {
  105. map.panTo(l.getLatLng());
  106. });
  107. window.setTimeout(function() {
  108. //featureLayer.loadURL('json.lab.php?id=<?php echo $_REQUEST[id] ?>');
  109. featureLayer.loadURL('json.lab.php?id=<?php echo $_REQUEST[id] ?>&id2=<?php echo $_REQUEST[id2] ?>');
  110. //featureLayer.loadURL('https://wanderdrone.appspot.com/');
  111. //alert("Hola");
  112. info.innerHTML = aviso;
  113. },15000);
  114. }
  115. </script>
  116. <div class="panel-map" id='panel_map_<?php echo $_REQUEST[id] ?>' style="z-index: 2 !important;">
  117. <div role='row' class='row center-block' style="; "><?php echo mapa_ficha("$_REQUEST[id]");?></div>
  118. <a class="btn btn-primary btn-block" href="#" onclick="xajax_formulario_modal('<?php echo $agregar ?>'); ">Agregar<br> <?php echo $agregar_nombre[0]; ?></a>
  119. <a onClick="window.location.reload()">*</a>
  120. </div>
  121. <!-- Modal -->
  122. <div class='modal fade ' id='muestraInfo' tabindex='-1' role='dialog' aria-labelledby='myModalLabel' aria-hidden='true'>
  123. <div class='modal-dialog' >
  124. <div class='modal-content'>
  125. <div class='modal-header' >
  126. <button type='button' class='close' data-dismiss='modal' aria-hidden='true'>&times;</button>
  127. <h4 class='modal-title' id='myModalLabel_info'><div id='titulo_modal'></div></h4>
  128. </div>
  129. <div class='modal-body'>
  130. <div id='muestra_form'></div>
  131. </div>
  132. <div class='modal-footer' id='pie_modal'>
  133. </div>
  134. </div>
  135. </div>
  136. </div>
  137. <!-- Bootstrap core JavaScript
  138. ================================================== -->
  139. <!-- Placed at the end of the document so the pages load faster -->
  140. <script src="js/jquery.min.js"></script>
  141. <script src="js/bootstrap.min.js"></script>
  142. <script src="js/scripts.js"></script>
  143. </body>
  144. </html>