This commit is contained in:
bastianonm 2012-08-20 15:06:29 +00:00
parent 5f980ebdba
commit b108750b44
11 changed files with 259 additions and 185 deletions

View File

@ -658,11 +658,11 @@ function _wpgpxmaps(params)
if (unitspeed == '4') // min/miles
{
l_s = { suf : "min/mi", dec : 1 };
l_s = { suf : "min/mi", dec : 2 };
}
else if (unitspeed == '3') // min/km
{
l_s = { suf : "min/km", dec : 1 };
l_s = { suf : "min/km", dec : 2 };
}
else if (unitspeed == '2') // miles/h
{
@ -834,11 +834,11 @@ function addWayPoint(map, image, shadow, lat, lon, title, descr)
var cnt = '';
if (title=='')
{
cnt = "<center>" + descr + "</center>";
cnt = "<div style='text-align:center;'>" + unescape(descr) + "</div>";
}
else
{
cnt = "<b>" + title + "</b></br />" + descr;
cnt = "<div style='font-size:0.8em; text-align:center;'><b>" + title + "</b><br />" + unescape(descr) + "</div>";
}
infowindow = new google.maps.InfoWindow({ content: cnt});
infowindow.open(map,m);

View File

@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: wp-gpx-maps\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-25 11:54+0100\n"
"PO-Revision-Date: 2012-06-25 11:55+0100\n"
"POT-Creation-Date: 2012-08-09 16:38+0100\n"
"PO-Revision-Date: 2012-08-09 16:38+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -13,67 +13,69 @@ msgstr ""
"X-Poedit-Basepath: .\n"
"X-Poedit-SearchPath-0: ..\n"
#: ../wp-gpx-maps.php:420
#: ../wp-gpx-maps.php:472
msgid "Altitude"
msgstr "Höhe"
#: ../wp-gpx-maps.php:421
#: ../wp-gpx-maps.php:473
msgid "Current Position"
msgstr "Aktuelle Position"
#: ../wp-gpx-maps.php:422
#: ../wp-gpx-maps.php:474
msgid "Speed"
msgstr "Geschwindigkeit"
#: ../wp-gpx-maps.php:423
#: ../wp-gpx-maps.php:475
msgid "Heart rate"
msgstr "Herzfrequenz"
#: ../wp-gpx-maps.php:424
#: ../wp-gpx-maps.php:476
msgid "Cadence"
msgstr "Trittfrequenz"
#: ../wp-gpx-maps.php:425
#: ../wp-gpx-maps.php:477
msgid "Go Full Screen"
msgstr "Vollbildansicht"
#: ../wp-gpx-maps.php:426
#: ../wp-gpx-maps.php:478
msgid "Exit Full Screen"
msgstr "Vollbildansicht beenden"
#: ../wp-gpx-maps.php:439
#: ../wp-gpx-maps.php:491
msgid "Total distance"
msgstr "Distanz"
#: ../wp-gpx-maps.php:443
#: ../wp-gpx-maps.php:496
msgid "Max elevation"
msgstr "Maximale Höhe"
#: ../wp-gpx-maps.php:444
#: ../wp-gpx-maps.php:498
msgid "Min elevation"
msgstr "Minimale Höhe"
#: ../wp-gpx-maps.php:445
#: ../wp-gpx-maps.php:500
msgid "Total climbing"
msgstr "Gesamtanstieg"
#: ../wp-gpx-maps.php:446
#: ../wp-gpx-maps.php:502
msgid "Total descent"
msgstr "Gesamtabstieg"
#: ../wp-gpx-maps.php:450
#: ../wp-gpx-maps.php:506
msgid "Average speed"
msgstr "Durchschnittsgeschwindigkeit"
#: ../wp-gpx-maps.php:466
#: ../wp-gpx-maps.php:511
#, fuzzy
msgid "Total Time"
msgstr "Distanz"
#: ../wp-gpx-maps.php:527
msgid "Download"
msgstr "Download"
#: ../wp-gpx-maps_admin_settings.php:75
#: ../wp-gpx-maps_admin_settings.php:151
#: ../wp-gpx-maps_admin_settings.php:255
#: ../wp-gpx-maps_admin_settings.php:286
#: ../wp-gpx-maps_admin_settings.php:83 ../wp-gpx-maps_admin_settings.php:151
#: ../wp-gpx-maps_admin_settings.php:229 ../wp-gpx-maps_admin_settings.php:333
#: ../wp-gpx-maps_admin_settings.php:364
msgid "Save Changes"
msgstr "Änderungen speichern"

View File

@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: wp-gpx-maps\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-25 11:54+0100\n"
"PO-Revision-Date: 2012-06-25 20:34+0100\n"
"POT-Creation-Date: 2012-08-09 16:38+0100\n"
"PO-Revision-Date: 2012-08-09 16:39+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -13,66 +13,69 @@ msgstr ""
"X-Poedit-Basepath: .\n"
"X-Poedit-SearchPath-0: ..\n"
#: ../wp-gpx-maps.php:420
#: ../wp-gpx-maps.php:472
msgid "Altitude"
msgstr "Altura"
#: ../wp-gpx-maps.php:421
#: ../wp-gpx-maps.php:473
msgid "Current Position"
msgstr "Posición actual"
#: ../wp-gpx-maps.php:422
#: ../wp-gpx-maps.php:474
msgid "Speed"
msgstr "Velocidad"
#: ../wp-gpx-maps.php:423
#: ../wp-gpx-maps.php:475
msgid "Heart rate"
msgstr "Ritmo cardíaco"
#: ../wp-gpx-maps.php:424
#: ../wp-gpx-maps.php:476
msgid "Cadence"
msgstr "Cadencia"
#: ../wp-gpx-maps.php:425
#: ../wp-gpx-maps.php:477
msgid "Go Full Screen"
msgstr "Ir a pantalla completa"
#: ../wp-gpx-maps.php:426
#: ../wp-gpx-maps.php:478
msgid "Exit Full Screen"
msgstr "Salir de pantalla completa"
#: ../wp-gpx-maps.php:439
#: ../wp-gpx-maps.php:491
msgid "Total distance"
msgstr "Distancia total"
#: ../wp-gpx-maps.php:443
#: ../wp-gpx-maps.php:496
msgid "Max elevation"
msgstr "Elevación máxima"
#: ../wp-gpx-maps.php:444
#: ../wp-gpx-maps.php:498
msgid "Min elevation"
msgstr "Elevación mínima"
#: ../wp-gpx-maps.php:445
#: ../wp-gpx-maps.php:500
msgid "Total climbing"
msgstr "Total ascendido"
#: ../wp-gpx-maps.php:446
#: ../wp-gpx-maps.php:502
msgid "Total descent"
msgstr "Total descendido"
#: ../wp-gpx-maps.php:450
#: ../wp-gpx-maps.php:506
msgid "Average speed"
msgstr "Velocidad media"
#: ../wp-gpx-maps.php:466
#: ../wp-gpx-maps.php:511
#, fuzzy
msgid "Total Time"
msgstr "Distancia total"
#: ../wp-gpx-maps.php:527
msgid "Download"
msgstr "Descargar"
#: ../wp-gpx-maps_admin_settings.php:75
#: ../wp-gpx-maps_admin_settings.php:151
#: ../wp-gpx-maps_admin_settings.php:255
#: ../wp-gpx-maps_admin_settings.php:286
#: ../wp-gpx-maps_admin_settings.php:83 ../wp-gpx-maps_admin_settings.php:151
#: ../wp-gpx-maps_admin_settings.php:229 ../wp-gpx-maps_admin_settings.php:333
#: ../wp-gpx-maps_admin_settings.php:364
msgid "Save Changes"
msgstr "Salvar cambios"

View File

@ -2,85 +2,81 @@ msgid ""
msgstr ""
"Project-Id-Version: wp-gpx-maps\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-08-01 13:41+0100\n"
"PO-Revision-Date: 2012-08-01 13:41+0100\n"
"POT-Creation-Date: 2012-08-09 16:39+0100\n"
"PO-Revision-Date: 2012-08-09 16:39+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: it_IT\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-KeywordsList: __;_e\n"
"X-Poedit-Basepath: .\n"
"X-Poedit-Language: Italian\n"
"X-Poedit-Country: ITALY\n"
"X-Poedit-SearchPath-0: ..\n"
#: ../wp-gpx-maps.php:473
#: ../wp-gpx-maps.php:472
msgid "Altitude"
msgstr "Altitudine"
#: ../wp-gpx-maps.php:474
#: ../wp-gpx-maps.php:473
msgid "Current Position"
msgstr "Posizione Corrente"
#: ../wp-gpx-maps.php:475
#: ../wp-gpx-maps.php:474
msgid "Speed"
msgstr "Velocità"
#: ../wp-gpx-maps.php:476
#: ../wp-gpx-maps.php:475
msgid "Heart rate"
msgstr "Battito Cardiaco"
#: ../wp-gpx-maps.php:477
#: ../wp-gpx-maps.php:476
msgid "Cadence"
msgstr "Cadenza"
#: ../wp-gpx-maps.php:478
#: ../wp-gpx-maps.php:477
msgid "Go Full Screen"
msgstr "Schermo intero"
#: ../wp-gpx-maps.php:479
#: ../wp-gpx-maps.php:478
msgid "Exit Full Screen"
msgstr "Torna a dimensioni originali"
#: ../wp-gpx-maps.php:492
#: ../wp-gpx-maps.php:491
msgid "Total distance"
msgstr "Distanza totale"
#: ../wp-gpx-maps.php:497
#: ../wp-gpx-maps.php:496
msgid "Max elevation"
msgstr "Altitudine massima"
#: ../wp-gpx-maps.php:499
#: ../wp-gpx-maps.php:498
msgid "Min elevation"
msgstr "Altitudine minima"
#: ../wp-gpx-maps.php:501
#: ../wp-gpx-maps.php:500
msgid "Total climbing"
msgstr "Totale salita"
#: ../wp-gpx-maps.php:503
#: ../wp-gpx-maps.php:502
msgid "Total descent"
msgstr "Totale discesa"
#: ../wp-gpx-maps.php:507
#: ../wp-gpx-maps.php:506
msgid "Average speed"
msgstr "Velocità media"
#: ../wp-gpx-maps.php:512
#: ../wp-gpx-maps.php:511
#, fuzzy
msgid "Total Time"
msgstr "Distanza totale"
#: ../wp-gpx-maps.php:528
#: ../wp-gpx-maps.php:527
msgid "Download"
msgstr "Scarica"
#: ../wp-gpx-maps_admin_settings.php:83
#: ../wp-gpx-maps_admin_settings.php:151
#: ../wp-gpx-maps_admin_settings.php:229
#: ../wp-gpx-maps_admin_settings.php:333
#: ../wp-gpx-maps_admin_settings.php:83 ../wp-gpx-maps_admin_settings.php:151
#: ../wp-gpx-maps_admin_settings.php:229 ../wp-gpx-maps_admin_settings.php:333
#: ../wp-gpx-maps_admin_settings.php:364
msgid "Save Changes"
msgstr "Salva"

View File

@ -2,55 +2,80 @@ msgid ""
msgstr ""
"Project-Id-Version: wp-gpx-maps\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-21 14:24+0100\n"
"PO-Revision-Date: 2012-06-25 12:03+0100\n"
"POT-Creation-Date: 2012-08-09 16:39+0100\n"
"PO-Revision-Date: 2012-08-09 16:39+0100\n"
"Last-Translator: Simon Koelewijn\n"
"Language-Team: \n"
"Language: nl_NL\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-KeywordsList: __;_e\n"
"X-Poedit-Basepath: .\n"
"X-Poedit-Language: Dutch\n"
"X-Poedit-Country: NETHERLANDS\n"
"X-Poedit-SearchPath-0: ..\n"
#: ../wp-gpx-maps.php:348
#: ../wp-gpx-maps.php:472
msgid "Altitude"
msgstr "Hoogte"
#: ../wp-gpx-maps.php:349
#: ../wp-gpx-maps.php:473
msgid "Current Position"
msgstr "Huidige Positie"
#: ../wp-gpx-maps.php:350
#: ../wp-gpx-maps.php:474
msgid "Speed"
msgstr "Snelheid"
#: ../wp-gpx-maps.php:351
#: ../wp-gpx-maps.php:475
msgid "Heart rate"
msgstr "Hartslag"
#: ../wp-gpx-maps.php:352
#: ../wp-gpx-maps.php:476
msgid "Cadence"
msgstr "Cadans"
#: ../wp-gpx-maps.php:353
#: ../wp-gpx-maps.php:477
msgid "Go Full Screen"
msgstr "Volledige Scherm"
#: ../wp-gpx-maps.php:354
#: ../wp-gpx-maps.php:478
msgid "Exit Full Screen"
msgstr "Verlaat Volledige Scherm"
#: ../wp-gpx-maps.php:370
#: ../wp-gpx-maps.php:491
msgid "Total distance"
msgstr ""
#: ../wp-gpx-maps.php:496
msgid "Max elevation"
msgstr ""
#: ../wp-gpx-maps.php:498
msgid "Min elevation"
msgstr ""
#: ../wp-gpx-maps.php:500
msgid "Total climbing"
msgstr ""
#: ../wp-gpx-maps.php:502
msgid "Total descent"
msgstr ""
#: ../wp-gpx-maps.php:506
msgid "Average speed"
msgstr ""
#: ../wp-gpx-maps.php:511
msgid "Total Time"
msgstr ""
#: ../wp-gpx-maps.php:527
msgid "Download"
msgstr "Download"
#: ../wp-gpx-maps_admin_settings.php:67
#: ../wp-gpx-maps_admin_settings.php:143
#: ../wp-gpx-maps_admin_settings.php:245
#: ../wp-gpx-maps_admin_settings.php:276
#: ../wp-gpx-maps_admin_settings.php:83 ../wp-gpx-maps_admin_settings.php:151
#: ../wp-gpx-maps_admin_settings.php:229 ../wp-gpx-maps_admin_settings.php:333
#: ../wp-gpx-maps_admin_settings.php:364
msgid "Save Changes"
msgstr "Wijzigingen Opslaan"

View File

@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: wp-gpx-maps\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-25 11:54+0100\n"
"PO-Revision-Date: 2012-06-26 10:20+0100\n"
"POT-Creation-Date: 2012-08-09 16:39+0100\n"
"PO-Revision-Date: 2012-08-09 16:39+0100\n"
"Last-Translator: Per Bjälevik <per.bjalevik@tauzero.se>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -13,66 +13,69 @@ msgstr ""
"X-Poedit-Basepath: .\n"
"X-Poedit-SearchPath-0: ..\n"
#: ../wp-gpx-maps.php:420
#: ../wp-gpx-maps.php:472
msgid "Altitude"
msgstr "Höjd"
#: ../wp-gpx-maps.php:421
#: ../wp-gpx-maps.php:473
msgid "Current Position"
msgstr "Aktuell position"
#: ../wp-gpx-maps.php:422
#: ../wp-gpx-maps.php:474
msgid "Speed"
msgstr "Hastighet"
#: ../wp-gpx-maps.php:423
#: ../wp-gpx-maps.php:475
msgid "Heart rate"
msgstr "Hjärtfrekvens"
#: ../wp-gpx-maps.php:424
#: ../wp-gpx-maps.php:476
msgid "Cadence"
msgstr "Kadens"
#: ../wp-gpx-maps.php:425
#: ../wp-gpx-maps.php:477
msgid "Go Full Screen"
msgstr "Gå till fullskärm"
#: ../wp-gpx-maps.php:426
#: ../wp-gpx-maps.php:478
msgid "Exit Full Screen"
msgstr "Avsluta fullskärm"
#: ../wp-gpx-maps.php:439
#: ../wp-gpx-maps.php:491
msgid "Total distance"
msgstr "Total distans"
#: ../wp-gpx-maps.php:443
#: ../wp-gpx-maps.php:496
msgid "Max elevation"
msgstr "Max höjd"
#: ../wp-gpx-maps.php:444
#: ../wp-gpx-maps.php:498
msgid "Min elevation"
msgstr "Min höjd"
#: ../wp-gpx-maps.php:445
#: ../wp-gpx-maps.php:500
msgid "Total climbing"
msgstr "Höjdstigning"
#: ../wp-gpx-maps.php:446
#: ../wp-gpx-maps.php:502
msgid "Total descent"
msgstr "Höjdförlust"
#: ../wp-gpx-maps.php:450
#: ../wp-gpx-maps.php:506
msgid "Average speed"
msgstr "Medelhastighet"
#: ../wp-gpx-maps.php:466
#: ../wp-gpx-maps.php:511
#, fuzzy
msgid "Total Time"
msgstr "Total distans"
#: ../wp-gpx-maps.php:527
msgid "Download"
msgstr "Ladda ner"
#: ../wp-gpx-maps_admin_settings.php:75
#: ../wp-gpx-maps_admin_settings.php:151
#: ../wp-gpx-maps_admin_settings.php:255
#: ../wp-gpx-maps_admin_settings.php:286
#: ../wp-gpx-maps_admin_settings.php:83 ../wp-gpx-maps_admin_settings.php:151
#: ../wp-gpx-maps_admin_settings.php:229 ../wp-gpx-maps_admin_settings.php:333
#: ../wp-gpx-maps_admin_settings.php:364
msgid "Save Changes"
msgstr "Spara ändringar"

View File

@ -2,55 +2,80 @@ msgid ""
msgstr ""
"Project-Id-Version: wp-gpx-maps\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-20 19:00+0100\n"
"PO-Revision-Date: 2012-06-22 10:05+0100\n"
"POT-Creation-Date: 2012-08-09 16:39+0100\n"
"PO-Revision-Date: 2012-08-09 16:39+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: tr_TR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-KeywordsList: __;_e\n"
"X-Poedit-Basepath: .\n"
"X-Poedit-Language: Turkish\n"
"X-Poedit-Country: TURKEY\n"
"X-Poedit-SearchPath-0: ..\n"
#: ../wp-gpx-maps.php:348
#: ../wp-gpx-maps.php:472
msgid "Altitude"
msgstr "Rakım"
#: ../wp-gpx-maps.php:349
#: ../wp-gpx-maps.php:473
msgid "Current Position"
msgstr "Güncel Pozisyon"
#: ../wp-gpx-maps.php:350
#: ../wp-gpx-maps.php:474
msgid "Speed"
msgstr "Hız"
#: ../wp-gpx-maps.php:351
#: ../wp-gpx-maps.php:475
msgid "Heart rate"
msgstr "Nabız"
#: ../wp-gpx-maps.php:352
#: ../wp-gpx-maps.php:476
msgid "Cadence"
msgstr "Kadans"
#: ../wp-gpx-maps.php:353
#: ../wp-gpx-maps.php:477
msgid "Go Full Screen"
msgstr "Tam Ekran Gör"
#: ../wp-gpx-maps.php:354
#: ../wp-gpx-maps.php:478
msgid "Exit Full Screen"
msgstr "Tam Ekrandan Çık"
#: ../wp-gpx-maps.php:370
#: ../wp-gpx-maps.php:491
msgid "Total distance"
msgstr ""
#: ../wp-gpx-maps.php:496
msgid "Max elevation"
msgstr ""
#: ../wp-gpx-maps.php:498
msgid "Min elevation"
msgstr ""
#: ../wp-gpx-maps.php:500
msgid "Total climbing"
msgstr ""
#: ../wp-gpx-maps.php:502
msgid "Total descent"
msgstr ""
#: ../wp-gpx-maps.php:506
msgid "Average speed"
msgstr ""
#: ../wp-gpx-maps.php:511
msgid "Total Time"
msgstr ""
#: ../wp-gpx-maps.php:527
msgid "Download"
msgstr "İndir"
#: ../wp-gpx-maps_admin_settings.php:67
#: ../wp-gpx-maps_admin_settings.php:143
#: ../wp-gpx-maps_admin_settings.php:245
#: ../wp-gpx-maps_admin_settings.php:276
#: ../wp-gpx-maps_admin_settings.php:83 ../wp-gpx-maps_admin_settings.php:151
#: ../wp-gpx-maps_admin_settings.php:229 ../wp-gpx-maps_admin_settings.php:333
#: ../wp-gpx-maps_admin_settings.php:364
msgid "Save Changes"
msgstr ""

View File

@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
Tags: maps, gpx, gps, graph, chart, google maps, highcharts, track, garmin, image, nextgen-gallery, nextgen, exif, OpenStreetMap, OpenCycleMap, Hike&Bike, heart rate, heartrate, cadence
Requires at least: 2.0.0
Tested up to: 3.4
Stable tag: 1.1.33
Stable tag: 1.1.34
License: GPLv2 or later
Draws a gpx track with altitude graph. You can also display your nextgen gallery images in the map.
@ -165,6 +165,11 @@ Yes!
1. Altitude & Speed & Hearth rate
== Changelog ==
= 1.1.34 =
* 2 decimals for unit of measure min/km and min/mi
* translation file updated (a couple of phrases added)
* File list reverse order (from the newer to the older)
* nggallery integration: division by zero fixed
= 1.1.33 =
* Decimals reducted to 1 for unit of measure min/km and min/mi
* map zoom and center position is working with waypoints only files

View File

@ -3,7 +3,7 @@
Plugin Name: WP-GPX-Maps
Plugin URI: http://www.darwinner.it/
Description: Draws a gpx track with altitude graph
Version: 1.1.33
Version: 1.1.34
Author: Bastianon Massimo
Author URI: http://www.pedemontanadelgrappa.it/
License: GPL
@ -51,7 +51,7 @@ function enqueue_WP_GPX_Maps_scripts()
wp_enqueue_script( 'googleapis' );
wp_deregister_script( 'WP-GPX-Maps' );
wp_register_script( 'WP-GPX-Maps', plugins_url('/WP-GPX-Maps.js', __FILE__), array('jquery'), "1.1.33");
wp_register_script( 'WP-GPX-Maps', plugins_url('/WP-GPX-Maps.js', __FILE__), array('jquery'), "1.1.34");
wp_enqueue_script( 'WP-GPX-Maps' );
wp_deregister_script( 'highcharts' );
@ -575,7 +575,7 @@ function downloadRemoteFile($remoteFile)
try
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $remoteFile);
curl_setopt($ch, CURLOPT_URL, urlencode($remoteFile));
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,5);
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);

