From d0e5baa44316619f34e39751f8d7e0a14bb49662 Mon Sep 17 00:00:00 2001 From: smueller Date: Fri, 22 May 2026 14:10:21 +0200 Subject: [PATCH] Revert main to dev deployment model: remove bootstrap and use ../backend/ paths Co-authored-by: Cursor --- README.md | 5 - backend/config/config.php | 2 +- backend/config/mail-config.php | 1 + backend/config/products-config.php | 95 +++-- backend/config/site-config.php | 81 ----- backend/includes/functions.php | 67 +--- backend/includes/header.php | 8 - public/404.php | 2 +- public/500.php | 2 +- public/about.php | 2 +- public/agb.php | 2 +- public/assets/css/custom.css | 49 --- public/assets/css/style.css | 2 +- public/bootstrap.php | 73 ---- public/config/config.php | 17 - public/config/mail-config.php | 197 ---------- public/config/products-config.php | 556 ----------------------------- public/config/site-config.php | 81 ----- public/contact-handler.php | 15 +- public/contact.php | 7 +- public/datenschutz.php | 2 +- public/impressum.php | 4 +- public/includes/footer.php | 167 --------- public/includes/functions.php | 163 --------- public/includes/header.php | 89 ----- public/index.php | 11 +- public/it-dienstleistungen.php | 2 +- public/mail-gateway.php | 4 +- public/vpc.php | 4 +- public/vps.php | 4 +- public/webhosting.php | 8 +- public/widerruf.php | 2 +- scripts/sync-backend-to-public.ps1 | 23 -- 33 files changed, 76 insertions(+), 1671 deletions(-) delete mode 100644 backend/config/site-config.php delete mode 100644 public/bootstrap.php delete mode 100644 public/config/config.php delete mode 100644 public/config/mail-config.php delete mode 100644 public/config/products-config.php delete mode 100644 public/config/site-config.php delete mode 100644 public/includes/footer.php delete mode 100644 public/includes/functions.php delete mode 100644 public/includes/header.php delete mode 100644 scripts/sync-backend-to-public.ps1 diff --git a/README.md b/README.md index c164cd8..2449d77 100644 --- a/README.md +++ b/README.md @@ -147,11 +147,6 @@ HexaHost-Frontend/ cp -r HexaHost-Backend/includes/* HexaHost-Frontend/public/includes/ ``` - Alternativ (Windows, aus diesem Repo mit `backend/`): - ```powershell - .\scripts\sync-backend-to-public.ps1 - ``` - 3. **PHP Dependencies installieren** ```bash cd HexaHost-Frontend/public diff --git a/backend/config/config.php b/backend/config/config.php index 8edeb67..60968a7 100644 --- a/backend/config/config.php +++ b/backend/config/config.php @@ -14,4 +14,4 @@ // Lade die neue Konfiguration require_once __DIR__ . '/mail-config.php'; - +?> diff --git a/backend/config/mail-config.php b/backend/config/mail-config.php index 01f5700..46f0164 100644 --- a/backend/config/mail-config.php +++ b/backend/config/mail-config.php @@ -195,3 +195,4 @@ function getHexaHostConfig($key = null) { return $config[$key] ?? null; } +?> \ No newline at end of file diff --git a/backend/config/products-config.php b/backend/config/products-config.php index 80a3040..74e128a 100644 --- a/backend/config/products-config.php +++ b/backend/config/products-config.php @@ -10,9 +10,6 @@ * $packages = getProductPackages('vpc'); */ -// Temporär ausgeblendete Produkte (einfach IDs aus dieser Liste entfernen, um sie wieder im Shop anzuzeigen) -$HIDDEN_PRODUCTS = ['vpc', 'vps']; - // ============================================================================ // VIRTUAL PRIVATE CONTAINER (VPC) // ============================================================================ @@ -268,6 +265,8 @@ $PRODUCTS['mail-gateway'] = [ 'Webmail', 'IMAP/POP3', 'SSL/TLS Verschlüsselung', + 'E-Mail Archivierung (30 Tage)', + 'Kalender & Kontakte', ], ], 'professional' => [ @@ -286,6 +285,9 @@ $PRODUCTS['mail-gateway'] = [ 'Webmail', 'IMAP/POP3', 'SSL/TLS Verschlüsselung', + 'E-Mail Archivierung (1 Jahr)', + 'Kalender & Kontakte', + 'ActiveSync für Mobile', ], ], 'enterprise' => [ @@ -304,6 +306,9 @@ $PRODUCTS['mail-gateway'] = [ 'Webmail', 'IMAP/POP3', 'SSL/TLS Verschlüsselung', + 'E-Mail Archivierung (10 Jahre)', + 'Kalender & Kontakte', + 'ActiveSync für Mobile', 'Dedizierte IP', 'Priority Support', ], @@ -317,56 +322,50 @@ $PRODUCTS['mail-gateway'] = [ $PRODUCTS['webhosting'] = [ 'name' => 'Webhosting', 'short_name' => 'Webhosting', - 'description' => 'Klassisches Hosting mit PHP, MySQL und SSL. WordPress-ready mit Plesk Webhosting.', - 'min_price' => '2,99', + 'description' => 'Klassisches Hosting mit PHP, MySQL und SSL', + 'min_price' => '1,99', 'hero_highlight' => 'Alles für Ihre Website', 'hero_description' => 'Klassisches Webhosting mit allem, was Sie für eine erfolgreiche Website benötigen. PHP, MySQL, SSL-Zertifikate und E-Mail-Postfächer - alles inklusive.', 'packages_title' => 'Webhosting Pakete', 'packages_description' => 'Von der ersten Website bis zum professionellen Online-Shop', 'cta_title' => 'Bereit für Ihr Webhosting?', 'cta_description' => 'Starten Sie noch heute mit professionellem Webhosting', - 'page_title' => 'Webhosting - Klassisches Hosting für Websites - WordPress-ready | HexaHost.de', - 'page_description' => 'Webhosting mit PHP, MySQL und SSL-Zertifikaten. Klassisches Hosting für Websites - WordPress-ready ab 2,99€/Monat bei HexaHost.de', + 'page_title' => 'Webhosting - Klassisches Hosting für Websites | HexaHost.de', + 'page_description' => 'Webhosting mit PHP, MySQL und SSL-Zertifikaten. Klassisches Hosting für Websites ab 1,99€/Monat bei HexaHost.de', 'packages' => [ 'starter' => [ 'name' => 'Webhosting Starter', - 'price' => '2,99', + 'price' => '1,99', 'featured' => false, 'specs' => [ - ['label' => 'Webspace', 'value' => '10 GB'], + ['label' => 'Webspace', 'value' => '5 GB'], ['label' => 'Domains', 'value' => '1'], - ['label' => 'Subdomains', 'value' => '5'], - ['label' => 'Domain Aliase', 'value' => '2'], - ['label' => 'E-Mail-Postfächer', 'value' => '10'], - ['label' => 'Datenbanken', 'value' => '2 MySQL'], - ['label' => 'Traffic', 'value' => '100 GB'], + ['label' => 'E-Mail-Postfächer', 'value' => '5'], + ['label' => 'Datenbanken', 'value' => '1 MySQL'], + ['label' => 'Traffic', 'value' => '10 GB'], ], 'features' => [ - 'Plesk Webhosting', - 'PHP 8.4', - 'Git, WP Toolkit, Composer', + 'cPanel/Webmin', + 'PHP 8.1', 'SSL-Zertifikat', 'E-Mail-Postfächer', - 'MySQL Datenbanken', + 'MySQL Datenbank', ], ], 'business' => [ 'name' => 'Webhosting Business', - 'price' => '7,99', + 'price' => '4,99', 'featured' => true, 'specs' => [ - ['label' => 'Webspace', 'value' => '30 GB'], - ['label' => 'Domains Inkl.', 'value' => '1'], - ['label' => 'Subdomains', 'value' => '10'], - ['label' => 'Domain Aliase', 'value' => '2'], - ['label' => 'E-Mail-Postfächer', 'value' => '20'], + ['label' => 'Webspace', 'value' => '20 GB'], + ['label' => 'Domains', 'value' => '5'], + ['label' => 'E-Mail-Postfächer', 'value' => '25'], ['label' => 'Datenbanken', 'value' => '5 MySQL'], - ['label' => 'Traffic', 'value' => '100 GB'], + ['label' => 'Traffic', 'value' => '50 GB'], ], 'features' => [ - 'Plesk Webhosting', - 'PHP 8.4', - 'Git, WP Toolkit, Composer', + 'cPanel/Webmin', + 'PHP 8.1', 'SSL-Zertifikat', 'E-Mail-Postfächer', 'MySQL Datenbanken', @@ -375,21 +374,18 @@ $PRODUCTS['webhosting'] = [ ], 'professional' => [ 'name' => 'Webhosting Professional', - 'price' => '13,99', + 'price' => '9,99', 'featured' => false, 'specs' => [ ['label' => 'Webspace', 'value' => '50 GB'], - ['label' => 'Domains Inkl.', 'value' => '1'], - ['label' => 'Subdomains', 'value' => 'unbegrenzt'], - ['label' => 'Domain Aliase', 'value' => 'unbegrenzt'], - ['label' => 'E-Mail-Postfächer', 'value' => '20'], - ['label' => 'Datenbanken', 'value' => '20 MySQL'], - ['label' => 'Traffic', 'value' => '100 GB'], + ['label' => 'Domains', 'value' => 'Unbegrenzt'], + ['label' => 'E-Mail-Postfächer', 'value' => '100'], + ['label' => 'Datenbanken', 'value' => 'Unbegrenzt'], + ['label' => 'Traffic', 'value' => '200 GB'], ], 'features' => [ - 'Plesk Webhosting', - 'PHP 8.4', - 'Git, WP Toolkit, Composer', + 'cPanel/Webmin', + 'PHP 8.1', 'SSL-Zertifikat', 'E-Mail-Postfächer', 'MySQL Datenbanken', @@ -403,17 +399,14 @@ $PRODUCTS['webhosting'] = [ 'featured' => false, 'specs' => [ ['label' => 'Webspace', 'value' => '100 GB'], - ['label' => 'Domains Inkl.', 'value' => '3'], - ['label' => 'Subdomains', 'value' => 'unbegrenzt'], - ['label' => 'Domain Aliase', 'value' => 'unbegrenzt'], - ['label' => 'E-Mail-Postfächer', 'value' => '100'], + ['label' => 'Domains', 'value' => 'Unbegrenzt'], + ['label' => 'E-Mail-Postfächer', 'value' => 'Unbegrenzt'], ['label' => 'Datenbanken', 'value' => 'Unbegrenzt'], - ['label' => 'Traffic', 'value' => '1 TB'], + ['label' => 'Traffic', 'value' => '500 GB'], ], 'features' => [ - 'Plesk Webhosting', - 'PHP 8.4', - 'Git, WP Toolkit, Composer', + 'cPanel/Webmin', + 'PHP 8.1', 'SSL-Zertifikat', 'E-Mail-Postfächer', 'MySQL Datenbanken', @@ -445,14 +438,6 @@ function getProduct($productId) { return $PRODUCTS[$productId] ?? null; } -/** - * Prüft, ob ein Produkt im Shop angezeigt werden soll - */ -function isProductVisible($productId) { - global $HIDDEN_PRODUCTS; - return !in_array($productId, $HIDDEN_PRODUCTS, true); -} - /** * Alle Pakete eines Produkts abrufen */ @@ -553,4 +538,4 @@ function renderAllPackages($productId) { } return $html; } - +?> diff --git a/backend/config/site-config.php b/backend/config/site-config.php deleted file mode 100644 index 711eb1e..0000000 --- a/backend/config/site-config.php +++ /dev/null @@ -1,81 +0,0 @@ - - */ -function getAllowedOrigins() -{ - return [ - 'https://' . SITE_DOMAIN_PRODUCTION, - 'https://www.' . SITE_DOMAIN_PRODUCTION, - 'https://' . SITE_DOMAIN_DEVELOPMENT, - 'http://localhost', - 'http://127.0.0.1', - 'http://localhost:8000', - ]; -} - -/** - * Kanonische Basis-URL für SEO (Produktion immer hexahost.de) - * - * @return string - */ -function getCanonicalBaseUrl() -{ - return 'https://' . SITE_DOMAIN_PRODUCTION; -} diff --git a/backend/includes/functions.php b/backend/includes/functions.php index 9ed31ce..24d736c 100644 --- a/backend/includes/functions.php +++ b/backend/includes/functions.php @@ -3,67 +3,6 @@ * Helper functions for HexaHost.de */ -$configDir = defined('HEXAHOST_CONFIG_DIR') - ? HEXAHOST_CONFIG_DIR - : __DIR__ . '/../config'; - -$siteConfigFile = $configDir . '/site-config.php'; -if (is_file($siteConfigFile)) { - require_once $siteConfigFile; -} elseif (!function_exists('getSiteHost')) { - define('SITE_DOMAIN_PRODUCTION', 'hexahost.de'); - define('SITE_DOMAIN_DEVELOPMENT', 'dev.hexahost.de'); - - function getSiteHost() - { - $host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : SITE_DOMAIN_PRODUCTION; - $host = strtolower($host); - if (strpos($host, ':') !== false) { - $host = explode(':', $host, 2)[0]; - } - return $host; - } - - function isDevelopmentSite() - { - return getSiteHost() === SITE_DOMAIN_DEVELOPMENT; - } - - function getSiteBaseUrl() - { - $https = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') - || (isset($_SERVER['SERVER_PORT']) && (int) $_SERVER['SERVER_PORT'] === 443); - return ($https ? 'https' : 'http') . '://' . getSiteHost(); - } - - function getAllowedOrigins() - { - return [ - 'https://' . SITE_DOMAIN_PRODUCTION, - 'https://www.' . SITE_DOMAIN_PRODUCTION, - 'https://' . SITE_DOMAIN_DEVELOPMENT, - 'http://localhost', - 'http://127.0.0.1', - 'http://localhost:8000', - ]; - } - - function getCanonicalBaseUrl() - { - return 'https://' . SITE_DOMAIN_PRODUCTION; - } -} - -// Fehleranzeige auf Dev/localhost für einfacheres Debugging -$hexahostHost = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : ''; -if ( - (function_exists('isDevelopmentSite') && isDevelopmentSite()) - || preg_match('/^(localhost|127\.0\.0\.1)(:\d+)?$/', $hexahostHost) -) { - ini_set('display_errors', '1'); - ini_set('display_startup_errors', '1'); -} - // Sichere Session-Konfiguration if (session_status() === PHP_SESSION_NONE) { // Session-Cookie-Sicherheit @@ -112,11 +51,6 @@ function includeHeader($title = '', $description = '', $page = '', $scripts = [] $current_page = $page; $additional_scripts = $scripts; - - if (!isset($canonical_url)) { - $requestPath = parse_url($_SERVER['REQUEST_URI'] ?? '/', PHP_URL_PATH) ?: '/'; - $canonical_url = rtrim(getCanonicalBaseUrl(), '/') . $requestPath; - } include __DIR__ . '/header.php'; } @@ -161,3 +95,4 @@ function generateCSRFToken() { } return $_SESSION['csrf_token']; } +?> \ No newline at end of file diff --git a/backend/includes/header.php b/backend/includes/header.php index 2f74089..82629a5 100644 --- a/backend/includes/header.php +++ b/backend/includes/header.php @@ -1,8 +1,4 @@ - @@ -65,12 +61,8 @@ require_once $configDir . '/products-config.php';