From e239b0e09cdc0bb7c1e60c3065b28ec238f3eec5 Mon Sep 17 00:00:00 2001 From: metacube2 Date: Tue, 6 Aug 2024 10:44:57 +0200 Subject: [PATCH] Update index.html timelapse --- index.html | 224 +++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 202 insertions(+), 22 deletions(-) diff --git a/index.html b/index.html index 1ab1a4f..df7090a 100644 --- a/index.html +++ b/index.html @@ -3,6 +3,17 @@ session_start(); error_reporting(E_ALL); ini_set('display_errors', 1); + + +$imageDir = "./image"; // Angepasst an das Ausgabeverzeichnis des Bash-Skripts +$imageFiles = glob("$imageDir/screenshot_*.jpg"); +rsort($imageFiles); // Sortiert die Dateien in umgekehrter Reihenfolge (neueste zuerst) +$imageFilesJson = json_encode($imageFiles); + + + + + class WebcamManager { private $videoSrc = 'test_video.m3u8'; private $logoPath = 'logo.png'; @@ -25,7 +36,11 @@ class WebcamManager { unlink($outputFile); exit; } - + public function getImageFiles() { + $imageFiles = glob("image/*.{jpg,jpeg,png,gif}", GLOB_BRACE); + return json_encode($imageFiles); + } + public function captureVideoSequence($duration = 10) { $outputFile = 'sequence_' . date('YmdHis') . '.mp4'; $command = "ffmpeg -i {$this->videoSrc} -i {$this->logoPath} -filter_complex 'overlay=10:10' -t {$duration} -c:v libx264 -preset fast -crf 23 {$outputFile}"; @@ -325,6 +340,7 @@ class AdminManager { } $webcamManager = new WebcamManager(); +$imageFilesJson = $webcamManager->getImageFiles(); $guestbookManager = new GuestbookManager(); $contactManager = new ContactManager(); $adminManager = new AdminManager(); @@ -650,6 +666,86 @@ footer { } } +.recommendation-banner { + text-align: center; + padding: 20px; + background-color: rgba(255, 255, 255, 0.8); + margin-bottom: 20px; +} + +.sponsor-logos { + display: flex; + flex-direction: column; + align-items: center; +} + +.ad-row { + display: flex; + justify-content: center; + flex-wrap: wrap; + margin-bottom: 20px; +} + +.ad-item { + margin: 0 10px; + text-align: center; +} + +.ad-item img { + max-height: 40px; + width: auto; +} + +.ad-item p { + margin: 5px 0; + font-size: 14px; +} + + + + + + + + + + + + @@ -687,24 +783,40 @@ footer { Tag ein echo '

Unsere Empfehlungen

- '; -
-'; ?> @@ -724,12 +836,21 @@ echo '
-
- displayWebcam(); ?> -
-
@@ -741,7 +862,7 @@ echo '

Folge uns und kopiere den Code und sende es deinen Freunden in Tiktok, Facebook, Instagram usw

-
+

Klicke auf den QR-Code, um die URL zu kopieren

@@ -936,6 +1057,65 @@ function generateQRCode() { + + +