diff --git a/functions.php b/functions.php index 6d5da75..9a36de2 100644 --- a/functions.php +++ b/functions.php @@ -7,8 +7,11 @@ $config_filename = 'config_times.json'; $timeRegex = '/^((2[0-3]|1[0-9]|0[0-9]|[^0-9][0-9]):([0-5][0-9]|[0-9]))/'; -$sun_zenith = 96; /* Civilian Twilight */ -//$sun_zenith = 90+50/60; /* "true" sunrise/ sunset */ +$sunsetTrue = 90+50/60; /* "true" sunrise/ sunset */ +$sunsetCivilian = 96; /* Civilian Twilight */ +$sunsetNautical = 102; /* Nauticla Twilight */ + +$sun_zenith = $sunsetCivilian; $timezone = "Europe/Berlin"; class LightStatus { diff --git a/index.php b/index.php index 24ecaec..a86ff43 100644 --- a/index.php +++ b/index.php @@ -69,30 +69,41 @@ if (isset($_GET['action'])) { -
+
-state) : ?>
- Licht: AN
-
- Licht: AUS
-
- Zeit bis nächste Änderung: changeTime === 1) ? $light->changeTime." Minute" : $light->changeTime." Minuten" ?>
-
Licht: | +state) ? 'EINGESCHALTET' + : 'AUSGESCHALTET';?> | +
Änderung in: | +changeTime === 1) ? $light->changeTime." Minute" : $light->changeTime." Minuten" ?> | +
- Sonnenaufgang: sunrise ?>
- Sonnenuntergang: sunset ?>
- Aktuelle Zeit:
-
Sonnenaufgang: | sunrise ?> | +
Sonnenuntergang: | sunset ?> | +
Aktuelle Zeit: | + |
Nacht (ja/nein): | isNight) ? "ja" : "nein" ?> | +