Date: Sun, 18 Dec 2016 22:35:39 -0500
Subject: [PATCH 010/200] Fixes #117.
---
devel/datacheck.php | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/devel/datacheck.php b/devel/datacheck.php
index 70a7e639..ed14e573 100644
--- a/devel/datacheck.php
+++ b/devel/datacheck.php
@@ -56,9 +56,25 @@ function writeTable($db, $fpVal, $joins) {
+
+
Travel Mapping Highway Data Datacheck Errors
-Quick links: [Errors in Active Systems] [Errors in Preview Systems] [Errors in In-Dev Systems] [Errors Marked as FPs] .
+Quick links: [Errors in Active Systems] [Errors in Preview Systems] [Errors in In-Dev Systems]
+[Errors Marked as FPs].';
+}
+else {
+ echo '[Reload with Marked FPs Included] .';
+}
+?>
+
See also the [Log
of Unmatched FPs from datacheckfps.csv] and
@@ -121,6 +137,9 @@ function writeTable($db, $fpVal, $joins) {
?>
+
Errors Marked as FPs ("Crossed Off")
These have been marked as FPs
@@ -134,6 +153,9 @@ function writeTable($db, $fpVal, $joins) {
writeTable($tmdb, "1", " where ");
?>
+
From 41ccf1f42a57f4bc63ad9309d2d21cf2058053cf Mon Sep 17 00:00:00 2001
From: Jim Teresco
Date: Mon, 19 Dec 2016 22:20:47 -0500
Subject: [PATCH 011/200] Show only recent entries by default and sort for new
updates.csv entry format.
---
devel/updates.php | 87 ++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 79 insertions(+), 8 deletions(-)
diff --git a/devel/updates.php b/devel/updates.php
index 985d354d..d21a8546 100644
--- a/devel/updates.php
+++ b/devel/updates.php
@@ -32,14 +32,56 @@
Quick links: [Highway System Status Changes] [Updates to Highway Data in Active Systems] .
+
+Highway System Status Changes
-
-
+[Show
+".$nextEntry." Newest";
+ $nextEntry = $nextEntry * 2;
+ }
+ echo "All ".$totalSysUpdates." ";
+?>
+
+Entries]
+
-
Date Country/Region System Code System Description New Status
+ Date Country/Region System Code System Description New Status
fetch_assoc()) {
@@ -60,13 +102,42 @@
-
+Updates to Highway Data in Active Systems
+
+
+[Show
+".$nextEntry." Newest";
+ $nextEntry = $nextEntry * 2;
+ }
+ echo "All ".$totalUpdates." ";
+?>
+
+Entries]
+
Date Region Route File Root Description
fetch_assoc()) {
From c81c7f562f13797d1c97878144c48d609d476694 Mon Sep 17 00:00:00 2001
From: Jim Teresco
Date: Tue, 20 Dec 2016 16:11:24 -0500
Subject: [PATCH 012/200] Fix link from system.php to mapview.php from top
table.
---
user/system.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/user/system.php b/user/system.php
index f8471516..275ca9f9 100644
--- a/user/system.php
+++ b/user/system.php
@@ -254,7 +254,7 @@ function waypointsFromSQL() {
$row = tm_fetch_user_row_with_rank($res, 'clinchedMileage');
$res->free();
$percentage = $row['clinchedMileage'] / $system_mileage * 100;
- $link = "window.open('/user/mapview.php?u=" . $user . "&sys=" . $system . "')";
+ $link = "window.open('/user/mapview.php?u=" . $tmuser . "&sys=" . $system . "')";
echo "Miles Driven ".sprintf('%0.2f', $row['clinchedMileage'])." of ".sprintf('%0.2f', $system_mileage)." mi (".sprintf('%0.2f',$percentage)."%) Rank: {$row['rank']} ";
//Second, fetch routes clinched/driven
From f4a5a8d81cae553a5cc6b927d2b90d0cf59eb4ac Mon Sep 17 00:00:00 2001
From: Jim Teresco
Date: Tue, 20 Dec 2016 19:49:24 -0500
Subject: [PATCH 013/200] Change link from system.php to clinched.php instead
of mapview.php from top table.
---
user/system.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/user/system.php b/user/system.php
index 275ca9f9..3d5e4c39 100644
--- a/user/system.php
+++ b/user/system.php
@@ -254,7 +254,7 @@ function waypointsFromSQL() {
$row = tm_fetch_user_row_with_rank($res, 'clinchedMileage');
$res->free();
$percentage = $row['clinchedMileage'] / $system_mileage * 100;
- $link = "window.open('/user/mapview.php?u=" . $tmuser . "&sys=" . $system . "')";
+ $link = "window.open('/user/clinched.php?u=" . $tmuser . "&sys=" . $system . "')";
echo "Miles Driven ".sprintf('%0.2f', $row['clinchedMileage'])." of ".sprintf('%0.2f', $system_mileage)." mi (".sprintf('%0.2f',$percentage)."%) Rank: {$row['rank']} ";
//Second, fetch routes clinched/driven
From f19854366222b3749a250bca0828f303a2dcdedc Mon Sep 17 00:00:00 2001
From: Jim Teresco
Date: Tue, 20 Dec 2016 19:53:14 -0500
Subject: [PATCH 014/200] Corrected change of link from system.php to
clinched.php instead of mapview.php from top table.
---
user/system.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/user/system.php b/user/system.php
index 3d5e4c39..1a2e66bb 100644
--- a/user/system.php
+++ b/user/system.php
@@ -254,7 +254,7 @@ function waypointsFromSQL() {
$row = tm_fetch_user_row_with_rank($res, 'clinchedMileage');
$res->free();
$percentage = $row['clinchedMileage'] / $system_mileage * 100;
- $link = "window.open('/user/clinched.php?u=" . $tmuser . "&sys=" . $system . "')";
+ $link = "window.open('/shields/clinched.php?u=" . $tmuser . "&sys=" . $system . "')";
echo "Miles Driven ".sprintf('%0.2f', $row['clinchedMileage'])." of ".sprintf('%0.2f', $system_mileage)." mi (".sprintf('%0.2f',$percentage)."%) Rank: {$row['rank']} ";
//Second, fetch routes clinched/driven
From 419c186fc228ef482e5439c2dfdd2a1f4d8371be Mon Sep 17 00:00:00 2001
From: Jim Teresco
Date: Tue, 20 Dec 2016 22:59:15 -0500
Subject: [PATCH 015/200] Fix for #74.
---
user/index.php | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/user/index.php b/user/index.php
index a35adeec..cc182f1b 100644
--- a/user/index.php
+++ b/user/index.php
@@ -227,7 +227,27 @@
fetch_assoc()) {
if ($row['clinchedMileage'] == 0) continue;
From 16cd50bf57a43e876ed2325c3cce695e9983c493 Mon Sep 17 00:00:00 2001
From: Jim Teresco
Date: Wed, 21 Dec 2016 10:04:36 -0500
Subject: [PATCH 016/200] Fix for fix for #74.
---
user/index.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/user/index.php b/user/index.php
index cc182f1b..b46d099a 100644
--- a/user/index.php
+++ b/user/index.php
@@ -244,7 +244,9 @@
INNER JOIN systemMileageByRegion AS sm
ON sm.systemName = sys.systemName
LEFT JOIN clinchedSystemMileageByRegion AS csm
- ON csm.systemName = sys.systemName AND csm.traveler = '$tmuser'
+ ON sm.region = csm.region AND
+ csm.systemName = sys.systemName AND
+ csm.traveler = '$tmuser'
WHERE (sys.level = 'active' OR sys.level = 'preview')
GROUP BY sm.systemName;
SQL;
From 6bb43183a71b207396743b314135713199240ef0 Mon Sep 17 00:00:00 2001
From: Jim Teresco
Date: Wed, 21 Dec 2016 15:49:29 -0500
Subject: [PATCH 017/200] Sort updates by region as secondary criteria.
---
devel/updates.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/devel/updates.php b/devel/updates.php
index d21a8546..7a15b73e 100644
--- a/devel/updates.php
+++ b/devel/updates.php
@@ -132,11 +132,11 @@
Date: Wed, 21 Dec 2016 17:26:21 -0500
Subject: [PATCH 018/200] Sort updates by route as third criteria.
---
devel/updates.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/devel/updates.php b/devel/updates.php
index 7a15b73e..17d25723 100644
--- a/devel/updates.php
+++ b/devel/updates.php
@@ -132,11 +132,11 @@
Date: Wed, 4 Jan 2017 16:31:22 -0500
Subject: [PATCH 019/200] FL, NY, PA, and SC shields
FL has a 4-wide shield for FL9336.
NY has some suffixed 3-digit routes.
---
shields/template_usafl.svg | 1 +
shields/template_usafl_wide.svg | 1 +
shields/template_usafl_wide4.svg | 1 +
shields/template_usany.svg | 1 +
shields/template_usany_wide.svg | 1 +
shields/template_usany_wide4.svg | 1 +
shields/template_usapa.svg | 1 +
shields/template_usapa_wide.svg | 1 +
shields/template_usasc.svg | 1 +
shields/template_usasc_wide.svg | 1 +
10 files changed, 10 insertions(+)
create mode 100644 shields/template_usafl.svg
create mode 100644 shields/template_usafl_wide.svg
create mode 100644 shields/template_usafl_wide4.svg
create mode 100644 shields/template_usany.svg
create mode 100644 shields/template_usany_wide.svg
create mode 100644 shields/template_usany_wide4.svg
create mode 100644 shields/template_usapa.svg
create mode 100644 shields/template_usapa_wide.svg
create mode 100644 shields/template_usasc.svg
create mode 100644 shields/template_usasc_wide.svg
diff --git a/shields/template_usafl.svg b/shields/template_usafl.svg
new file mode 100644
index 00000000..c3f974f4
--- /dev/null
+++ b/shields/template_usafl.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usafl_wide.svg b/shields/template_usafl_wide.svg
new file mode 100644
index 00000000..5ce83986
--- /dev/null
+++ b/shields/template_usafl_wide.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usafl_wide4.svg b/shields/template_usafl_wide4.svg
new file mode 100644
index 00000000..e5a50134
--- /dev/null
+++ b/shields/template_usafl_wide4.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usany.svg b/shields/template_usany.svg
new file mode 100644
index 00000000..976718a5
--- /dev/null
+++ b/shields/template_usany.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usany_wide.svg b/shields/template_usany_wide.svg
new file mode 100644
index 00000000..f971d5e6
--- /dev/null
+++ b/shields/template_usany_wide.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usany_wide4.svg b/shields/template_usany_wide4.svg
new file mode 100644
index 00000000..169c1304
--- /dev/null
+++ b/shields/template_usany_wide4.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usapa.svg b/shields/template_usapa.svg
new file mode 100644
index 00000000..b154bbe9
--- /dev/null
+++ b/shields/template_usapa.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usapa_wide.svg b/shields/template_usapa_wide.svg
new file mode 100644
index 00000000..2db98dd3
--- /dev/null
+++ b/shields/template_usapa_wide.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usasc.svg b/shields/template_usasc.svg
new file mode 100644
index 00000000..d7d56dfd
--- /dev/null
+++ b/shields/template_usasc.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usasc_wide.svg b/shields/template_usasc_wide.svg
new file mode 100644
index 00000000..d7d56dfd
--- /dev/null
+++ b/shields/template_usasc_wide.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
From f63e922a13949b566e483309c9f34ecbd82a52e6 Mon Sep 17 00:00:00 2001
From: theFXexpert
Date: Wed, 4 Jan 2017 16:40:46 -0500
Subject: [PATCH 020/200] Almost made the same mistake again.
---
shields/template_usany_wide.svg | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/shields/template_usany_wide.svg b/shields/template_usany_wide.svg
index f971d5e6..01415e7a 100644
--- a/shields/template_usany_wide.svg
+++ b/shields/template_usany_wide.svg
@@ -1 +1 @@
-***NUMBER***
\ No newline at end of file
+***NUMBER***
From 94be1c28136e042a54f326b4d801353997a915a1 Mon Sep 17 00:00:00 2001
From: theFXexpert
Date: Wed, 4 Jan 2017 16:41:41 -0500
Subject: [PATCH 021/200] Almost made the same mistake again.
---
shields/template_usany_wide4.svg | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/shields/template_usany_wide4.svg b/shields/template_usany_wide4.svg
index 169c1304..abe06bda 100644
--- a/shields/template_usany_wide4.svg
+++ b/shields/template_usany_wide4.svg
@@ -1 +1 @@
-***NUMBER***
\ No newline at end of file
+***NUMBER***
From 67e2ce3f8bd15515e68a2eb7ff1977636ea1bf6e Mon Sep 17 00:00:00 2001
From: theFXexpert
Date: Wed, 4 Jan 2017 17:05:16 -0500
Subject: [PATCH 022/200] Add cases for 4-wide shields in FL and NY
---
shields/shieldgen.php | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/shields/shieldgen.php b/shields/shieldgen.php
index 24956712..73e55b5c 100644
--- a/shields/shieldgen.php
+++ b/shields/shieldgen.php
@@ -63,6 +63,16 @@ function generate($r, $force_reload = false)
}
$svg = str_replace("***NUMBER***", $routeNum, $svg);
break;
+
+ case 'usafl':
+ $routeNum = str_replace("FL", "", $row['route']);
+ if (strlen($routeNum) > 3) {
+ $svg = file_get_contents("{$dir}/template_usafl_wide4.svg");
+ } elseif (strlen($routeNum) > 2) {
+ $svg = file_get_contents("{$dir}/template_usafl_wide.svg");
+ }
+ $svg = str_replace("***NUMBER***", $routeNum, $svg);
+ break;
case 'usaky3': case 'usaky4': case 'usaky5': case 'usaky6': case 'usaky7': case 'usaky8': case 'usaky9':
$routeNum = str_replace("KY", "", $row['route']);
@@ -99,6 +109,16 @@ function generate($r, $force_reload = false)
$svg = str_replace("***NUMBER***", $routeNum, $svg);
$svg = str_replace("***SYS***", $region, $svg);
break;
+
+ case 'usany':
+ $routeNum = str_replace("NY", "", $row['route']);
+ if (strlen($routeNum) > 3) {
+ $svg = file_get_contents("{$dir}/template_usany_wide4.svg");
+ } elseif (strlen($routeNum) > 2) {
+ $svg = file_get_contents("{$dir}/template_usany_wide.svg");
+ }
+ $svg = str_replace("***NUMBER***", $routeNum, $svg);
+ break;
case 'gbnm':case 'nirm':
$routeNum = str_replace("M", "", $row['route']);
From 2ac4c8c34fd92671b0003b9eba1a31df8b39ab17 Mon Sep 17 00:00:00 2001
From: theFXexpert
Date: Fri, 6 Jan 2017 18:45:41 -0500
Subject: [PATCH 023/200] KS, MI, MN, MO, NE, NV, OH, UT, and WY shields
---
shields/template_usaks.svg | 1 +
shields/template_usaks_wide.svg | 1 +
shields/template_usami.svg | 1 +
shields/template_usami_wide.svg | 1 +
shields/template_usamn.svg | 1 +
shields/template_usamn_wide.svg | 1 +
shields/template_usamo.svg | 1 +
shields/template_usamo_wide.svg | 1 +
shields/template_usane.svg | 1 +
shields/template_usane_wide.svg | 1 +
shields/template_usanv.svg | 1 +
shields/template_usanv_wide.svg | 1 +
shields/template_usaoh.svg | 1 +
shields/template_usaoh_wide.svg | 1 +
shields/template_usaut.svg | 1 +
shields/template_usaut_wide.svg | 1 +
shields/template_usawy.svg | 1 +
shields/template_usawy_wide.svg | 1 +
18 files changed, 18 insertions(+)
create mode 100644 shields/template_usaks.svg
create mode 100644 shields/template_usaks_wide.svg
create mode 100644 shields/template_usami.svg
create mode 100644 shields/template_usami_wide.svg
create mode 100644 shields/template_usamn.svg
create mode 100644 shields/template_usamn_wide.svg
create mode 100644 shields/template_usamo.svg
create mode 100644 shields/template_usamo_wide.svg
create mode 100644 shields/template_usane.svg
create mode 100644 shields/template_usane_wide.svg
create mode 100644 shields/template_usanv.svg
create mode 100644 shields/template_usanv_wide.svg
create mode 100644 shields/template_usaoh.svg
create mode 100644 shields/template_usaoh_wide.svg
create mode 100644 shields/template_usaut.svg
create mode 100644 shields/template_usaut_wide.svg
create mode 100644 shields/template_usawy.svg
create mode 100644 shields/template_usawy_wide.svg
diff --git a/shields/template_usaks.svg b/shields/template_usaks.svg
new file mode 100644
index 00000000..71e87850
--- /dev/null
+++ b/shields/template_usaks.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usaks_wide.svg b/shields/template_usaks_wide.svg
new file mode 100644
index 00000000..c6bb6f8a
--- /dev/null
+++ b/shields/template_usaks_wide.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usami.svg b/shields/template_usami.svg
new file mode 100644
index 00000000..316ad6ae
--- /dev/null
+++ b/shields/template_usami.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usami_wide.svg b/shields/template_usami_wide.svg
new file mode 100644
index 00000000..df21f101
--- /dev/null
+++ b/shields/template_usami_wide.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usamn.svg b/shields/template_usamn.svg
new file mode 100644
index 00000000..bb27aaa8
--- /dev/null
+++ b/shields/template_usamn.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usamn_wide.svg b/shields/template_usamn_wide.svg
new file mode 100644
index 00000000..e7f9b3a9
--- /dev/null
+++ b/shields/template_usamn_wide.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usamo.svg b/shields/template_usamo.svg
new file mode 100644
index 00000000..00517901
--- /dev/null
+++ b/shields/template_usamo.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usamo_wide.svg b/shields/template_usamo_wide.svg
new file mode 100644
index 00000000..82478a9d
--- /dev/null
+++ b/shields/template_usamo_wide.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usane.svg b/shields/template_usane.svg
new file mode 100644
index 00000000..9c7b71a3
--- /dev/null
+++ b/shields/template_usane.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usane_wide.svg b/shields/template_usane_wide.svg
new file mode 100644
index 00000000..cea4caef
--- /dev/null
+++ b/shields/template_usane_wide.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usanv.svg b/shields/template_usanv.svg
new file mode 100644
index 00000000..a8e90957
--- /dev/null
+++ b/shields/template_usanv.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usanv_wide.svg b/shields/template_usanv_wide.svg
new file mode 100644
index 00000000..a8e90957
--- /dev/null
+++ b/shields/template_usanv_wide.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usaoh.svg b/shields/template_usaoh.svg
new file mode 100644
index 00000000..8d73a48a
--- /dev/null
+++ b/shields/template_usaoh.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usaoh_wide.svg b/shields/template_usaoh_wide.svg
new file mode 100644
index 00000000..a8668e16
--- /dev/null
+++ b/shields/template_usaoh_wide.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usaut.svg b/shields/template_usaut.svg
new file mode 100644
index 00000000..54d34060
--- /dev/null
+++ b/shields/template_usaut.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usaut_wide.svg b/shields/template_usaut_wide.svg
new file mode 100644
index 00000000..91e9bafd
--- /dev/null
+++ b/shields/template_usaut_wide.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usawy.svg b/shields/template_usawy.svg
new file mode 100644
index 00000000..866f6213
--- /dev/null
+++ b/shields/template_usawy.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usawy_wide.svg b/shields/template_usawy_wide.svg
new file mode 100644
index 00000000..ca4a5f7f
--- /dev/null
+++ b/shields/template_usawy_wide.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
From ff467d3729ec22c9362f8219d7a15d92a4cc6169 Mon Sep 17 00:00:00 2001
From: Rschen7754
Date: Sat, 7 Jan 2017 09:43:20 -0800
Subject: [PATCH 024/200] MA/ME shields
---
shields/shieldgen.php | 16 ++++++++++++++++
shields/template_usama.svg | 3 +++
shields/template_usama_wide.svg | 3 +++
shields/template_usame.svg | 3 +++
shields/template_usame_wide.svg | 3 +++
5 files changed, 28 insertions(+)
create mode 100644 shields/template_usama.svg
create mode 100644 shields/template_usama_wide.svg
create mode 100644 shields/template_usame.svg
create mode 100644 shields/template_usame_wide.svg
diff --git a/shields/shieldgen.php b/shields/shieldgen.php
index 73e55b5c..710a2813 100644
--- a/shields/shieldgen.php
+++ b/shields/shieldgen.php
@@ -73,6 +73,22 @@ function generate($r, $force_reload = false)
}
$svg = str_replace("***NUMBER***", $routeNum, $svg);
break;
+
+ case 'usama':
+ $routeNum = str_replace("MA", "", $row['route']);
+ if (strlen($routeNum) > 2) {
+ $svg = file_get_contents("{$dir}/template_usama_wide.svg");
+ }
+ $svg = str_replace("***NUMBER***", $routeNum, $svg);
+ break;
+
+ case 'usame':
+ $routeNum = str_replace("ME", "", $row['route']);
+ if (strlen($routeNum) > 2) {
+ $svg = file_get_contents("{$dir}/template_usame_wide.svg");
+ }
+ $svg = str_replace("***NUMBER***", $routeNum, $svg);
+ break;
case 'usaky3': case 'usaky4': case 'usaky5': case 'usaky6': case 'usaky7': case 'usaky8': case 'usaky9':
$routeNum = str_replace("KY", "", $row['route']);
diff --git a/shields/template_usama.svg b/shields/template_usama.svg
new file mode 100644
index 00000000..bea445c2
--- /dev/null
+++ b/shields/template_usama.svg
@@ -0,0 +1,3 @@
+
+***NUMBER***
+
diff --git a/shields/template_usama_wide.svg b/shields/template_usama_wide.svg
new file mode 100644
index 00000000..a341e61f
--- /dev/null
+++ b/shields/template_usama_wide.svg
@@ -0,0 +1,3 @@
+
+***NUMBER***
+
diff --git a/shields/template_usame.svg b/shields/template_usame.svg
new file mode 100644
index 00000000..bea445c2
--- /dev/null
+++ b/shields/template_usame.svg
@@ -0,0 +1,3 @@
+
+***NUMBER***
+
diff --git a/shields/template_usame_wide.svg b/shields/template_usame_wide.svg
new file mode 100644
index 00000000..a341e61f
--- /dev/null
+++ b/shields/template_usame_wide.svg
@@ -0,0 +1,3 @@
+
+***NUMBER***
+
From 8b30885c42874f83a89085c10e85cfffaaa032e4 Mon Sep 17 00:00:00 2001
From: Rschen7754
Date: Sat, 7 Jan 2017 09:55:28 -0800
Subject: [PATCH 025/200] alphabetical order
---
shields/shieldgen.php | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/shields/shieldgen.php b/shields/shieldgen.php
index 710a2813..33edb584 100644
--- a/shields/shieldgen.php
+++ b/shields/shieldgen.php
@@ -73,6 +73,11 @@ function generate($r, $force_reload = false)
}
$svg = str_replace("***NUMBER***", $routeNum, $svg);
break;
+
+ case 'usaky3': case 'usaky4': case 'usaky5': case 'usaky6': case 'usaky7': case 'usaky8': case 'usaky9':
+ $routeNum = str_replace("KY", "", $row['route']);
+ $svg = str_replace("***NUMBER***", $routeNum, $svg);
+ break;
case 'usama':
$routeNum = str_replace("MA", "", $row['route']);
@@ -90,11 +95,6 @@ function generate($r, $force_reload = false)
$svg = str_replace("***NUMBER***", $routeNum, $svg);
break;
- case 'usaky3': case 'usaky4': case 'usaky5': case 'usaky6': case 'usaky7': case 'usaky8': case 'usaky9':
- $routeNum = str_replace("KY", "", $row['route']);
- $svg = str_replace("***NUMBER***", $routeNum, $svg);
- break;
-
case 'usamt':
$routeNum = str_replace("MT", "", $row['route']);
if (strlen($routeNum) > 3) {
From 39cfe5cdb682283b8417de1bda47b1fbeda51d4e Mon Sep 17 00:00:00 2001
From: theFXexpert
Date: Sat, 7 Jan 2017 12:57:18 -0500
Subject: [PATCH 026/200] A more modular way to handle 4-wide shields
---
shields/shieldgen.php | 45 +++++++++++++------------------------------
1 file changed, 13 insertions(+), 32 deletions(-)
diff --git a/shields/shieldgen.php b/shields/shieldgen.php
index 73e55b5c..eaf263e4 100644
--- a/shields/shieldgen.php
+++ b/shields/shieldgen.php
@@ -63,32 +63,12 @@ function generate($r, $force_reload = false)
}
$svg = str_replace("***NUMBER***", $routeNum, $svg);
break;
-
- case 'usafl':
- $routeNum = str_replace("FL", "", $row['route']);
- if (strlen($routeNum) > 3) {
- $svg = file_get_contents("{$dir}/template_usafl_wide4.svg");
- } elseif (strlen($routeNum) > 2) {
- $svg = file_get_contents("{$dir}/template_usafl_wide.svg");
- }
- $svg = str_replace("***NUMBER***", $routeNum, $svg);
- break;
case 'usaky3': case 'usaky4': case 'usaky5': case 'usaky6': case 'usaky7': case 'usaky8': case 'usaky9':
$routeNum = str_replace("KY", "", $row['route']);
$svg = str_replace("***NUMBER***", $routeNum, $svg);
break;
- case 'usamt':
- $routeNum = str_replace("MT", "", $row['route']);
- if (strlen($routeNum) > 3) {
- $svg = file_get_contents("{$dir}/template_usamt_wide4.svg");
- } elseif (strlen($routeNum) > 2) {
- $svg = file_get_contents("{$dir}/template_usamt_wide.svg");
- }
- $svg = str_replace("***NUMBER***", $routeNum, $svg);
- break;
-
case 'usansf':
$region = explode(".", $r)[0];
$routeNum = str_replace(strtoupper($region), "", $row['route']);
@@ -109,17 +89,7 @@ function generate($r, $force_reload = false)
$svg = str_replace("***NUMBER***", $routeNum, $svg);
$svg = str_replace("***SYS***", $region, $svg);
break;
-
- case 'usany':
- $routeNum = str_replace("NY", "", $row['route']);
- if (strlen($routeNum) > 3) {
- $svg = file_get_contents("{$dir}/template_usany_wide4.svg");
- } elseif (strlen($routeNum) > 2) {
- $svg = file_get_contents("{$dir}/template_usany_wide.svg");
- }
- $svg = str_replace("***NUMBER***", $routeNum, $svg);
- break;
-
+
case 'gbnm':case 'nirm':
$routeNum = str_replace("M", "", $row['route']);
if (strlen($routeNum) > 2) {
@@ -155,7 +125,18 @@ function generate($r, $force_reload = false)
default:
$region = strtoupper(explode(".", $r)[0]);
$routeNum = str_replace($region, "", $row['route']);
- if (strlen($routeNum) > 2) {
+ if (strlen($routeNum) > 3) {
+ if (file_exists("{$dir}/template_" . $row['systemName'] . "_wide4.svg")) {
+ $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide4.svg");
+ }
+ elseif (file_exists("{$dir}/template_" . $row['systemName'] . "_wide.svg")) {
+ $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide.svg");
+ }
+ else {
+ $svg = file_get_contents("{$dir}/generic_wide.svg");
+ }
+ }
+ elseif (strlen($routeNum) > 2) {
if (file_exists("{$dir}/template_" . $row['systemName'] . "_wide.svg")) {
$svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide.svg");
} else {
From 6add996f006c6e0d472b4667728c597faa6be42a Mon Sep 17 00:00:00 2001
From: Rschen7754
Date: Sat, 7 Jan 2017 11:02:31 -0800
Subject: [PATCH 027/200] undo redundant changes to shieldgen.php
---
shields/shieldgen.php | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/shields/shieldgen.php b/shields/shieldgen.php
index 33edb584..73e55b5c 100644
--- a/shields/shieldgen.php
+++ b/shields/shieldgen.php
@@ -78,22 +78,6 @@ function generate($r, $force_reload = false)
$routeNum = str_replace("KY", "", $row['route']);
$svg = str_replace("***NUMBER***", $routeNum, $svg);
break;
-
- case 'usama':
- $routeNum = str_replace("MA", "", $row['route']);
- if (strlen($routeNum) > 2) {
- $svg = file_get_contents("{$dir}/template_usama_wide.svg");
- }
- $svg = str_replace("***NUMBER***", $routeNum, $svg);
- break;
-
- case 'usame':
- $routeNum = str_replace("ME", "", $row['route']);
- if (strlen($routeNum) > 2) {
- $svg = file_get_contents("{$dir}/template_usame_wide.svg");
- }
- $svg = str_replace("***NUMBER***", $routeNum, $svg);
- break;
case 'usamt':
$routeNum = str_replace("MT", "", $row['route']);
From 5dfcfb017b1ca6a092b408eb6cd8fc6c111030b9 Mon Sep 17 00:00:00 2001
From: Rschen7754
Date: Sat, 7 Jan 2017 11:05:29 -0800
Subject: [PATCH 028/200] add missing '
---
shields/template_usama.svg | 2 +-
shields/template_usama_wide.svg | 2 +-
shields/template_usame.svg | 2 +-
shields/template_usame_wide.svg | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/shields/template_usama.svg b/shields/template_usama.svg
index bea445c2..fb94d3ab 100644
--- a/shields/template_usama.svg
+++ b/shields/template_usama.svg
@@ -1,3 +1,3 @@
-***NUMBER***
+***NUMBER***
diff --git a/shields/template_usama_wide.svg b/shields/template_usama_wide.svg
index a341e61f..0cb1e03a 100644
--- a/shields/template_usama_wide.svg
+++ b/shields/template_usama_wide.svg
@@ -1,3 +1,3 @@
-***NUMBER***
+***NUMBER***
diff --git a/shields/template_usame.svg b/shields/template_usame.svg
index bea445c2..fb94d3ab 100644
--- a/shields/template_usame.svg
+++ b/shields/template_usame.svg
@@ -1,3 +1,3 @@
-***NUMBER***
+***NUMBER***
diff --git a/shields/template_usame_wide.svg b/shields/template_usame_wide.svg
index a341e61f..0cb1e03a 100644
--- a/shields/template_usame_wide.svg
+++ b/shields/template_usame_wide.svg
@@ -1,3 +1,3 @@
-***NUMBER***
+***NUMBER***
From 4ee551d0d893955741a838cd470a9a29e06eb467 Mon Sep 17 00:00:00 2001
From: theFXexpert
Date: Sat, 7 Jan 2017 19:09:23 -0500
Subject: [PATCH 029/200] HI, NM, OR, and SD shields
---
shields/template_usahi.svg | 1 +
shields/template_usahi_wide.svg | 1 +
shields/template_usahi_wide4.svg | 1 +
shields/template_usanm.svg | 1 +
shields/template_usanm_wide.svg | 1 +
shields/template_usanm_wide4.svg | 1 +
shields/template_usaor.svg | 1 +
shields/template_usaor_wide.svg | 1 +
shields/template_usaor_wide4.svg | 1 +
shields/template_usasd.svg | 1 +
shields/template_usasd_wide.svg | 1 +
shields/template_usasd_wide4.svg | 1 +
12 files changed, 12 insertions(+)
create mode 100644 shields/template_usahi.svg
create mode 100644 shields/template_usahi_wide.svg
create mode 100644 shields/template_usahi_wide4.svg
create mode 100644 shields/template_usanm.svg
create mode 100644 shields/template_usanm_wide.svg
create mode 100644 shields/template_usanm_wide4.svg
create mode 100644 shields/template_usaor.svg
create mode 100644 shields/template_usaor_wide.svg
create mode 100644 shields/template_usaor_wide4.svg
create mode 100644 shields/template_usasd.svg
create mode 100644 shields/template_usasd_wide.svg
create mode 100644 shields/template_usasd_wide4.svg
diff --git a/shields/template_usahi.svg b/shields/template_usahi.svg
new file mode 100644
index 00000000..1fd1388a
--- /dev/null
+++ b/shields/template_usahi.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usahi_wide.svg b/shields/template_usahi_wide.svg
new file mode 100644
index 00000000..c681e169
--- /dev/null
+++ b/shields/template_usahi_wide.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usahi_wide4.svg b/shields/template_usahi_wide4.svg
new file mode 100644
index 00000000..13951e67
--- /dev/null
+++ b/shields/template_usahi_wide4.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usanm.svg b/shields/template_usanm.svg
new file mode 100644
index 00000000..96c60468
--- /dev/null
+++ b/shields/template_usanm.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usanm_wide.svg b/shields/template_usanm_wide.svg
new file mode 100644
index 00000000..174c670a
--- /dev/null
+++ b/shields/template_usanm_wide.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usanm_wide4.svg b/shields/template_usanm_wide4.svg
new file mode 100644
index 00000000..afddf6d3
--- /dev/null
+++ b/shields/template_usanm_wide4.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usaor.svg b/shields/template_usaor.svg
new file mode 100644
index 00000000..3f0f0bcc
--- /dev/null
+++ b/shields/template_usaor.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usaor_wide.svg b/shields/template_usaor_wide.svg
new file mode 100644
index 00000000..5d1290d3
--- /dev/null
+++ b/shields/template_usaor_wide.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usaor_wide4.svg b/shields/template_usaor_wide4.svg
new file mode 100644
index 00000000..19f8e5df
--- /dev/null
+++ b/shields/template_usaor_wide4.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usasd.svg b/shields/template_usasd.svg
new file mode 100644
index 00000000..e042e0c2
--- /dev/null
+++ b/shields/template_usasd.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usasd_wide.svg b/shields/template_usasd_wide.svg
new file mode 100644
index 00000000..31731ffa
--- /dev/null
+++ b/shields/template_usasd_wide.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
diff --git a/shields/template_usasd_wide4.svg b/shields/template_usasd_wide4.svg
new file mode 100644
index 00000000..f57c4f41
--- /dev/null
+++ b/shields/template_usasd_wide4.svg
@@ -0,0 +1 @@
+***NUMBER***
\ No newline at end of file
From b26024db8dcbf5a149bba9dea13fd8fccac30a2f Mon Sep 17 00:00:00 2001
From: michihdeu
Date: Sun, 8 Jan 2017 10:20:27 +0100
Subject: [PATCH 030/200] deub shield
---
shields/template_deub.svg | 9 +++++++++
1 file changed, 9 insertions(+)
create mode 100644 shields/template_deub.svg
diff --git a/shields/template_deub.svg b/shields/template_deub.svg
new file mode 100644
index 00000000..923265e1
--- /dev/null
+++ b/shields/template_deub.svg
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+***NUMBER***
+
+
From bb94bc2357441e20c2707cc2aad704aafe0f5a43 Mon Sep 17 00:00:00 2001
From: michihdeu
Date: Sun, 8 Jan 2017 10:24:14 +0100
Subject: [PATCH 031/200] Revert "Line breaks under "Travel Mapping Highway
Data""
This reverts commit ebfa7a47911ba74e79dd777f5cf9fdb6f1538d68.
---
index.php | 39 ++++++++++++++-------------------------
1 file changed, 14 insertions(+), 25 deletions(-)
diff --git a/index.php b/index.php
index cb8542e0..10428aab 100644
--- a/index.php
+++ b/index.php
@@ -17,10 +17,10 @@
Travel Mapping is a collaborative project implemented and maintained
by a group of travel
-enthusiasts who enjoy tracking their cumulative highway travels. This
+enthusiasts who enjoy tracking their cumulative highway travels. This
site allows its users to submit lists of
highway segments they've traveled on the highway
-systems that have been included in the project. Those lists are
+systems that have been included in the project. Those lists are
then imported into the project's database, to be included along with
other users' stats and maps.
@@ -60,35 +60,24 @@
echo tm_count_rows("systems", "WHERE level='active'");
?>
-"active" systems. Active systems are those which we believe are
+"active" systems. Active systems are those which we believe are
accurate and complete, and for which any changes that affect users
will be noted in the highway data
-updates table .
-
-
-
-An additional
+updates table. An additional
systems are in "preview" status, which means they are substantially
-complete, but still undergoing final revisions. These may still
+complete, but still undergoing final revisions. These may still
undergo significant changes without notification.
-
-
-
-
- more are in development but are not yet complete.
-
-
-
-Active system encompass
+ more are in development but are not yet complete. Active system
+encompass
@@ -112,7 +101,7 @@
-Anyone can submit their travels to be included in the site. Please
+Anyone can submit their travels to be included in the site. Please
see the information in the project forum for how
to create and submit your data.
@@ -122,7 +111,7 @@
Once your data is in the system, you will be listed on the
main traveler stats page , and you can see a
-summary of your travels on your user page . Click
+summary of your travels on your user page . Click
around on the various links and table entries to find more ways to see
your travels, both as tabular statistics and plotted on maps.
@@ -130,13 +119,13 @@
-Some experienced users volunteer to help the project. If this
+Some experienced users volunteer to help the project. If this
interests you, start by reporting problems with existing highway data.
Those who have learned the project's structure and highway data rules
and guidelines can help greatly by providing review of new highway
-systems in development. Highly experienced users can learn how to
+systems in development. Highly experienced users can learn how to
plot new highway systems under the guidance of experienced
-contributors. Again, see the project forum for
+contributors. Again, see the project forum for
more information.
@@ -145,8 +134,8 @@
Highway data is updated almost daily
as corrections are made and progress is made on systems in
-development. When a highway system is deemed correct and complete to
-the best of our knowledge, it becomes "active". Here are the newest
+development. When a highway system is deemed correct and complete to
+the best of our knowledge, it becomes "active". Here are the newest
systems to become active, with their activation dates:
Date: Sat, 7 Jan 2017 09:34:59 -0500
Subject: [PATCH 032/200] update .gitignore
---
.gitignore | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.gitignore b/.gitignore
index 3351eb66..fa61639d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
shields/unoptimized
devel/test.php
.idea/
+lib/tm.conf
+local.sh
From b3517921de0b84e94dbcf1664adca826925cba57 Mon Sep 17 00:00:00 2001
From: Thing342
Date: Sat, 7 Jan 2017 20:59:52 -0500
Subject: [PATCH 033/200] Separate out waypoint ops for hb
---
api/waypoints.js.php | 180 +++++++++++++++++++++++++++++++++++++++++++
hb/index.php | 49 +-----------
2 files changed, 182 insertions(+), 47 deletions(-)
create mode 100644 api/waypoints.js.php
diff --git a/api/waypoints.js.php b/api/waypoints.js.php
new file mode 100644
index 00000000..9e2554df
--- /dev/null
+++ b/api/waypoints.js.php
@@ -0,0 +1,180 @@
+ 0) {
+ $select_regions = $select_regions.")";
+ $where_regions = $where_regions.")";
+ }
+
+ // select based on system?
+ $systems = tm_qs_multi_or_comma_to_array("sys");
+
+ // restrict to waypoints matching routes whose system is given in the "sys=" query string parameter
+ $select_systems = "";
+ $where_systems = "";
+ $num_systems = 0;
+ foreach ($systems as $system) {
+ if ($num_systems == 0) {
+ $select_systems = " and (routes.systemName='".$system."'";
+ $where_systems = " where (routes.systemName='".$system."'";
+ }
+ else {
+ $select_systems = $select_systems." or routes.systemName='".$system."'";
+ $where_systems = $where_systems." or routes.systemName='".$system."'";
+ }
+ $num_systems = $num_systems + 1;
+ }
+ if ($num_systems > 0) {
+ $select_systems = $select_systems.")";
+ $where_systems = $where_systems.")";
+ }
+
+ if (array_key_exists("rte", $_GET)) {
+ $rteClause = " where (routes.route like '".$_GET['rte']."' or route regexp '".$_GET['rte']."[a-z]')";
+ $rteClause = str_replace("*", "%", $rteClause);
+ if (array_key_exists('rg', $_GET)) $rteClause .= " AND ".orClauseBuilder('rg', 'region','routes');
+ if (array_key_exists('sys', $_GET)) $rteClause .= " AND ".orClauseBuilder('sys', 'systemName','routes');
+ $sql_command = "SELECT waypoints.pointName, waypoints.latitude, waypoints.longitude, waypoints.root, systems.tier, systems.color, systems.systemname FROM waypoints JOIN routes ON routes.root = waypoints.root JOIN systems ON routes.systemname = systems.systemname AND ".$activeClause." ".$rteClause." ORDER BY root, waypoints.pointId;";
+ } elseif (($num_systems == 0) && ($num_regions == 0)) {
+ // for now, put in a default to usai, do something better later
+ $select_systems = " and (routes.systemName='usai')";
+ $where_systems = " where (routes.systemName='usai')";
+ $sql_command = "SELECT waypoints.pointName, waypoints.latitude, waypoints.longitude, waypoints.root, systems.tier, systems.color, systems.systemname FROM waypoints JOIN routes ON routes.root = waypoints.root".$select_regions.$select_systems." JOIN systems ON routes.systemname = systems.systemname AND ".$activeClause." ORDER BY root, waypoints.pointId;";
+ } else {
+ $sql_command = "SELECT waypoints.pointName, waypoints.latitude, waypoints.longitude, waypoints.root, systems.tier, systems.color, systems.systemname FROM waypoints JOIN routes ON routes.root = waypoints.root".$select_regions.$select_systems." JOIN systems ON routes.systemname = systems.systemname AND ".$activeClause." ORDER BY root, waypoints.pointId;";
+ }
+
+ $res = tmdb_query($sql_command);
+
+ $routenum = 0;
+ $pointnum = 0;
+ $lastRoute = "";
+ while ($row = $res->fetch_assoc()) {
+ if (!($row['root'] == $lastRoute)) {
+ echo "newRouteIndices[".$routenum."] = ".$pointnum.";\n";
+ echo "routeTier[".$routenum."] = ".$row['tier'].";\n";
+ echo "routeColor[".$routenum."] = '".$row['color']."';\n";
+ echo "routeSystem[".$routenum."] = '".$row['systemname']."';\n";
+ $lastRoute = $row['root'];
+ $routenum = $routenum + 1;
+ }
+ echo "waypoints[".$pointnum."] = new Waypoint(\"".$row['pointName']."\",".$row['latitude'].",".$row['longitude']."); // Route = ".$row['root']." (".$row['color'].")\n";
+ $pointnum = $pointnum + 1;
+ }
+
+ // check for query string parameter for traveler clinched mapping of route
+ if (array_key_exists("u",$_GET)) {
+ echo "// select_systems: ".$select_systems."\n";
+ echo "// where_systems: ".$where_systems."\n";
+ echo "traveler = '".$_GET['u']."';\n";
+ // retrieve list of segments for this region or regions
+ if(isset($rteClause)) {
+ $sql_command = "SELECT segments.segmentId, segments.root FROM segments JOIN routes ON routes.root = segments.root JOIN systems ON routes.systemname = systems.systemname AND ".$activeClause." ".$rteClause." ORDER BY root, segments.segmentId;";
+ } else {
+ $sql_command = "SELECT segments.segmentId, segments.root FROM segments JOIN routes ON routes.root = segments.root JOIN systems ON routes.systemname = systems.systemname AND ".$activeClause." ".$where_regions.$select_systems." ORDER BY root, segments.segmentId;";
+ }
+ $res = tmdb_query($sql_command);
+ $segmentIndex = 0;
+ while ($row = $res->fetch_assoc()) {
+ echo "segments[".$segmentIndex."] = ".$row['segmentId']."; // route=".$row['root']."\n";
+ $segmentIndex = $segmentIndex + 1;
+ }
+ if(isset($rteClause)) {
+ $sql_command = "SELECT segments.segmentId, segments.root FROM segments RIGHT JOIN clinched ON segments.segmentId = clinched.segmentId JOIN routes ON routes.root = segments.root JOIN systems ON routes.systemname = systems.systemname AND ".$activeClause." ".$rteClause." AND clinched.traveler='".$_GET['u']."' ORDER BY root, segments.segmentId;";
+ } else {
+ $sql_command = "SELECT segments.segmentId, segments.root FROM segments RIGHT JOIN clinched ON segments.segmentId = clinched.segmentId JOIN routes ON routes.root = segments.root JOIN systems ON routes.systemname = systems.systemname AND ".$activeClause." ".$where_regions.$select_systems." AND clinched.traveler='".$_GET['u']."' ORDER BY root, segments.segmentId;";
+ }
+ $res = tmdb_query($sql_command);
+ $segmentIndex = 0;
+ while ($row = $res->fetch_assoc()) {
+ echo "clinched[".$segmentIndex."] = ".$row['segmentId']."; // route=".$row['root']."\n";
+ $segmentIndex = $segmentIndex + 1;
+ }
+ echo "mapClinched = true;\n";
+ }
+
+ // insert custom color code if needed
+ tm_generate_custom_colors_array();
+ }
+
+ function select_single_route ()
+ {
+ $routeparam = $_GET['r'];
+
+ if (array_key_exists('u', $_GET)) {
+ $tmuser = $_GET['u'];
+ } else {
+ $tmuser = "";
+ }
+
+ if ($routeparam != "") {
+ // select all waypoints matching the root given in the "r=" query string parameter
+ $sql_command = "SELECT pointName, latitude, longitude FROM waypoints WHERE root = '" . $routeparam . "';";
+ $res = tmdb_query($sql_command);
+ $pointnum = 0;
+ while ($row = $res->fetch_assoc()) {
+ echo "waypoints[" . $pointnum . "] = new Waypoint(\"" . $row['pointName'] . "\"," . $row['latitude'] . "," . $row['longitude'] . ");\n";
+ $pointnum = $pointnum + 1;
+ }
+ $res->free();
+ } else {
+ // nothing to select waypoints, we're done
+ echo "return;\n";
+ }
+ // check for query string parameter for traveler clinched mapping of route
+ if ($tmuser != "") {
+ echo "traveler = '" . $tmuser . "';\n";
+ if ($routeparam != "") {
+ // retrieve list of segments for this route
+ echo "// SQL: select segmentId from segments where root = '" . $routeparam . "';\n";
+ $sql_command = "SELECT segmentId FROM segments WHERE root = '" . $routeparam . "';";
+ $res = tmdb_query($sql_command);
+ $segmentIndex = 0;
+ while ($row = $res->fetch_assoc()) {
+ echo "segments[" . $segmentIndex . "] = " . $row['segmentId'] . ";\n";
+ $segmentIndex = $segmentIndex + 1;
+ }
+ $res->free();
+ $sql_command = "SELECT segments.segmentId FROM segments RIGHT JOIN clinched ON segments.segmentId = clinched.segmentId WHERE segments.root='" . $routeparam . "' AND clinched.traveler='" . $tmuser . "';";
+ $res = tmdb_query($sql_command);
+ $segmentIndex = 0;
+ while ($row = $res->fetch_assoc()) {
+ echo "clinched[" . $segmentIndex . "] = " . $row['segmentId'] . ";\n";
+ $segmentIndex = $segmentIndex + 1;
+ }
+ $res->free();
+ }
+ echo "mapClinched = true;\n";
+ }
+ }
+?>
+
+function waypointsFromSQL() {
+
+ genEdges = true;
+}
\ No newline at end of file
diff --git a/hb/index.php b/hb/index.php
index 10551c1a..59a94e2a 100644
--- a/hb/index.php
+++ b/hb/index.php
@@ -142,53 +142,8 @@
-
+
-
-
-
-
+
+
Travel Mapping: Draft Map Overlay Viewer
diff --git a/user/region.php b/user/region.php
index 274029e4..9a06fa43 100644
--- a/user/region.php
+++ b/user/region.php
@@ -89,66 +89,7 @@
-
+
-
- $sql_command = "SELECT segments.segmentId, segments.root FROM segments RIGHT JOIN clinched ON segments.segmentId = clinched.segmentId JOIN routes ON routes.root = segments.root JOIN systems ON routes.systemname = systems.systemname WHERE ".$select_region."routes.systemName = '".$system."' AND clinched.traveler='".$tmuser."' ORDER BY root, segments.segmentId;";
- $res = tmdb_query($sql_command);
- $segmentIndex = 0;
- while ($row = $res->fetch_assoc()) {
- echo "clinched[".$segmentIndex."] = ".$row['segmentId']."; // route=".$row['root']."\n";
- $segmentIndex = $segmentIndex + 1;
- }
- $res->free();
-
- echo "mapClinched = true;\n";
-
- // insert custom color code if needed
- tm_generate_custom_colors_array();
- ?>
- genEdges = true;
- }
-
Date: Sat, 7 Jan 2017 22:47:21 -0500
Subject: [PATCH 035/200] Updated documentation and added some error checking
---
api/waypoints.js.php | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/api/waypoints.js.php b/api/waypoints.js.php
index 9e2554df..1ffba46c 100644
--- a/api/waypoints.js.php
+++ b/api/waypoints.js.php
@@ -1,5 +1,25 @@
Date: Sat, 7 Jan 2017 23:36:44 -0500
Subject: [PATCH 036/200] modified to improve UX when loading
---
api/waypoints.js.php | 4 +++-
user/mapview.php | 5 +++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/api/waypoints.js.php b/api/waypoints.js.php
index 1ffba46c..89b94897 100644
--- a/api/waypoints.js.php
+++ b/api/waypoints.js.php
@@ -197,4 +197,6 @@ function waypointsFromSQL() {
else { select_route_set(); }
?>
genEdges = true;
-}
\ No newline at end of file
+}
+
+
\ No newline at end of file
diff --git a/user/mapview.php b/user/mapview.php
index f7ce8b46..6202d6dc 100644
--- a/user/mapview.php
+++ b/user/mapview.php
@@ -114,9 +114,8 @@
-
+
-
Travel Mapping: Draft Map Overlay Viewer
@@ -282,4 +281,6 @@ function initFloatingHeaders($table) {
close();
?>
+
+