Revert main to dev deployment model: remove bootstrap and use ../backend/ paths
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -14,4 +14,4 @@
|
||||
|
||||
// Lade die neue Konfiguration
|
||||
require_once __DIR__ . '/mail-config.php';
|
||||
|
||||
?>
|
||||
|
||||
@@ -195,3 +195,4 @@ function getHexaHostConfig($key = null) {
|
||||
|
||||
return $config[$key] ?? null;
|
||||
}
|
||||
?>
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* HexaHost.de – zentrale Domain- und Umgebungskonfiguration
|
||||
*/
|
||||
|
||||
if (!defined('SITE_DOMAIN_PRODUCTION')) {
|
||||
define('SITE_DOMAIN_PRODUCTION', 'hexahost.de');
|
||||
}
|
||||
|
||||
if (!defined('SITE_DOMAIN_DEVELOPMENT')) {
|
||||
define('SITE_DOMAIN_DEVELOPMENT', 'dev.hexahost.de');
|
||||
}
|
||||
|
||||
/**
|
||||
* Aktuellen HTTP-Host (ohne Port) ermitteln
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* true, wenn die Seite unter der Dev-Domain läuft
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function isDevelopmentSite()
|
||||
{
|
||||
return getSiteHost() === SITE_DOMAIN_DEVELOPMENT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Basis-URL der aktuellen Anfrage (Schema + Host)
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function getSiteBaseUrl()
|
||||
{
|
||||
$https = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')
|
||||
|| (isset($_SERVER['SERVER_PORT']) && (int) $_SERVER['SERVER_PORT'] === 443);
|
||||
|
||||
$scheme = $https ? 'https' : 'http';
|
||||
|
||||
return $scheme . '://' . getSiteHost();
|
||||
}
|
||||
|
||||
/**
|
||||
* Erlaubte CORS-Origins für AJAX (Kontaktformular)
|
||||
*
|
||||
* @return array<int, string>
|
||||
*/
|
||||
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;
|
||||
}
|
||||
@@ -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'];
|
||||
}
|
||||
?>
|
||||
@@ -1,8 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<?php
|
||||
$configDir = defined('HEXAHOST_CONFIG_DIR') ? HEXAHOST_CONFIG_DIR : __DIR__ . '/../config';
|
||||
require_once $configDir . '/products-config.php';
|
||||
?>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
@@ -65,12 +61,8 @@ require_once $configDir . '/products-config.php';
|
||||
<li class="nav-dropdown">
|
||||
<a href="#" class="nav-link <?php echo (in_array($current_page, ['vpc', 'vps', 'mail-gateway', 'webhosting'])) ? 'active' : ''; ?>">Produkte</a>
|
||||
<ul class="dropdown-menu">
|
||||
<?php if (isProductVisible('vpc')): ?>
|
||||
<li><a href="/vpc" class="<?php echo ($current_page === 'vpc') ? 'active' : ''; ?>">Virtual Private Container</a></li>
|
||||
<?php endif; ?>
|
||||
<?php if (isProductVisible('vps')): ?>
|
||||
<li><a href="/vps" class="<?php echo ($current_page === 'vps') ? 'active' : ''; ?>">Virtual Private Server</a></li>
|
||||
<?php endif; ?>
|
||||
<li><a href="/mail-gateway" class="<?php echo ($current_page === 'mail-gateway') ? 'active' : ''; ?>">Mail Gateway</a></li>
|
||||
<li><a href="/webhosting" class="<?php echo ($current_page === 'webhosting') ? 'active' : ''; ?>">Webhosting</a></li>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user