From 7ce96b0c85e924d609533bdf7609cd47e4cab579 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20M=C3=BCller?=
Date: Tue, 31 Mar 2026 20:36:15 +0200
Subject: [PATCH] Sternhimmlel verbessert
---
config/skyview.sql | 30 +++
public/footer.php | 5 +-
public/header.php | 27 ++-
public/sternenhimmel.php | 154 +-----------
scripts/import/import_meteorshowers.php | 306 ++++++++++++++++++++++++
5 files changed, 364 insertions(+), 158 deletions(-)
create mode 100644 scripts/import/import_meteorshowers.php
diff --git a/config/skyview.sql b/config/skyview.sql
index 4d4e4b0..e1342f1 100644
--- a/config/skyview.sql
+++ b/config/skyview.sql
@@ -244,6 +244,36 @@ CREATE TABLE IF NOT EXISTS `dso_objects` (
-- Daten-Export vom Benutzer nicht ausgewählt
+-- Exportiere Struktur von Tabelle d0467f49.meteoshowers
+CREATE TABLE IF NOT EXISTS `meteoshowers` (
+ `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
+ `shower_code` varchar(16) NOT NULL,
+ `designation` varchar(255) NOT NULL,
+ `iau_no` int(10) unsigned DEFAULT NULL,
+ `speed` double DEFAULT NULL,
+ `radiant_alpha` double DEFAULT NULL,
+ `radiant_delta` double DEFAULT NULL,
+ `drift_alpha` double DEFAULT NULL,
+ `drift_delta` double DEFAULT NULL,
+ `parent_obj` varchar(255) DEFAULT NULL,
+ `pidx` double DEFAULT NULL,
+ `activity_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`activity_json`)),
+ `source_entry_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`source_entry_json`)),
+ `source_dataset_name` varchar(128) DEFAULT NULL,
+ `source_dataset_version` int(10) unsigned DEFAULT NULL,
+ `created_at` datetime NOT NULL DEFAULT current_timestamp(),
+ `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `uq_meteoshowers_shower_code` (`shower_code`),
+ UNIQUE KEY `uq_meteoshowers_iau_no` (`iau_no`),
+ KEY `idx_meteoshowers_designation` (`designation`),
+ KEY `idx_meteoshowers_parent_obj` (`parent_obj`),
+ KEY `idx_meteoshowers_speed` (`speed`),
+ KEY `idx_meteoshowers_pidx` (`pidx`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+
+-- Daten-Export vom Benutzer nicht ausgewählt
+
-- Exportiere Struktur von Tabelle d0467f49.geo_places
CREATE TABLE IF NOT EXISTS `geo_places` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
diff --git a/public/footer.php b/public/footer.php
index 2381a94..b9df2b9 100644
--- a/public/footer.php
+++ b/public/footer.php
@@ -1,3 +1,6 @@
+
@@ -14,7 +17,7 @@
-
+
diff --git a/public/header.php b/public/header.php
index e72951e..5dc217e 100644
--- a/public/header.php
+++ b/public/header.php
@@ -12,6 +12,7 @@ $headerIntroPre = isset($headerIntroPre) && is_string($headerIntroPre) ? trim($h
$headerIntroTitle = isset($headerIntroTitle) && is_string($headerIntroTitle) ? trim($headerIntroTitle) : '';
$headerIntroSub = isset($headerIntroSub) && is_string($headerIntroSub) ? trim($headerIntroSub) : '';
$showHeaderIntro = $headerIntroPre !== '' || $headerIntroTitle !== '' || $headerIntroSub !== '';
+$publicBasePath = isset($publicBasePath) && is_string($publicBasePath) ? rtrim($publicBasePath, '/') . '/' : '';
$pdoHeader = isset($pdo) ? $pdo : null;
$isAdmin = $loggedIn && (($_SESSION['role'] ?? '') === 'admin');
$pendingApprovals = 0;
@@ -81,7 +82,7 @@ $adminLinks = [
= htmlspecialchars($title, ENT_QUOTES, 'UTF-8') ?>
-
+
>
@@ -96,8 +97,8 @@ $adminLinks = [
// Bilder vorladen
const imgRound = new Image();
const imgRays = new Image();
- imgRound.src = 'images/star16x16.png';
- imgRays.src = 'images/star16x16_rays.png';
+ imgRound.src = = json_encode($publicBasePath . 'images/star16x16.png', JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) ?>;
+ imgRays.src = = json_encode($publicBasePath . 'images/star16x16_rays.png', JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) ?>;
function resize() {
canvas.width = window.innerWidth;
@@ -155,11 +156,11 @@ $adminLinks = [