Compare commits
10 Commits
2f3a3f9561
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 789838dd07 | |||
| a5fe6ebf75 | |||
| d0dbb85e28 | |||
| 6a42494099 | |||
| 1d90b11aef | |||
| bc75cbc17d | |||
| 2e8372d923 | |||
| 383890a9be | |||
| ae8a27fa64 | |||
| af05650443 |
@@ -1,4 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
wget -qO- https://spot.lutran.fr/index.php?a=update_project > /dev/null
|
|
||||||
|
|
||||||
#Crontab job: 0 * * * * . /var/www/spot/spot_cron.sh > /dev/null
|
|
||||||
@@ -14,10 +14,10 @@
|
|||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Franzz\\Spot\\": "lib/"
|
"Franzz\\Spot\\": "inc/"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"config/settings.php"
|
"settings.php"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
16
composer.lock
generated
@@ -27,16 +27,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpmailer/phpmailer",
|
"name": "phpmailer/phpmailer",
|
||||||
"version": "v6.8.1",
|
"version": "v6.8.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/PHPMailer/PHPMailer.git",
|
"url": "https://github.com/PHPMailer/PHPMailer.git",
|
||||||
"reference": "e88da8d679acc3824ff231fdc553565b802ac016"
|
"reference": "df16b615e371d81fb79e506277faea67a1be18f1"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/e88da8d679acc3824ff231fdc553565b802ac016",
|
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/df16b615e371d81fb79e506277faea67a1be18f1",
|
||||||
"reference": "e88da8d679acc3824ff231fdc553565b802ac016",
|
"reference": "df16b615e371d81fb79e506277faea67a1be18f1",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -46,13 +46,13 @@
|
|||||||
"php": ">=5.5.0"
|
"php": ">=5.5.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
|
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.2",
|
||||||
"doctrine/annotations": "^1.2.6 || ^1.13.3",
|
"doctrine/annotations": "^1.2.6 || ^1.13.3",
|
||||||
"php-parallel-lint/php-console-highlighter": "^1.0.0",
|
"php-parallel-lint/php-console-highlighter": "^1.0.0",
|
||||||
"php-parallel-lint/php-parallel-lint": "^1.3.2",
|
"php-parallel-lint/php-parallel-lint": "^1.3.2",
|
||||||
"phpcompatibility/php-compatibility": "^9.3.5",
|
"phpcompatibility/php-compatibility": "^9.3.5",
|
||||||
"roave/security-advisories": "dev-latest",
|
"roave/security-advisories": "dev-latest",
|
||||||
"squizlabs/php_codesniffer": "^3.7.2",
|
"squizlabs/php_codesniffer": "^3.7.1",
|
||||||
"yoast/phpunit-polyfills": "^1.0.4"
|
"yoast/phpunit-polyfills": "^1.0.4"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
@@ -95,7 +95,7 @@
|
|||||||
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
|
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/PHPMailer/PHPMailer/issues",
|
"issues": "https://github.com/PHPMailer/PHPMailer/issues",
|
||||||
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.8.1"
|
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.8.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2023-08-29T08:26:30+00:00"
|
"time": "2023-03-06T14:43:22+00:00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [],
|
"packages-dev": [],
|
||||||
|
|||||||
69304
geo/snt.gpx
Normal file
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 821 B After Width: | Height: | Size: 821 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 261 KiB After Width: | Height: | Size: 261 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
@@ -36,18 +36,18 @@ class Converter extends PhpObject {
|
|||||||
|
|
||||||
public static function isGeoJsonValid($sCodeName) {
|
public static function isGeoJsonValid($sCodeName) {
|
||||||
$bResult = false;
|
$bResult = false;
|
||||||
$sGpxFilePath = Gpx::getFilePath($sCodeName);
|
$sGpxFilePath = Geo::getFilePath($sCodeName, Gpx::EXT);
|
||||||
$sGeoJsonFilePath = GeoJson::getFilePath($sCodeName);
|
$sGeoJsonFilePath = Geo::getFilePath($sCodeName, GeoJson::EXT);
|
||||||
|
|
||||||
//No need to generate if gpx is missing
|
//No need to generate if gpx is missing
|
||||||
if(!file_exists($sGpxFilePath) || file_exists($sGeoJsonFilePath) && filemtime($sGeoJsonFilePath) > filemtime(Gpx::getFilePath($sCodeName))) $bResult = true;
|
if(!file_exists($sGpxFilePath) || file_exists($sGeoJsonFilePath) && filemtime($sGeoJsonFilePath) > filemtime(Geo::getFilePath($sCodeName, Gpx::EXT))) $bResult = true;
|
||||||
return $bResult;
|
return $bResult;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class Geo extends PhpObject {
|
class Geo extends PhpObject {
|
||||||
|
|
||||||
const GEO_FOLDER = '../geo/';
|
const GEO_FOLDER = 'geo/';
|
||||||
const OPT_SIMPLE = 'simplification';
|
const OPT_SIMPLE = 'simplification';
|
||||||
|
|
||||||
protected $asTracks;
|
protected $asTracks;
|
||||||
@@ -55,16 +55,12 @@ class Geo extends PhpObject {
|
|||||||
|
|
||||||
public function __construct($sCodeName) {
|
public function __construct($sCodeName) {
|
||||||
parent::__construct(get_class($this), Settings::DEBUG, PhpObject::MODE_HTML);
|
parent::__construct(get_class($this), Settings::DEBUG, PhpObject::MODE_HTML);
|
||||||
$this->sFilePath = self::getFilePath($sCodeName);
|
$this->sFilePath = self::getFilePath($sCodeName, static::EXT);
|
||||||
$this->asTracks = array();
|
$this->asTracks = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getFilePath($sCodeName) {
|
public static function getFilePath($sCodeName, $sExt) {
|
||||||
return self::GEO_FOLDER.$sCodeName.static::EXT;
|
return self::GEO_FOLDER.$sCodeName.$sExt;
|
||||||
}
|
|
||||||
|
|
||||||
public static function getDistFilePath($sCodeName) {
|
|
||||||
return 'geo/'.$sCodeName.static::EXT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getLog() {
|
public function getLog() {
|
||||||
@@ -168,6 +168,31 @@ class Feed extends PhpObject {
|
|||||||
return $bNewMsg;
|
return $bNewMsg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function addManualPosition($sLat, $sLng, $iTimestamp) {
|
||||||
|
$sTimeZone = date_default_timezone_get();
|
||||||
|
$oDateTime = new \DateTime('@'.$iTimestamp);
|
||||||
|
$oDateTime->setTimezone(new \DateTimeZone($sTimeZone));
|
||||||
|
$asWeather = $this->getWeather(array($sLat, $sLng), $iTimestamp);
|
||||||
|
|
||||||
|
$asMsg = [
|
||||||
|
'ref_msg_id' => $iTimestamp.'/man',
|
||||||
|
'id_feed' => $this->getFeedId(),
|
||||||
|
'type' => 'OK',
|
||||||
|
'latitude' => $sLat,
|
||||||
|
'longitude' => $sLng,
|
||||||
|
'iso_time' => $oDateTime->format("Y-m-d\TH:i:sO"), //Incorrect ISO 8601 format, but compliant with Spot data
|
||||||
|
'site_time' => $oDateTime->format(Db::TIMESTAMP_FORMAT),
|
||||||
|
'timezone' => $sTimeZone,
|
||||||
|
'unix_time' => $iTimestamp,
|
||||||
|
'content' => '',
|
||||||
|
'battery_state' => '',
|
||||||
|
'posted_on' => date(Db::TIMESTAMP_FORMAT),
|
||||||
|
];
|
||||||
|
|
||||||
|
$iMessageId = $this->oDb->insertRow(self::MSG_TABLE, array_merge($asMsg, $asWeather));
|
||||||
|
return $iMessageId;
|
||||||
|
}
|
||||||
|
|
||||||
private function updateFeed() {
|
private function updateFeed() {
|
||||||
$bNewMsg = false;
|
$bNewMsg = false;
|
||||||
$asData = $this->retrieveFeed();
|
$asData = $this->retrieveFeed();
|
||||||
@@ -144,8 +144,8 @@ class Project extends PhpObject {
|
|||||||
|
|
||||||
if($sCodeName != '' && !Converter::isGeoJsonValid($sCodeName)) Converter::convertToGeoJson($sCodeName);
|
if($sCodeName != '' && !Converter::isGeoJsonValid($sCodeName)) Converter::convertToGeoJson($sCodeName);
|
||||||
|
|
||||||
$asProject['geofilepath'] = Spot::addTimestampToFilePath(GeoJson::getDistFilePath($sCodeName));
|
$asProject['geofilepath'] = Spot::addTimestampToFilePath(Geo::getFilePath($sCodeName, GeoJson::EXT));
|
||||||
$asProject['gpxfilepath'] = Spot::addTimestampToFilePath(Gpx::getDistFilePath($sCodeName));
|
$asProject['gpxfilepath'] = Spot::addTimestampToFilePath(Geo::getFilePath($sCodeName, Gpx::EXT));
|
||||||
$asProject['codename'] = $sCodeName;
|
$asProject['codename'] = $sCodeName;
|
||||||
}
|
}
|
||||||
return $bSpecificProj?$asProject:$asProjects;
|
return $bSpecificProj?$asProject:$asProjects;
|
||||||
@@ -40,8 +40,6 @@ class Spot extends Main
|
|||||||
|
|
||||||
const DEFAULT_LANG = 'en';
|
const DEFAULT_LANG = 'en';
|
||||||
|
|
||||||
const MAIN_PAGE = 'index';
|
|
||||||
|
|
||||||
private Project $oProject;
|
private Project $oProject;
|
||||||
private Media $oMedia;
|
private Media $oMedia;
|
||||||
private User $oUser;
|
private User $oUser;
|
||||||
@@ -160,42 +158,42 @@ class Spot extends Main
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAppParams() {
|
public function getAppMainPage()
|
||||||
|
{
|
||||||
//Cache Page List
|
//Cache Page List
|
||||||
$asPages = array_diff($this->asMasks, array('email_update', 'email_conf'));
|
$asPages = array_diff($this->asMasks, array('email_update', 'email_conf'));
|
||||||
if(!$this->oUser->checkUserClearance(User::CLEARANCE_ADMIN)) {
|
if(!$this->oUser->checkUserClearance(User::CLEARANCE_ADMIN)) {
|
||||||
$asPages = array_diff($asPages, array('admin', 'upload'));
|
$asPages = array_diff($asPages, array('admin', 'upload'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$asGlobalVars = array(
|
|
||||||
'vars' => array(
|
|
||||||
'chunk_size' => self::FEED_CHUNK_SIZE,
|
|
||||||
'default_project_codename' => $this->oProject->getProjectCodeName(),
|
|
||||||
'projects' => $this->oProject->getProjects(),
|
|
||||||
'user' => $this->oUser->getUserInfo()
|
|
||||||
),
|
|
||||||
'consts' => array(
|
|
||||||
'server' => $this->asContext['serv_name'],
|
|
||||||
'modes' => Project::MODES,
|
|
||||||
'clearances' => User::CLEARANCES,
|
|
||||||
'default_timezone' => Settings::TIMEZONE
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
return self::getJsonResult(true, '', parent::getParams($asGlobalVars, self::MAIN_PAGE, $asPages));
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getAppMainPage()
|
|
||||||
{
|
|
||||||
return parent::getMainPage(
|
return parent::getMainPage(
|
||||||
self::MAIN_PAGE,
|
|
||||||
array(
|
array(
|
||||||
'language' => $this->oLang->getLanguage(),
|
'vars' => array(
|
||||||
'host_url' => $this->asContext['serv_name'],
|
'chunk_size' => self::FEED_CHUNK_SIZE,
|
||||||
'filepath_css' => self::addTimestampToFilePath('spot.css'),
|
'default_project_codename' => $this->oProject->getProjectCodeName(),
|
||||||
'filepath_js' => self::addTimestampToFilePath('../dist/app.js')
|
'projects' => $this->oProject->getProjects(),
|
||||||
)
|
'user' => $this->oUser->getUserInfo()
|
||||||
|
),
|
||||||
|
'consts' => array(
|
||||||
|
'server' => $this->asContext['serv_name'],
|
||||||
|
'modes' => Project::MODES,
|
||||||
|
'clearances' => User::CLEARANCES,
|
||||||
|
'default_timezone' => Settings::TIMEZONE
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'index',
|
||||||
|
array(
|
||||||
|
'language' => $this->oLang->getLanguage(),
|
||||||
|
'host_url' => $this->asContext['serv_name'],
|
||||||
|
'filepath_css' => self::addTimestampToFilePath('style/spot.css'),
|
||||||
|
'filepath_js_d3' => self::addTimestampToFilePath('script/d3.min.js'),
|
||||||
|
'filepath_js_leaflet' => self::addTimestampToFilePath('script/leaflet.min.js'),
|
||||||
|
'filepath_js_jquery' => self::addTimestampToFilePath('script/jquery.min.js'),
|
||||||
|
'filepath_js_jquery_mods' => self::addTimestampToFilePath('script/jquery.mods.js'),
|
||||||
|
'filepath_js_spot' => self::addTimestampToFilePath('script/spot.js'),
|
||||||
|
'filepath_js_lightbox' => self::addTimestampToFilePath('script/lightbox.js')
|
||||||
|
),
|
||||||
|
$asPages
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -632,6 +630,13 @@ class Spot extends Main
|
|||||||
return self::getJsonResult($asResult['result'], $asResult['desc'], $asResult['data']);
|
return self::getJsonResult($asResult['result'], $asResult['desc'], $asResult['data']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function addPosition($sLat, $sLng, $iTimestamp) {
|
||||||
|
$oFeed = new Feed($this->oDb, $this->oProject->getFeedIds()[0]);
|
||||||
|
$bResult = ($oFeed->addManualPosition($sLat, $sLng, $iTimestamp) > 0);
|
||||||
|
|
||||||
|
return self::getJsonResult($bResult, $bResult?'':$this->oDb->getLastError());
|
||||||
|
}
|
||||||
|
|
||||||
public function getAdminSettings($sType='') {
|
public function getAdminSettings($sType='') {
|
||||||
$oFeed = new Feed($this->oDb);
|
$oFeed = new Feed($this->oDb);
|
||||||
$asData = array(
|
$asData = array(
|
||||||
@@ -746,6 +751,10 @@ class Spot extends Main
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function buildGeoJSON($sCodeName) {
|
||||||
|
return Converter::convertToGeoJson($sCodeName);
|
||||||
|
}
|
||||||
|
|
||||||
public static function decToDms($dValue, $sType) {
|
public static function decToDms($dValue, $sType) {
|
||||||
if($sType=='lat') $sDirection = ($dValue >= 0)?'N':'S'; //Latitude
|
if($sType=='lat') $sDirection = ($dValue >= 0)?'N':'S'; //Latitude
|
||||||
else $sDirection = ($dValue >= 0)?'E':'W'; //Longitude
|
else $sDirection = ($dValue >= 0)?'E':'W'; //Longitude
|
||||||
@@ -25,12 +25,7 @@ class Uploader extends UploadHandler
|
|||||||
$this->oMedia = &$oMedia;
|
$this->oMedia = &$oMedia;
|
||||||
$this->oLang = &$oLang;
|
$this->oLang = &$oLang;
|
||||||
$this->sBody = '';
|
$this->sBody = '';
|
||||||
|
parent::__construct(array('image_versions'=>array(), 'accept_file_types'=>'/\.(gif|jpe?g|png|mov|mp4)$/i'));
|
||||||
parent::__construct(array(
|
|
||||||
'upload_dir' => Media::MEDIA_FOLDER,
|
|
||||||
'image_versions' => array(),
|
|
||||||
'accept_file_types' => '/\.(gif|jpe?g|png|mov|mp4)$/i'
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function validate($uploaded_file, $file, $error, $index, $content_range) {
|
protected function validate($uploaded_file, $file, $error, $index, $content_range) {
|
||||||
@@ -5,8 +5,7 @@
|
|||||||
//Start buffering
|
//Start buffering
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
//Run from /dist/
|
$oLoader = require __DIR__.'/vendor/autoload.php';
|
||||||
$oLoader = require __DIR__.'/../vendor/autoload.php';
|
|
||||||
|
|
||||||
use Franzz\Objects\ToolBox;
|
use Franzz\Objects\ToolBox;
|
||||||
use Franzz\Objects\Main;
|
use Franzz\Objects\Main;
|
||||||
@@ -26,6 +25,9 @@ $oValue = $_REQUEST['value'] ?? '';
|
|||||||
$iId = $_REQUEST['id'] ?? 0 ;
|
$iId = $_REQUEST['id'] ?? 0 ;
|
||||||
$sType = $_REQUEST['type'] ?? '';
|
$sType = $_REQUEST['type'] ?? '';
|
||||||
$sEmail = $_REQUEST['email'] ?? '';
|
$sEmail = $_REQUEST['email'] ?? '';
|
||||||
|
$sLat = $_REQUEST['latitude'] ?? '';
|
||||||
|
$sLng = $_REQUEST['longitude'] ?? '';
|
||||||
|
$iTimestamp = $_REQUEST['timestamp'] ?? 0;
|
||||||
|
|
||||||
//Initiate class
|
//Initiate class
|
||||||
$oSpot = new Spot(__FILE__, $sTimezone);
|
$oSpot = new Spot(__FILE__, $sTimezone);
|
||||||
@@ -36,9 +38,6 @@ if($sAction!='')
|
|||||||
{
|
{
|
||||||
switch($sAction)
|
switch($sAction)
|
||||||
{
|
{
|
||||||
case 'params':
|
|
||||||
$sResult = $oSpot->getAppParams();
|
|
||||||
break;
|
|
||||||
case 'markers':
|
case 'markers':
|
||||||
$sResult = $oSpot->getMarkers();
|
$sResult = $oSpot->getMarkers();
|
||||||
break;
|
break;
|
||||||
@@ -74,6 +73,9 @@ if($sAction!='')
|
|||||||
case 'add_comment':
|
case 'add_comment':
|
||||||
$sResult = $oSpot->addComment($iId, $sContent);
|
$sResult = $oSpot->addComment($iId, $sContent);
|
||||||
break;
|
break;
|
||||||
|
case 'add_position':
|
||||||
|
$sResult = $oSpot->addPosition($sLat, $sLng, $iTimestamp);
|
||||||
|
break;
|
||||||
case 'admin_new':
|
case 'admin_new':
|
||||||
$sResult = $oSpot->createProject();
|
$sResult = $oSpot->createProject();
|
||||||
break;
|
break;
|
||||||
@@ -92,6 +94,9 @@ if($sAction!='')
|
|||||||
case 'sql':
|
case 'sql':
|
||||||
$sResult = $oSpot->getDbBuildScript();
|
$sResult = $oSpot->getDbBuildScript();
|
||||||
break;
|
break;
|
||||||
|
case 'build_geojson':
|
||||||
|
$sResult = $oSpot->buildGeoJSON($sName);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
$sResult = Main::getJsonResult(false, Main::NOT_FOUND);
|
$sResult = Main::getJsonResult(false, Main::NOT_FOUND);
|
||||||
}
|
}
|
||||||
@@ -6,6 +6,9 @@
|
|||||||
<div class="bar" style="width: 0%;"></div>
|
<div class="bar" style="width: 0%;"></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="comments"></div>
|
<div id="comments"></div>
|
||||||
|
<div id="location">
|
||||||
|
<button id="add_loc"><i class="fa fa-message push"></i>New Position</button>
|
||||||
|
</div>
|
||||||
<div id="status"></div>
|
<div id="status"></div>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
@@ -35,6 +38,27 @@ oSpot.pageInit = function(asHash) {
|
|||||||
$('#progress .bar').css('width', progress+'%');
|
$('#progress .bar').css('width', progress+'%');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#add_loc').click(() => {
|
||||||
|
if(navigator.geolocation) {
|
||||||
|
addStatus('Determining position...');
|
||||||
|
navigator.geolocation.getCurrentPosition(
|
||||||
|
(position) => {
|
||||||
|
addStatus('Sending position...');
|
||||||
|
oSpot.get(
|
||||||
|
'add_position',
|
||||||
|
function(asData){addStatus('Position sent');},
|
||||||
|
{'latitude':position.coords.latitude, 'longitude':position.coords.longitude, 'timestamp':Math.round(position.timestamp / 1000)},
|
||||||
|
function(sMsgId){addStatus(self.lang(sMsgId));},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
(error) => {
|
||||||
|
addStatus(error.message);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else addStatus('This browser does not support geolocation');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else addStatus(self.lang('upload_mode_archived', [asProject.name]), true);
|
else addStatus(self.lang('upload_mode_archived', [asProject.name]), true);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
4. Copy settings-sample.php to settings.php and populate
|
4. Copy settings-sample.php to settings.php and populate
|
||||||
5. Go to #admin and create a new project, feed & maps
|
5. Go to #admin and create a new project, feed & maps
|
||||||
6. Add a GPX file named <project_codename>.gpx to /geo/
|
6. Add a GPX file named <project_codename>.gpx to /geo/
|
||||||
|
7. Run composer install
|
||||||
## To Do List
|
## To Do List
|
||||||
* ECMA import/export
|
* ECMA import/export
|
||||||
* Add mail frequency slider
|
* Add mail frequency slider
|
||||||
|
|||||||
2
script/d3.min.js
vendored
Normal file
2
script/jquery.min.js
vendored
Normal file
20
script/jquery.mods.js
Executable file
23
script/leaflet.min.js
vendored
Normal file
@@ -1,4 +1,4 @@
|
|||||||
$fa-font-path: 'fonts';
|
$fa-font-path: "fa/fonts";
|
||||||
$fa-css-prefix: fa;
|
$fa-css-prefix: fa;
|
||||||
|
|
||||||
@import 'fa/solid';
|
@import 'fa/solid';
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
/* Google Fonts - Ubuntu v20 - https://fonts.googleapis.com/css?family=Ubuntu:400,700&subset=latin-ext&display=swap */
|
/* Google Fonts - Ubuntu v15 - https://fonts.googleapis.com/css?family=Ubuntu:400,700&subset=latin-ext&display=swap */
|
||||||
|
|
||||||
/* cyrillic-ext */
|
/* cyrillic-ext */
|
||||||
@font-face {
|
@font-face {
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
src: url(https://fonts.gstatic.com/s/ubuntu/v20/4iCs6KVjbNBYlgoKcg72j00.woff2) format('woff2');
|
src: url(https://fonts.gstatic.com/s/ubuntu/v15/4iCs6KVjbNBYlgoKcg72j00.woff2) format('woff2');
|
||||||
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
||||||
}
|
}
|
||||||
/* cyrillic */
|
/* cyrillic */
|
||||||
@@ -15,8 +15,8 @@
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
src: url(https://fonts.gstatic.com/s/ubuntu/v20/4iCs6KVjbNBYlgoKew72j00.woff2) format('woff2');
|
src: url(https://fonts.gstatic.com/s/ubuntu/v15/4iCs6KVjbNBYlgoKew72j00.woff2) format('woff2');
|
||||||
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
||||||
}
|
}
|
||||||
/* greek-ext */
|
/* greek-ext */
|
||||||
@font-face {
|
@font-face {
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
src: url(https://fonts.gstatic.com/s/ubuntu/v20/4iCs6KVjbNBYlgoKcw72j00.woff2) format('woff2');
|
src: url(https://fonts.gstatic.com/s/ubuntu/v15/4iCs6KVjbNBYlgoKcw72j00.woff2) format('woff2');
|
||||||
unicode-range: U+1F00-1FFF;
|
unicode-range: U+1F00-1FFF;
|
||||||
}
|
}
|
||||||
/* greek */
|
/* greek */
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
src: url(https://fonts.gstatic.com/s/ubuntu/v20/4iCs6KVjbNBYlgoKfA72j00.woff2) format('woff2');
|
src: url(https://fonts.gstatic.com/s/ubuntu/v15/4iCs6KVjbNBYlgoKfA72j00.woff2) format('woff2');
|
||||||
unicode-range: U+0370-03FF;
|
unicode-range: U+0370-03FF;
|
||||||
}
|
}
|
||||||
/* latin-ext */
|
/* latin-ext */
|
||||||
@@ -42,8 +42,8 @@
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
src: url(https://fonts.gstatic.com/s/ubuntu/v20/4iCs6KVjbNBYlgoKcQ72j00.woff2) format('woff2');
|
src: url(https://fonts.gstatic.com/s/ubuntu/v15/4iCs6KVjbNBYlgoKcQ72j00.woff2) format('woff2');
|
||||||
unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||||
}
|
}
|
||||||
/* latin */
|
/* latin */
|
||||||
@font-face {
|
@font-face {
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
src: url(fonts/4iCs6KVjbNBYlgoKfw72.woff2) format('woff2');
|
src: url(fonts/4iCs6KVjbNBYlgoKfw72.woff2) format('woff2');
|
||||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||||
}
|
}
|
||||||
/* cyrillic-ext */
|
/* cyrillic-ext */
|
||||||
@font-face {
|
@font-face {
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
src: url(https://fonts.gstatic.com/s/ubuntu/v20/4iCv6KVjbNBYlgoCxCvjvWyNL4U.woff2) format('woff2');
|
src: url(https://fonts.gstatic.com/s/ubuntu/v15/4iCv6KVjbNBYlgoCxCvjvWyNL4U.woff2) format('woff2');
|
||||||
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
||||||
}
|
}
|
||||||
/* cyrillic */
|
/* cyrillic */
|
||||||
@@ -69,8 +69,8 @@
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
src: url(https://fonts.gstatic.com/s/ubuntu/v20/4iCv6KVjbNBYlgoCxCvjtGyNL4U.woff2) format('woff2');
|
src: url(https://fonts.gstatic.com/s/ubuntu/v15/4iCv6KVjbNBYlgoCxCvjtGyNL4U.woff2) format('woff2');
|
||||||
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
||||||
}
|
}
|
||||||
/* greek-ext */
|
/* greek-ext */
|
||||||
@font-face {
|
@font-face {
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
src: url(https://fonts.gstatic.com/s/ubuntu/v20/4iCv6KVjbNBYlgoCxCvjvGyNL4U.woff2) format('woff2');
|
src: url(https://fonts.gstatic.com/s/ubuntu/v15/4iCv6KVjbNBYlgoCxCvjvGyNL4U.woff2) format('woff2');
|
||||||
unicode-range: U+1F00-1FFF;
|
unicode-range: U+1F00-1FFF;
|
||||||
}
|
}
|
||||||
/* greek */
|
/* greek */
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
src: url(https://fonts.gstatic.com/s/ubuntu/v20/4iCv6KVjbNBYlgoCxCvjs2yNL4U.woff2) format('woff2');
|
src: url(https://fonts.gstatic.com/s/ubuntu/v15/4iCv6KVjbNBYlgoCxCvjs2yNL4U.woff2) format('woff2');
|
||||||
unicode-range: U+0370-03FF;
|
unicode-range: U+0370-03FF;
|
||||||
}
|
}
|
||||||
/* latin-ext */
|
/* latin-ext */
|
||||||
@@ -96,8 +96,8 @@
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
src: url(https://fonts.gstatic.com/s/ubuntu/v20/4iCv6KVjbNBYlgoCxCvjvmyNL4U.woff2) format('woff2');
|
src: url(https://fonts.gstatic.com/s/ubuntu/v15/4iCv6KVjbNBYlgoCxCvjvmyNL4U.woff2) format('woff2');
|
||||||
unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||||
}
|
}
|
||||||
/* latin */
|
/* latin */
|
||||||
@font-face {
|
@font-face {
|
||||||
@@ -106,5 +106,5 @@
|
|||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
src: url(fonts/4iCv6KVjbNBYlgoCxCvjsGyN.woff2) format('woff2');
|
src: url(fonts/4iCv6KVjbNBYlgoCxCvjsGyN.woff2) format('woff2');
|
||||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||||
}
|
}
|
||||||
@@ -9,8 +9,8 @@ $stroke-width-mouse-focus : 1;
|
|||||||
$stroke-width-height-focus: 2;
|
$stroke-width-height-focus: 2;
|
||||||
$stroke-width-axis : 2;
|
$stroke-width-axis : 2;
|
||||||
|
|
||||||
@import '../../node_modules/leaflet/dist/leaflet';
|
@import 'leaflet/leaflet';
|
||||||
@import '../../node_modules/leaflet.heightgraph/src/L.Control.Heightgraph.css';
|
@import 'leaflet/leaflet_heightgraph';
|
||||||
|
|
||||||
/* Leaflet fixes */
|
/* Leaflet fixes */
|
||||||
.leaflet-container {
|
.leaflet-container {
|
||||||
@@ -108,7 +108,3 @@ $stroke-width-axis : 2;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.leaflet-default-icon-path {
|
|
||||||
background-image: none;
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
@import '../../node_modules/lightbox2/src/css/lightbox.css';
|
@import 'lightbox/lightbox';
|
||||||
|
|
||||||
@mixin lightbox-icon($icon) {
|
@mixin lightbox-icon($icon) {
|
||||||
background: none;
|
background: none;
|
||||||