View File

@ -56,66 +56,77 @@
<?php
}
if ( is_readable ( $realGpxPath ) && $handle = opendir($realGpxPath)) {
?>
<table cellspacing="0" class="wp-list-table widefat plugins">
<thead>
<tr>
<th style="" class="manage-column" id="name" scope="col">File</th>
<th style="" class="manage-column" id="name" scope="col">Last modified</th>
<th style="" class="manage-column" id="name" scope="col">File size (Byte)</th>
</tr>
</thead>
<tfoot>
<tr>
<th style="" class="manage-column" id="name" scope="col">File</th>
<th style="" class="manage-column" id="name" scope="col">Last modified</th>
<th style="" class="manage-column" id="name" scope="col">File size (Byte)</th>
</tr>
</tfoot>
<tbody id="the-list">
<?php
if ( is_readable ( $realGpxPath ) && $handle = opendir($realGpxPath)) {
while (false !== ($entry = readdir($handle))) {
if (preg_match($gpxRegEx,$entry ))
{
$file = $realGpxPath . "/" . $entry;
?>
<tr>
<td style="border:none; padding-bottom:0;">
<strong><?php echo $entry; ?></strong>
</td>
<td style="border:none; padding-bottom:0;">
<?php echo date ("F d Y H:i:s.", filemtime( $file ) ) ?>
</td>
<td style="border:none; padding-bottom:0;">
<?php echo number_format ( filesize( $file ) , 0, '.', ',' ) ?>
</td>
</tr>
<tr>
<td colspan=3 style="padding: 0px 7px 7px 7px;">
<a href="#" onclick="delgpx('<?php echo $entry ?>'); return false;">Delete</a>
|
<a href="../wp-content/uploads/gpx/<?php echo $entry?>">Download</a>
|
Shortcode: [sgpx gpx="<?php echo $relativeGpxPath . $entry; ?>"]
</td>
</tr>
<?php
$filenames[] = $realGpxPath . "/" . $entry;
}
}
?>
</tbody>
</table>
<?php
closedir($handle);
} ?>
closedir($handle);
}
?>
<table cellspacing="0" class="wp-list-table widefat plugins">
<thead>
<tr>
<th style="" class="manage-column" id="name" scope="col">File</th>
<th style="" class="manage-column" id="name" scope="col">Last modified</th>
<th style="" class="manage-column" id="name" scope="col">File size (Byte)</th>
</tr>
</thead>
<tfoot>
<tr>
<th style="" class="manage-column" id="name" scope="col">File</th>
<th style="" class="manage-column" id="name" scope="col">Last modified</th>
<th style="" class="manage-column" id="name" scope="col">File size (Byte)</th>
</tr>
</tfoot>
<tbody id="the-list">
<?php
if ($filenames)
{
$filenames = array_reverse($filenames);
foreach ($filenames as $file) {
$entry = basename($file);
?>
<tr>
<td style="border:none; padding-bottom:0;">
<strong><?php echo $entry; ?></strong>
</td>
<td style="border:none; padding-bottom:0;">
<?php echo date ("F d Y H:i:s.", filemtime( $file ) ) ?>
</td>
<td style="border:none; padding-bottom:0;">
<?php echo number_format ( filesize( $file ) , 0, '.', ',' ) ?>
</td>
</tr>
<tr>
<td colspan=3 style="padding: 0px 7px 7px 7px;">
<a href="#" onclick="delgpx('<?php echo $entry ?>'); return false;">Delete</a>
|
<a href="../wp-content/uploads/gpx/<?php echo $entry?>">Download</a>
|
Shortcode: [sgpx gpx="<?php echo $relativeGpxPath . $entry; ?>"]
</td>
</tr>
<?php
}
}
?>
</tbody>
</table>
<script type="text/javascript">

View File

@ -94,8 +94,12 @@
if (count($parts) <= 0)
return 0;
if (count($parts) == 1)
return $parts[0];
return floatval($parts[0]) / floatval($parts[1]);
return $parts[0];
$lat = floatval($parts[0]);
$lon = floatval($parts[1]);
if ($lon == 0)
return $lat;
return $lat / $lon;
}
?>