From b4c51f16bde8f0d598c0ce49b1cd9f954d1607ca Mon Sep 17 00:00:00 2001 From: tuutti Date: Mon, 22 Jun 2026 13:23:28 +0300 Subject: [PATCH] Removed list of recent image files. Download files via file.php controller --- web-gui/file.php | 34 +++++++++++++++++++++ web-gui/functions.php | 35 ++++++++++++++++++++++ web-gui/index.php | 25 ---------------- web-gui/upload.php | 70 +++++++------------------------------------ 4 files changed, 79 insertions(+), 85 deletions(-) create mode 100644 web-gui/file.php create mode 100644 web-gui/functions.php diff --git a/web-gui/file.php b/web-gui/file.php new file mode 100644 index 0000000..b2ac0e6 --- /dev/null +++ b/web-gui/file.php @@ -0,0 +1,34 @@ + + + + + + + + + +

Downloading ...

+

Please wait while the map is being generated. This may take up to 10 minutes.

. + + diff --git a/web-gui/functions.php b/web-gui/functions.php new file mode 100644 index 0000000..2f9ede6 --- /dev/null +++ b/web-gui/functions.php @@ -0,0 +1,35 @@ +load($file)) { + return FALSE; + } + + // Search for Kml->Document->Placemark elements. + $placemarks = $dom->getElementsByTagName('kml')->item(0) + ?->getElementsByTagName('Document')->item(0) + ?->getElementsByTagName('Placemark'); + + if (!$placemarks->length > 0) { + return FALSE; + } + + // Search for Placemark->name element with the value of "squadrats". + foreach ($placemarks as $placemark) { + $name = $placemark->getElementsByTagName('name')->item(0)?->textContent; + + if ($name === 'squadrats') { + return TRUE; + } + } + return FALSE; +} diff --git a/web-gui/index.php b/web-gui/index.php index 72d795f..37cf643 100644 --- a/web-gui/index.php +++ b/web-gui/index.php @@ -53,31 +53,6 @@
-

Img files: -

-

Short instructions: