Compare commits
154 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
6b92090fc0 | ||
|
4ec768931a | ||
|
87e4c4a0b4 | ||
|
5d1ae839a8 | ||
|
8561f28a32 | ||
|
acc8d873d3 | ||
|
67cf402bd9 | ||
|
7020a67d66 | ||
|
9f37954e5a | ||
|
d7c4ebb612 | ||
|
8b12f2d146 | ||
|
6c4de5619b | ||
|
4715d6d8d8 | ||
|
16849503a4 | ||
|
4a0f7d8ff4 | ||
|
06cc7f8271 | ||
|
c44222c3cf | ||
|
1c32752658 | ||
|
d3bc62fce2 | ||
|
3f489b76b8 | ||
|
13e4bbffa6 | ||
|
d6f9bcc0cb | ||
|
b31ac5df77 | ||
|
492051659e | ||
|
474d969d88 | ||
|
3fdf4b9961 | ||
|
ed33f53395 | ||
|
b8521821d0 | ||
|
3bcf149ea8 | ||
|
4870cebf32 | ||
|
9bd6d3a06c | ||
|
8a13fc6683 | ||
|
6f0e8ad241 | ||
|
17470eb41a | ||
|
1721573c8e | ||
|
ec12802c47 | ||
|
ff30e13ea5 | ||
|
2b8ff8965f | ||
|
6a30db9fc4 | ||
|
a387cea202 | ||
|
553f3a5167 | ||
|
597a5ce6a1 | ||
|
01df026a5b | ||
|
856e5cf038 | ||
|
589a5f3922 | ||
6d032d4495 | |||
3ba85d859b | |||
9f813436bc | |||
|
307bc9bc88 | ||
|
ec812e6f85 | ||
|
dffdf68607 | ||
|
4cfa6f9d6c | ||
|
01994f9f7a | ||
|
151092b32e | ||
|
97ac05a025 | ||
|
1985c80114 | ||
|
1113c67e1e | ||
|
37c952c892 | ||
|
7ca8891398 | ||
|
febc03b683 | ||
|
5034fb2af5 | ||
|
59c81ac5b1 | ||
|
710efa5be8 | ||
|
1af3a673e5 | ||
|
4d0ed8511e | ||
|
9ec3b5609b | ||
|
2a1a1d1428 | ||
|
2701b0efd4 | ||
|
dee4031570 | ||
|
53b34a046c | ||
|
86b476631e | ||
|
b2896adc7b | ||
|
3b1b2b47f5 | ||
|
8ad5eac234 | ||
|
c9c1a014d5 | ||
|
d2a4ae1ece | ||
|
c5d8f1db94 | ||
|
f6c26756eb | ||
|
c06a297972 | ||
|
4298759904 | ||
|
aae4b6c4df | ||
|
7b74d8fab3 | ||
|
39ec69ab58 | ||
|
ed595d22a1 | ||
|
5d75d1895b | ||
|
40f9839827 | ||
|
cd8c546e0a | ||
|
6d3cc120e0 | ||
|
52e2d10819 | ||
|
5feba8ef5b | ||
|
def22a720b | ||
|
53a8d6e007 | ||
|
8324bff480 | ||
|
804d25ddfa | ||
|
6f94c6395a | ||
|
0f5d0e20d8 | ||
|
219798d120 | ||
|
28d6b52707 | ||
|
db85b417a2 | ||
|
bc69500c72 | ||
|
e2744553a7 | ||
|
80aade376a | ||
|
92d5277364 | ||
|
0bcdcf4ed6 | ||
|
85c518bedb | ||
|
ab4676c2b6 | ||
|
80f29c7379 | ||
|
0dec640d08 | ||
|
cb830a0f7c | ||
|
6c47a5da23 | ||
|
4cad68cc3a | ||
|
f64dc5a581 | ||
|
5011071c50 | ||
|
a6389941f2 | ||
|
57b15be226 | ||
|
8508543081 | ||
|
0ba0fdbdb6 | ||
|
5c26be6718 | ||
|
7015b4c2d2 | ||
|
ceeeb607a1 | ||
|
275cd29b74 | ||
|
73beb9f1b7 | ||
|
7fa0c78fd5 | ||
|
abea5a66d8 | ||
|
5c70d84462 | ||
|
899df0a163 | ||
|
5200902fd4 | ||
|
adc9b0532b | ||
|
ea815bc505 | ||
|
d38325ee0f | ||
567d1b97d0 | |||
c53846d6a8 | |||
|
9a89a921e0 | ||
|
debb238d17 | ||
|
0c150c3290 | ||
|
f3d3383314 | ||
|
e486accc9f | ||
|
614e8a4f8d | ||
|
1bec42fcbf | ||
|
789b821736 | ||
|
2088f66f79 | ||
|
bc1767fb5d | ||
|
f730968a61 | ||
|
56bf92c0e2 | ||
|
aa278ae528 | ||
|
d040cadd0b | ||
|
9537703477 | ||
|
6a5e5f637a | ||
|
f48249b0c7 | ||
|
3bd375dd34 | ||
|
13b1e79abc | ||
|
5c5614e174 | ||
|
ba8ca69c03 | ||
|
16024b2d20 |
6
api.php
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
session_start();
|
||||
ini_set('display_errors', 'On');
|
||||
//session_start();
|
||||
//ini_set('display_errors', 'On');
|
||||
|
||||
require ('xajax/xajax.inc.php');
|
||||
$xajax = new xajax();
|
||||
@ -44,6 +44,8 @@ if(isset($_REQUEST['formato'])){
|
||||
}else{
|
||||
header('Content-Type: application/json');
|
||||
//echo "hola /// $_REQUEST[id] // " ;
|
||||
|
||||
//echo " <pre>".print_r($datos)."</pre>";
|
||||
echo json($datos);
|
||||
}
|
||||
?>
|
||||
|
83
css/mapero.css
Normal file
@ -0,0 +1,83 @@
|
||||
body { margin:0; padding:0; overflow:hidden; touch-action:none; }
|
||||
#map { position:absolute; top:0; bottom:0; width:100%; overflow:hidden; }
|
||||
p {font-size: 14px;}
|
||||
|
||||
#sidebar {
|
||||
z-index: 10; position: absolute; right: 10px; top: 10px; width: 320px;
|
||||
background-color:rgba(255,255,255,.9); padding: 20px; border-radius: 3px; }
|
||||
#title h1 { color: #390; }
|
||||
#introduction p { margin-bottom: 10px; line-height: 1.5em }
|
||||
|
||||
#taxas>div { display: inline-block; }
|
||||
#taxas p { text-align: center; }
|
||||
.button {
|
||||
background-color: #fff; background-size:cover;
|
||||
border-radius: 5px; border: #390 1px solid; height:48px; width: 48px;
|
||||
margin: 4px; margin-left: 8px;
|
||||
}
|
||||
.button.active { border:color:#390; }
|
||||
.button:hover { border-color: #390; }
|
||||
|
||||
.button#Plantae { background-image: url('img/icon0_plantae.png') }
|
||||
.button#Aves { background-image: url('img/icon0_aves.png') }
|
||||
.button#Insecta { background-image: url('img/icon0_insecta.png') }
|
||||
.button#Fungi { background-image: url('img/icon0_fungi.png') }
|
||||
|
||||
.button#Plantae.active { background-image: url('img/icon1_plantae.png') }
|
||||
.button#Aves.active { background-image: url('img/icon1_aves.png') }
|
||||
.button#Insecta.active { background-image: url('img/icon1_insecta.png') }
|
||||
.button#Fungi.active { background-image: url('img/icon1_fungi.png') }
|
||||
|
||||
.button#Plantae:hover { background-image: url('img/icon1_plantae.png') }
|
||||
.button#Aves:hover { background-image: url('img/icon1_aves.png') }
|
||||
.button#Insecta:hover { background-image: url('img/icon1_insecta.png') }
|
||||
.button#Fungi:hover { background-image: url('img/icon1_fungi.png') }
|
||||
|
||||
.marker {
|
||||
border: #fff 1.4px solid; border-radius: 50%; cursor: pointer; box-shadow: 1px 1px 1px;
|
||||
height: 48px; width: 48px; margin: -24px 0 0 -24px;
|
||||
background-size: cover; }
|
||||
.marker:hover { z-index: 1; border-color: #390; }
|
||||
.marker.sm {
|
||||
background-color: none; border-width: 0; box-shadow: 0 0 0;
|
||||
height: 32px; width: 32px; margin-left: -16px; margin-top:-16px;}
|
||||
.marker.sm:hover { border: #fff 1px solid; }
|
||||
|
||||
#me { height: 16px; width: 16px; background-size: 100% 100%; }
|
||||
|
||||
.mapboxgl-ctrl-geocoder { z-index: 0; }
|
||||
|
||||
.mapboxgl-popup { width: 280px; }
|
||||
.mapboxgl-popup-close-button { background-color: rgba(255,255,255,.9); height: 30px; width: 30px; font-size: 18px; padding:2px; border-radius: 1px;}
|
||||
.mapboxgl-popup p { font-size: 12px; line-height: 16px; margin-top:6px;}
|
||||
.img-md { height: 260px; width:260px; background-position: center center; background-repeat: no-repeat; background-size: cover; }
|
||||
|
||||
.loading { display:none; }
|
||||
|
||||
@media only screen and (max-width: 479px) {
|
||||
|
||||
.mobile-hide{ display: none; }
|
||||
.mobile-show{ display: inline-block !important; }
|
||||
|
||||
#sidebar {
|
||||
z-index: 2; border-radius: 0; padding:2vh 4vw 2vh 4vw;
|
||||
position: absolute; width:100%; height:150px;
|
||||
bottom: 30px; left:0; right:0; top:inherit;
|
||||
}
|
||||
#sidebar p { margin-bottom: 2vh; font-size: 1em; }
|
||||
|
||||
#title { margin-bottom: 2vh; }
|
||||
#title h1 { font-size: 20px; line-height: 26px; display: inline-block; }
|
||||
#info {
|
||||
height:18px; width:18px; display: inline-block; margin-left:3px;
|
||||
background-image: url('img/arrow_down.svg'); background-size:cover; }
|
||||
|
||||
.button { width:15vw; margin: .5vh 1vw .5vh 10vw; height:15vw;}
|
||||
.button:first-of-type { margin-left:5vw; }
|
||||
.button img { height:100%; width: 100%; }
|
||||
#taxas p { text-align: center; margin-left: 5vw; }
|
||||
|
||||
.mapboxgl-popup-content { padding: 1vw; padding-bottom: 2vw; }
|
||||
.mapboxgl-popup { width: 52vw; }
|
||||
.img-md { height: 50vw; width: 50vw;}
|
||||
}
|
@ -4,7 +4,7 @@ el otro archivo css style.css que está en la carpeta milfs
|
||||
|
||||
|
||||
#barra_milfs{
|
||||
#position: absolute;
|
||||
position: absolute;
|
||||
}
|
||||
#contenedor_principal{
|
||||
padding-top: 10em;
|
||||
@ -14,10 +14,35 @@ el otro archivo css style.css que está en la carpeta milfs
|
||||
display: block;
|
||||
}
|
||||
|
||||
#canvas-holder_$tipo_$id_campo{
|
||||
max-width:100%;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
#panel_administrador{
|
||||
padding: 0px !important;
|
||||
}
|
||||
|
||||
}
|
||||
@media (max-width: 480px) {
|
||||
#modificarcampo_succesalert{
|
||||
position: relative;
|
||||
display: block;
|
||||
border-collapse: separate;
|
||||
padding-top: 13px;
|
||||
}
|
||||
|
||||
#modificarcampo_succesalert>.input-group-addon{
|
||||
border: 1px solid #ccc !important;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
#nuevocampo_success{
|
||||
padding-bottom: 60px !important;
|
||||
}
|
||||
#nuevocampo_success>.btn{
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -261,10 +261,7 @@ border-color: transparent;
|
||||
/*Panel Editor*/
|
||||
|
||||
.thumbnail {
|
||||
height: 100% !important;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
border: none;
|
||||
|
||||
}
|
||||
|
||||
.box-secciones {
|
||||
|
@ -1,5 +1,10 @@
|
||||
<?php
|
||||
function Conectarse(){
|
||||
|
||||
if(!isset($_SESSION))
|
||||
{
|
||||
session_start();
|
||||
}
|
||||
if ( !isset ( $link ) ) {
|
||||
|
||||
@include("includes/datos.php");
|
||||
@ -16,7 +21,7 @@ function Conectarse(){
|
||||
|
||||
if (!($link=mysqli_connect($servidor,$usuario,$password,$db)))
|
||||
{
|
||||
echo " Error conectando a la base de datos. ($db) ";
|
||||
echo " Error conectando a la base de datos. ($servidor) ";
|
||||
exit();
|
||||
}
|
||||
/* if (!mysqli_select_db($db,$link))
|
||||
@ -52,7 +57,7 @@ function Conectarse_recursivo(){
|
||||
|
||||
if (!($link=mysqli_connect($servidor,$usuario,$password,$db)))
|
||||
{
|
||||
echo "Error conectando a la base de datos. $servidor,$usuario,$password,$db ";
|
||||
echo "Error conectando a la base de datos. ";
|
||||
exit();
|
||||
}
|
||||
/* if (!mysqli_select_db($db,$link))
|
||||
|
@ -11,7 +11,7 @@ function login_boton($formulario){
|
||||
|
||||
if(isset($_SESSION['id'])){
|
||||
|
||||
$accion = "<li class='nav-item'><a class=' nav-link btn ' onclick=\"xajax_login_boton('x') \"><i class='glyphicon glyphicon-log-out fa-fw'></i>$_SESSION[username]</a></li>";
|
||||
$accion = "<li><a class=' btn ' onclick=\"xajax_login_boton('x') \"><i class='glyphicon glyphicon-log-out fa-fw'></i>$_SESSION[username]</a></li>";
|
||||
}else{
|
||||
$accion = registro_express("nuevo_$nombre_formato","boton");
|
||||
print $accion;
|
||||
|
@ -9,7 +9,7 @@ require ("funciones/conex.php");
|
||||
|
||||
|
||||
|
||||
$geojson = imprime_geojson("$_REQUEST[id]","","mapa","$_REQUEST[buscar]");
|
||||
$geojson = imprime_geojson("$_REQUEST[id]","","mapa","$_REQUEST[buscar]","");
|
||||
//header('Content-Type: application/json');
|
||||
var geojsonSample =
|
||||
echo $geojson;
|
||||
|
@ -8,11 +8,13 @@ include ('librerias/parsedown/Parsedown.php');
|
||||
|
||||
require ("funciones/conex.php");
|
||||
|
||||
|
||||
|
||||
$geojson = imprime_geojson("$_REQUEST[id]","","mapa","$_REQUEST[buscar]","$_REQUEST[item]");
|
||||
if(isset($_REQUEST['buscar'])){$buscar=$_REQUEST['buscar'];}else{$buscar="";}
|
||||
if(isset($_REQUEST['item'])){$item=$_REQUEST['item'];}else{$item="";}
|
||||
if(isset($_REQUEST['id'])){$id=$_REQUEST['id'];}else{$id="";}
|
||||
//echo print_r($_SERVER);
|
||||
$geojson = imprime_geojson("$id","","mapa","$buscar","$item","");
|
||||
//header('Content-Type: application/json');
|
||||
echo "var geojsonSample = ";
|
||||
echo "let geojsonSample = [";
|
||||
echo $geojson;
|
||||
echo ";"
|
||||
echo "];"
|
||||
?>
|
||||
|
@ -4,14 +4,18 @@ require ('xajax/xajax.inc.php');
|
||||
$xajax = new xajax();
|
||||
require ('funciones/funciones.php');
|
||||
require ('funciones/convert.php');
|
||||
include ('librerias/parsedown/Parsedown.php');
|
||||
|
||||
require ("funciones/conex.php");
|
||||
if(isset($_REQUEST['buscar'])){$buscar=$_REQUEST['buscar'];}else{$buscar="";}
|
||||
if(isset($_REQUEST['item'])){$item=$_REQUEST['item'];}else{$item="";}
|
||||
if(isset($_REQUEST['id'])){$id=$_REQUEST['id'];}else{$id="";}
|
||||
|
||||
if(!isset($_REQUEST['plantilla'])) {
|
||||
$geojson = imprime_geojson("$_REQUEST[id]","","mapa","$_REQUEST[buscar]");
|
||||
$geojson = imprime_geojson("$id","","mapa","$buscar","$item");
|
||||
|
||||
}else{
|
||||
$geojson = imprime_geojson("$_REQUEST[id]","","$_REQUEST[plantilla]","$_REQUEST[buscar]");
|
||||
$geojson = imprime_geojson("$id","","$_REQUEST[plantilla]","$buscar","$item");
|
||||
}
|
||||
|
||||
|
||||
|
BIN
images/iconos/marker.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 907 B |
@ -21,8 +21,14 @@ if ((!$file=realpath($dir.$_GET['file']))
|
||||
$ref=@$_SERVER['HTTP_REFERER'];
|
||||
if (strpos($ref,'https://')===0 || strpos($ref,'https')!==0){
|
||||
$mime=array(
|
||||
'PEG'=>'image/jpeg',
|
||||
'JPEG'=>'image/jpeg',
|
||||
'JPG'=>'image/jpeg',
|
||||
'jpg'=>'image/jpeg',
|
||||
'peg'=>'image/jpeg',
|
||||
'jpeg'=>'image/jpeg',
|
||||
'png'=>'image/png',
|
||||
'PNG'=>'image/png',
|
||||
'mid'=>'audio/x-midi',
|
||||
'wav'=>'audio/x-wav'
|
||||
);
|
||||
@ -34,12 +40,13 @@ if (strpos($ref,'https://')===0 || strpos($ref,'https')!==0){
|
||||
}
|
||||
$stat=stat($file);
|
||||
header('Content-Type: '.$mime[substr($file,-3)]);
|
||||
header('Content-Length: '.$stat[7]);
|
||||
// header('Content-Length: '.$stat[7]);
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s',$stat[9]).' GMT');
|
||||
readfile($file);
|
||||
@readfile($file);
|
||||
|
||||
exit();
|
||||
}
|
||||
header('Pragma: no-cache');
|
||||
header('Cache-Control: no-cache, no-store, must-revalidate');
|
||||
include($file.'.php');
|
||||
//include($file.'.php');
|
||||
?>
|
||||
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 5.3 KiB |
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
$usuario="pmauser";
|
||||
$usuario="root";
|
||||
$password="toor";//
|
||||
$servidor="localhost";
|
||||
$db="galenux_cloud";
|
||||
$usuarios_sesion="GaleNUx_cloud";
|
||||
$path_instalacion ="/var/www/html/galenux_cloud/milfs/";
|
||||
$db="galenux_troconis";
|
||||
$usuarios_sesion="GaleNUx_htroconis";
|
||||
$path_instalacion ="/var/www/html/milfs/";
|
||||
$path_images_secure ="/home/images_secure";
|
||||
$url = "http://localhost/cloud_galenux/milfs/";
|
||||
$site = "http://localhost/cloud_galenux";
|
||||
$url = "http://localhost/milfs/";
|
||||
$site = "http://localhost/";
|
||||
/// ESCAPAR LAS COMILLAS CON (\)
|
||||
$codigo_analizador = " ";
|
||||
/// Depende de la variable http://php.net/upload-max-filesize o en el .htaccess
|
||||
|
@ -32,7 +32,9 @@ if (move_uploaded_file($_FILES["$campo"]['tmp_name'], $fichero_subido)) {
|
||||
}
|
||||
|
||||
function miniaturizar($file,$width,$directorio) {
//$archivo = $file;
|
||||
$archivo = "$directorio"."full/".$file;
$file_info = getimagesize($archivo);
$ratio = $file_info[0] / $file_info[1];
$newwidth = $width;
$newheight = round($newwidth / $ratio);
$ext = explode(".", $file);
$ext = strtolower($ext[count($ext) - 1]);
if ($ext == "jpeg") $ext = "jpg";
switch ($ext) {
case "jpg":
$img = imagecreatefromjpeg($archivo);
// $img = imagecreatefromstring($archivo);
break;
case "png":
$img = imagecreatefrompng($archivo);
break;
case "gif":
$img = imagecreatefromgif($archivo);
break;
}
$thumb = imagecreatetruecolor($newwidth, $newheight);
|
||||
$archivo = "$directorio"."full/".$file;
$file_info = getimagesize($archivo);
$ratio = $file_info[0] / $file_info[1];
$newwidth = $width;
$newheight = round($newwidth / $ratio);
$ext = explode(".", $file);
|
||||
$ext = strtolower($ext[count($ext) - 1]);
|
||||
if ($ext == "jpeg") $ext = "jpg";switch ($ext) {
case "jpg":
$img = imagecreatefromjpeg($archivo);
// $img = imagecreatefromstring($archivo);
break;
case "png":
$img = imagecreatefrompng($archivo);
break;
case "gif":
$img = imagecreatefromgif($archivo);
break;
}
$thumb = imagecreatetruecolor($newwidth, $newheight);
|
||||
imagealphablending( $thumb, false );
|
||||
imagesavealpha( $thumb, true );
imagecopyresampled($thumb, $img, 0, 0, 0, 0, $newwidth, $newheight, $file_info[0], $file_info[1]);
|
||||
if($ext=="jpg") {
imagejpeg($thumb,$directorio.$width."/$file", 80);
|
||||
@ -42,5 +44,3 @@ imagepng($thumb,$directorio.$width."/$file", 9);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
62
index.php
@ -42,21 +42,8 @@ if (isset($_REQUEST['t'])) {$t = $_REQUEST['t'];} else {$t = "";}
|
||||
<meta name="description" content="">
|
||||
|
||||
<?php
|
||||
|
||||
?>
|
||||
<link rel="shortcut icon" href="favicon-152.png">
|
||||
<link rel="apple-touch-icon-precomposed" href="favicon-152.png">
|
||||
<!-- <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha256-k2/8zcNbxVIh5mnQ52A0r3a6jAgMGxFJFE2707UxGCk= sha512-ZV9KawG2Legkwp3nAlxLIVFudTauWuBpC10uEafMHYL0Sarrz5A7G79kXh5+5+woxQ5HM559XX2UZjMJ36Wplg==" crossorigin="anonymous"> -->
|
||||
<?php if($form !='') {
|
||||
//echo "<link href='css/embebidoXXX.css' rel='stylesheet'>";
|
||||
}else{
|
||||
//echo "<link href='css/estilos.php?dd' rel='stylesheet'>";
|
||||
}
|
||||
|
||||
$xajax->printJavascript("xajax/");
|
||||
// $xajax->debugOn();
|
||||
//$xajax->statusMessagesOn();
|
||||
if(!isset($_REQUEST['experimental'])){
|
||||
$xajax->printJavascript("xajax/");
|
||||
if(!isset($_REQUEST['experimental'])){
|
||||
|
||||
$bootstrap= "
|
||||
|
||||
@ -80,9 +67,19 @@ if (isset($_REQUEST['t'])) {$t = $_REQUEST['t'];} else {$t = "";}
|
||||
";
|
||||
|
||||
}
|
||||
echo $bootstrap; ?>
|
||||
// $xajax->debugOn();
|
||||
//$xajax->statusMessagesOn();
|
||||
?>
|
||||
<link rel="shortcut icon" href="favicon-152.png">
|
||||
<link rel="apple-touch-icon-precomposed" href="favicon-152.png">
|
||||
<!-- <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha256-k2/8zcNbxVIh5mnQ52A0r3a6jAgMGxFJFE2707UxGCk= sha512-ZV9KawG2Legkwp3nAlxLIVFudTauWuBpC10uEafMHYL0Sarrz5A7G79kXh5+5+woxQ5HM559XX2UZjMJ36Wplg==" crossorigin="anonymous"> -->
|
||||
<?php if($form !='') {
|
||||
//echo "<link href='css/embebidoXXX.css' rel='stylesheet'>";
|
||||
}else{
|
||||
//echo "<link href='css/estilos.php?dd' rel='stylesheet'>";
|
||||
} ?>
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="css/milfs.css">
|
||||
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap.css">
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap-markdown.css">
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap-markdown.min.css">
|
||||
|
||||
@ -214,7 +211,7 @@ legend.legend-area {
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body onload="revisarSession()"; >
|
||||
<body >
|
||||
<?php if($embebido ==1) {
|
||||
if($form!=''){ echo formulario_embebido($form,$opciones);}
|
||||
elseif($identificador !='') { echo mostrar_identificador($identificador,$id);}
|
||||
@ -227,22 +224,26 @@ else{}
|
||||
<?php echo @$onload; ?>
|
||||
<?php
|
||||
if ( isset ( $_SESSION['id'] ) ) { ?>
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark " id="barra_milfs" role="navigation">
|
||||
<a class="navbar-brand" href="#"><img src="favicon-152.png" style="width:60px" alt="MILFS" title="Multi Interactive Light Form System"></a>
|
||||
|
||||
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbar-collapse">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
<div class="navbar navbar-inverse navbar-fixed-top " id="barra_milfs" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="sr-only">MILFS</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
|
||||
|
||||
|
||||
<a class="navbar-brand" href="#"><img src="favicon-152.png" style="width:60px" alt="MILFS" title="Multi Interactive Light Form System"></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<?php echo milfs() ?>
|
||||
|
||||
</nav>
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
|
||||
|
||||
<?php }else{ } ?>
|
||||
@ -255,13 +256,14 @@ else{}
|
||||
<div class='row'>
|
||||
<div id='' class='col-sm-6'>
|
||||
|
||||
<?php if(isset($_SESSION['id'])){ echo "
|
||||
<form id='manejo_sesion' name='form_session' class='navbar-form navbar-left'>
|
||||
<?php /* $sesion = "<pre>".print_r($_SESSION,true)."</pre>"; if(isset($_SESSION['id'])){ echo "
|
||||
$sesion <form id='manejo_sesion' name='form_session' class='navbar-form navbar-left'>
|
||||
<div class='input-group'>
|
||||
<input type='text' name='tiempo_session' size='18' class='form-control input-sm' readonly>
|
||||
<span class='input-group-addon'><a href='#' onclick=\"location.reload();\" title='Renovar'><span class='glyphicon glyphicon-refresh' aria-hidden='true'></span></a></span>
|
||||
</div>
|
||||
</form> "; } ?>
|
||||
</form> "; }else{ echo "/ $sesion /<input type='text' name='tiempo_session' size='18' class='form-control input-sm' readonly>";}
|
||||
*/ ?>
|
||||
|
||||
<?php
|
||||
///echo adjuntar_basico('33');
|
||||
|
214
js/mapero.js
Normal file
@ -0,0 +1,214 @@
|
||||
mapboxgl.accessToken = 'pk.eyJ1IjoieXVuamllIiwiYSI6ImNpZnd0ZjZkczNjNHd0Mm0xcGRoc21nY28ifQ.8lFXo9aC9PfoKQF9ywWW-g';
|
||||
//var sfmapbox = [-122.413692, 37.775712];
|
||||
var sfmapbox = [-72, 4];
|
||||
// sfmapbox = [-122,37];
|
||||
var mylocation = sfmapbox;
|
||||
var taxon_active = 'Plantae';
|
||||
var markers = {};
|
||||
var marker_me;
|
||||
|
||||
// Create a new dark theme map
|
||||
var map = new mapboxgl.Map({
|
||||
container: 'map', // container id
|
||||
style: 'mapbox://styles/mapbox/outdoors-v9', //stylesheet location
|
||||
center: sfmapbox, // Center of USA
|
||||
zoom: 12, // starting zoom
|
||||
// minZoom: 11,
|
||||
|
||||
});
|
||||
|
||||
map.on('load', function() {
|
||||
|
||||
// Disable scroll in posts
|
||||
if (window.location.search.indexOf('embed') !== -1) map.scrollZoom.disable();
|
||||
|
||||
//Add controls for navigation, geocoding and geolocation
|
||||
var geocoder = new mapboxgl.Geocoder();
|
||||
map.addControl(geocoder);
|
||||
map.addControl ( new mapboxgl.Navigation({ position: 'top-left' }) );
|
||||
var geolocator = new mapboxgl.Geolocate({ position: 'top-left' });
|
||||
map.addControl(geolocator);
|
||||
|
||||
//go to SF and retrieve data
|
||||
mapMe(mylocation);
|
||||
getObservation(mylocation, taxon_active);
|
||||
|
||||
//Toggle icons in the event of zoom change
|
||||
map.on('zoom', function() {
|
||||
var zoom = map.getZoom();
|
||||
$('.marker').each(function() {
|
||||
checkZoom(this, zoom);
|
||||
});
|
||||
});
|
||||
|
||||
//Interact with taxas buttons
|
||||
$('.button').on('click', function() {
|
||||
$('.button').removeClass('active');
|
||||
$(this).addClass('active');
|
||||
taxon_active = $(this).attr('id');
|
||||
getObservation(mylocation, taxon_active);
|
||||
$('.mapboxgl-popup') ? $('.mapboxgl-popup').remove() : null;
|
||||
});
|
||||
|
||||
//Redo quest on location change
|
||||
geocoder.on('result', function(e) {
|
||||
// window.alert('new location: ' + e.result.center);
|
||||
mylocation = e.result.center;
|
||||
getObservation(mylocation, taxon_active);
|
||||
mapMe(mylocation);
|
||||
$('.mapboxgl-popup') ? $('.mapboxgl-popup').remove() : null;
|
||||
});
|
||||
|
||||
//Redo quest on geolocation
|
||||
geolocator.on('geolocate', function(position) {
|
||||
mylocation = [position.coords.longitude, position.coords.latitude];
|
||||
map.zoomTo(12);
|
||||
mapMe(mylocation);
|
||||
getObservation(mylocation, taxon_active);
|
||||
});
|
||||
|
||||
//Mobile friendly
|
||||
$('#info').on('click', function() {
|
||||
if ( $('#introduction').is(':visible') ) {
|
||||
$('#introduction').hide();
|
||||
$('#info').css('background-image', 'url(img/arrow_down.svg)');
|
||||
$('#sidebar').css('height', '150px');
|
||||
} else {
|
||||
$('#introduction').show();
|
||||
$('#info').css("background-image", 'url(img/arrow_up.svg)');
|
||||
$('#sidebar').css('height', '240px');
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
// Map the user location using a marker called me
|
||||
function mapMe(location) {
|
||||
if (!document.getElementById('me')) {
|
||||
var me = document.createElement('div');
|
||||
me.id = "me";
|
||||
me.style.backgroundImage = 'url(img/icon_me.png)';
|
||||
marker_me = new mapboxgl.Marker(me)
|
||||
.setLngLat(location)
|
||||
.addTo(map);
|
||||
} else {
|
||||
marker_me.setLngLat(location);
|
||||
}
|
||||
|
||||
map.flyTo({ 'center': location, 'zoom': 12 });
|
||||
}
|
||||
|
||||
// Retrieve from API, map the markers to the map, and save relevant data in html. Pop-ups for marker on click.
|
||||
function getObservation(location, taxon) {
|
||||
|
||||
$('.loading').show();
|
||||
|
||||
// clean up previous markers
|
||||
for (marker in markers) {
|
||||
markers[marker].remove();
|
||||
}
|
||||
markers = {};
|
||||
|
||||
//create url
|
||||
var iNat_url = createURL(location, taxon);
|
||||
|
||||
// get results from url
|
||||
try {
|
||||
iNat_results = $.getJSON(iNat_url, function() {
|
||||
// console.log("API results: ", iNat_results.responseJSON.results);
|
||||
|
||||
// Update count in html description
|
||||
$('#count').html(iNat_results.responseJSON.features.length);
|
||||
|
||||
// Used for marker change on zoom level
|
||||
var zoom = map.getZoom();
|
||||
|
||||
// Iterate through all API results
|
||||
iNat_results.responseJSON.features.forEach(function(marker) {
|
||||
// create an img element for the marker
|
||||
var el = document.createElement('div');
|
||||
el.className = 'marker';
|
||||
//img_url = marker.photos[0].url;
|
||||
img_url = marker.properties.imagen;
|
||||
|
||||
// text description for popup
|
||||
var species = marker.species_guess ? marker.species_guess : 'Unknown';
|
||||
//var user = marker.user.name ? marker.user.name : 'Anonymous';
|
||||
var user = marker.properties.title ? marker.properties.title : 'Anonymous';
|
||||
text = species + ' observed on ' + marker.properties.time + ' by ' + user + ' - ';
|
||||
text = text.charAt(0).toUpperCase() + text.substr(1);
|
||||
|
||||
// img_url = img_url.replace("http", "https");
|
||||
//$(el).attr('data-img', img_url);
|
||||
$(el).attr('data-img', img_url);
|
||||
// $(el).attr('data-taxon', taxon);
|
||||
//$(el).attr('data-text', text);
|
||||
$(el).attr('data-text', marker.properties.title);
|
||||
$(el).attr('html', marker.properties.description);
|
||||
//$(el).html(marker.properties.description);
|
||||
$(el).attr('data-link', marker.properties.uri);
|
||||
$(el).attr('data-link', marker.properties.imagen);
|
||||
//$(el).attr('data-latlon', marker.geojson.coordinates);
|
||||
$(el).attr('data-latlon', marker.geometry.coordinates);
|
||||
|
||||
// Map to the map with markers for the current zoomlevel
|
||||
checkZoom(el, zoom);
|
||||
|
||||
// add marker to map
|
||||
// markers[marker.id] = new mapboxgl.Marker(el)
|
||||
markers[marker.control] = new mapboxgl.Marker(el)
|
||||
// .setLngLat(marker.geojson.coordinates)
|
||||
.setLngLat(marker.geometry.coordinates)
|
||||
.addTo(map);
|
||||
});
|
||||
|
||||
$('.loading').hide();
|
||||
|
||||
// markers on click
|
||||
$('.marker').click(function(e) {
|
||||
|
||||
e.stopPropagation();
|
||||
|
||||
var latlon = $(this).attr('data-latlon').split(",");
|
||||
latlon = [Number(latlon[0]), Number(latlon[1])];
|
||||
|
||||
|
||||
var descripcion = $(this).attr('html');//.replace('square', 'medium');
|
||||
|
||||
$('.mapboxgl-popup') ? $('.mapboxgl-popup').remove() : null;
|
||||
|
||||
var popup = new mapboxgl.Popup()
|
||||
.setLngLat(latlon)
|
||||
.setHTML(descripcion)
|
||||
.addTo(map);
|
||||
|
||||
});
|
||||
});
|
||||
} catch (e) {
|
||||
window.alert("API not working properly :(")
|
||||
}
|
||||
}
|
||||
|
||||
// Create the url for API request
|
||||
function createURL(location, taxon) {
|
||||
//url = ['https://api.inaturalist.org/v1/observations?geo=true&native=true&photos=true&lat=',location[1], '&lng=', location[0], '&radius=5&iconic_taxa=', taxon, '&order=desc&order_by=created_at'].join('');
|
||||
url = ['http://localhost/tupali/archivos/74.geojson'].join('');
|
||||
console.log("API url: ", url);
|
||||
return url;
|
||||
}
|
||||
|
||||
// Check what zoom level for what markers, then map to map
|
||||
function checkZoom(marker, zoom) {
|
||||
var img;
|
||||
if (zoom < 12) {
|
||||
$(marker).addClass('sm');
|
||||
// img = 'url(img/marker_' + $(marker).attr('data-taxon').toLowerCase() + '.png)';
|
||||
// img = 'url(img/marker_' + $(marker).attr('data-taxon').toLowerCase() + '.png)';
|
||||
img = 'url(https://tupale.co/milfs/images/secure/?file=150/da6d16547658ebc06c5378b30d1ee4bf.png)';
|
||||
$(marker).css("background-image", img);
|
||||
} else {
|
||||
$(marker).removeClass('sm');
|
||||
img = 'url(' + $(marker).attr('data-img') + ')';
|
||||
// img = 'url(https://tupale.co/milfs/images/secure/?file=150/da6d16547658ebc06c5378b30d1ee4bf.png)';
|
||||
$(marker).css("background-image", img);
|
||||
};
|
||||
}
|
@ -1,35 +1,3 @@
|
||||
function mueveReloj(){
|
||||
var tiempo = new Date();
|
||||
var hora = tiempo.getHours();
|
||||
var minutos = tiempo.getMinutes();
|
||||
var segundos = tiempo.getSeconds();
|
||||
|
||||
var meses = new Array ("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre");
|
||||
var diasSemana = new Array("Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado");
|
||||
var f=new Date();
|
||||
var fecha = diasSemana[f.getDay()] + ", " + f.getDate() + " de " + meses[f.getMonth()] + " de " + f.getFullYear();
|
||||
|
||||
|
||||
var temp = "" + ((hora > 12) ? hora - 12 : hora);
|
||||
if (hora == 0)
|
||||
temp = "12";
|
||||
temp += ((minutos < 10) ? ":0" : ":") + minutos;
|
||||
temp += ((segundos < 10) ? ":0" : ":") + segundos;
|
||||
temp += (hora >= 12) ? " P.M." : " A.M.";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// horaImprimible = year+" "+dia+" "+hora + " : " + minuto + " : " + segundo
|
||||
|
||||
document.form_session.reloj.value = " "+fecha +" "+temp
|
||||
|
||||
setTimeout("mueveReloj()",1000)
|
||||
}
|
||||
|
||||
|
||||
function delayTimer() {
|
||||
var timer;
|
||||
return function (fun, time) {
|
||||
@ -41,24 +9,30 @@ function delayTimer() {
|
||||
var delayFunction = delayTimer();
|
||||
|
||||
|
||||
|
||||
function revisarSession(){
|
||||
function setCookie(cname, cvalue, exdays) {
|
||||
var d = new Date();
|
||||
d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
|
||||
var expires = "expires=" + d.toUTCString();
|
||||
document.cookie = cname + "=" + cvalue + "; " + expires;
|
||||
}
|
||||
function revisarSession(sesion){
|
||||
tiempo = "30";
|
||||
gavela="19";
|
||||
timestamp = Math.round(Date.now() /1000)
|
||||
inicio = leerCookie("timestamp");
|
||||
timestamp = Math.round(Date.now() /1000);
|
||||
inicio = sesion;//leerCookie("timestamp");
|
||||
transcurrido = (timestamp - inicio);
|
||||
transcurrido_minutos = Math.round(transcurrido/60);
|
||||
restante = (tiempo - transcurrido_minutos);
|
||||
prefin = (tiempo*60)-transcurrido;
|
||||
//sesion = "hola";
|
||||
|
||||
document.form_session.tiempo_session.value = "Cierra en "+restante+" minutos ";
|
||||
document.form_session.tiempo_session.value = "Cierra en: "+restante+" minutos ("+transcurrido+" "+sesion+") ";
|
||||
|
||||
if(restante == 1 ){
|
||||
//alert(transcurrido);
|
||||
location.href="../../salir.php";
|
||||
}else{
|
||||
setTimeout("revisarSession()",2000) ;
|
||||
setTimeout("revisarSession("+sesion+")",2000) ;
|
||||
}
|
||||
}
|
||||
|
||||
@ -654,6 +628,3 @@ else if (document.all) document.all[''+id+''].style.visibility = "hidden"
|
||||
else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "hidden"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
21
mapa.php
@ -16,7 +16,7 @@
|
||||
integrity="sha512-nMMmRyTVoLYqjP9hrbed9S+FzjZHW5gY1TWCHA5ckwXZBadntCNs8kEqAWdrb9O7rxbCaA4lKTIWjDXZxflOcA=="
|
||||
crossorigin=""></script>
|
||||
-->
|
||||
|
||||
<script src="js/scripts.js"></script>
|
||||
<link rel="stylesheet" href="librerias/leaflet/leaflet.css"/>
|
||||
<script src="librerias/leaflet/leaflet.js"></script>
|
||||
<style>
|
||||
@ -29,13 +29,30 @@
|
||||
|
||||
|
||||
<div id='map'></div>
|
||||
|
||||
<?php
|
||||
sleep(2);
|
||||
$ubicacion = $_COOKIE['ubicacion'];
|
||||
$coordenadas = explode("|",$ubicacion);
|
||||
if($coordenadas[0] !="" AND $coordenadas[1] !="" ){
|
||||
$lon = $coordenadas[0];
|
||||
$lat = $coordenadas[1];
|
||||
$zoom = "20";
|
||||
|
||||
}else{
|
||||
if ($_REQUEST['lat'] !='') {$lat=$_REQUEST['lat'];}else {$lat= "-72";}
|
||||
if ($_REQUEST['lon'] !='') {$lon=$_REQUEST['lon'];}else {$lon= "4";}
|
||||
if ($_REQUEST['zoom'] !='') {$zoom=$_REQUEST['zoom'];}else {$zoom= "5";}
|
||||
if ($_REQUEST['zoom'] !='') {$zoom=$_REQUEST['zoom'];}else {$zoom= "20";}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
//var e.latlng= localizacion;
|
||||
//alert(localizacion);
|
||||
|
||||
var map = L.map('map')
|
||||
.setView([<?php echo $lon ?>, <?php echo $lat ?>], <?php echo $zoom ?>);
|
||||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map);
|
||||
|