diff --git a/servers/php/css/styles.css b/servers/php/css/styles.css index 27143ad..38b433d 100644 --- a/servers/php/css/styles.css +++ b/servers/php/css/styles.css @@ -1,9 +1,9 @@ body { /* background-color: #ccc; */ } -.container { +.container-fluid { border: 1px solid #aaa; - margin-top: 10px; + margin: 10px; } .routeSelectDark { background-color: #ccc; diff --git a/servers/php/displaymap-blue.php b/servers/php/displaymap-blue.php index 9485109..eaeddf7 100644 --- a/servers/php/displaymap-blue.php +++ b/servers/php/displaymap-blue.php @@ -17,12 +17,12 @@ to change themes, select a theme here: http://www.bootstrapcdn.com/#bootswatch_tab and then change the word after 3.2.0 in the following link to the new theme name --> - + -
+
- +
diff --git a/servers/php/displaymap-dark.php b/servers/php/displaymap-dark.php index 4bfce45..bb3b2dc 100644 --- a/servers/php/displaymap-dark.php +++ b/servers/php/displaymap-dark.php @@ -17,12 +17,12 @@ to change themes, select a theme here: http://www.bootstrapcdn.com/#bootswatch_tab and then change the word after 3.2.0 in the following link to the new theme name --> - + -
+
- +
@@ -56,4 +56,4 @@
- + \ No newline at end of file diff --git a/servers/php/displaymap.php b/servers/php/displaymap.php index 329bb9b..c2750e5 100644 --- a/servers/php/displaymap.php +++ b/servers/php/displaymap.php @@ -17,12 +17,12 @@ to change themes, select a theme here: http://www.bootstrapcdn.com/#bootswatch_tab and then change the word after 3.2.0 in the following link to the new theme name --> - + -
+
- +
diff --git a/servers/php/js/leaflet-plugins/google.js b/servers/php/js/leaflet-plugins/google.js index 60196b2..71848e6 100644 --- a/servers/php/js/leaflet-plugins/google.js +++ b/servers/php/js/leaflet-plugins/google.js @@ -5,7 +5,7 @@ License in same folder as this file */ -var adsense_status = 'disabled'; +var adsense_status = 'enabled'; L.Google = L.Class.extend( { includes: L.Mixin.Events, @@ -239,4 +239,4 @@ } } L.Google.asyncWait = []; -}; \ No newline at end of file +}; diff --git a/servers/php/js/maps.js b/servers/php/js/maps.js index b3882a4..ca990ae 100644 --- a/servers/php/js/maps.js +++ b/servers/php/js/maps.js @@ -354,7 +354,7 @@ function turnOffAutoRefresh() { showMessage('Auto Refresh Off'); - $('#autorefresh').val('Auto Refresh - Off'); + $('#autorefresh').val('Auto Refresh Off'); autoRefresh = false; clearInterval(intervalID); @@ -362,7 +362,7 @@ function turnOnAutoRefresh() { showMessage('Auto Refresh On (1 min)'); - $('#autorefresh').val('Auto Refresh - On'); + $('#autorefresh').val('Auto Refresh On'); autoRefresh = true; restartInterval(); @@ -386,8 +386,8 @@ if (hasMap()) { // comment out these two lines to get delete working - confirm("Disabled here on test website, this works fine."); - return false; + // confirm("Disabled here on test website, this works fine."); + // return false; var answer = confirm("This will permanently delete this route\n from the database. Do you want to delete?"); if (answer){ diff --git a/servers/php/mysql/gpstracker-09-14-14.sql b/servers/php/mysql/gpstracker-09-14-14.sql index b484d46..54667be 100644 --- a/servers/php/mysql/gpstracker-09-14-14.sql +++ b/servers/php/mysql/gpstracker-09-14-14.sql @@ -91,13 +91,11 @@ DELIMITER ;; CREATE DEFINER=`root`@`localhost` PROCEDURE `prcGetAllRoutesForMap`() BEGIN - SELECT sessionId, gpsTime, CONCAT('{ "latitude":"', CAST(latitude AS CHAR),'", "longitude":"', CAST(longitude AS CHAR), '", "speed":"', CAST(speed AS CHAR), '", "direction":"', CAST(direction AS CHAR), '", "distance":"', CAST(distance AS CHAR), '", "locationMethod":"', locationMethod, '", "gpsTime":"', DATE_FORMAT(gpsTime, '%b %e %Y %h:%i%p'), '", "userName":"', userName, '", "phoneNumber":"', phoneNumber, '", "sessionID":"', CAST(sessionID AS CHAR), '", "accuracy":"', CAST(accuracy AS CHAR), '", "extraInfo":"', extraInfo, '" }') json - FROM (SELECT MAX(GPSLocationID) ID - FROM gpslocations - WHERE sessionID != '0' && CHAR_LENGTH(sessionID) != 0 && gpstime != '0000-00-00 00:00:00' - GROUP BY sessionID) AS MaxID - JOIN gpslocations ON gpslocations.GPSLocationID = MaxID.ID - ORDER BY gpsTime; + SELECT DISTINCT(sessionId), MAX(gpsTime) gpsTime, + CONCAT('{ "latitude":"', CAST(latitude AS CHAR),'", "longitude":"', CAST(longitude AS CHAR), '", "speed":"', CAST(speed AS CHAR), '", "direction":"', CAST(direction AS CHAR), '", "distance":"', CAST(distance AS CHAR), '", "locationMethod":"', locationMethod, '", "gpsTime":"', DATE_FORMAT(gpsTime, '%b %e %Y %h:%i%p'), '", "userName":"', userName, '", "phoneNumber":"', phoneNumber, '", "sessionID":"', CAST(sessionID AS CHAR), '", "accuracy":"', CAST(accuracy AS CHAR), '", "extraInfo":"', extraInfo, '" }') json + FROM gpslocations + WHERE sessionID != '0' && CHAR_LENGTH(sessionID) != 0 && gpstime != '0000-00-00 00:00:00' + GROUP BY sessionID; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ;