Update file inclusion paths in multiple PHP files: Adjusted paths to use the new backend directory structure, ensuring consistent access to functions and configuration files across the application.
This commit is contained in:
17
backend/config/config.php
Normal file
17
backend/config/config.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
/**
|
||||
* HexaHost.de Konfiguration
|
||||
*
|
||||
* HINWEIS: Diese Datei ist veraltet!
|
||||
*
|
||||
* Die Konfiguration wurde nach mail-config.php verschoben.
|
||||
* Bitte verwenden Sie stattdessen:
|
||||
*
|
||||
* require_once 'config/mail-config.php';
|
||||
*
|
||||
* Diese Datei wird nur aus Kompatibilitätsgründen beibehalten.
|
||||
*/
|
||||
|
||||
// Lade die neue Konfiguration
|
||||
require_once __DIR__ . '/mail-config.php';
|
||||
?>
|
||||
198
backend/config/mail-config.php
Normal file
198
backend/config/mail-config.php
Normal file
@@ -0,0 +1,198 @@
|
||||
<?php
|
||||
/**
|
||||
* HexaHost.de Mail Configuration
|
||||
*
|
||||
* Bitte passen Sie die folgenden SMTP-Einstellungen an Ihre E-Mail-Provider an.
|
||||
*
|
||||
* Beispiele für gängige Provider:
|
||||
*
|
||||
* Gmail:
|
||||
* - SMTP_HOST = 'smtp.gmail.com'
|
||||
* - SMTP_PORT = 587
|
||||
* - SMTP_USERNAME = 'ihre-email@gmail.com'
|
||||
* - SMTP_PASSWORD = 'ihr-app-passwort'
|
||||
*
|
||||
* Outlook/Hotmail:
|
||||
* - SMTP_HOST = 'smtp-mail.outlook.com'
|
||||
* - SMTP_PORT = 587
|
||||
*
|
||||
* GMX:
|
||||
* - SMTP_HOST = 'mail.gmx.net'
|
||||
* - SMTP_PORT = 587
|
||||
*
|
||||
* Web.de:
|
||||
* - SMTP_HOST = 'smtp.web.de'
|
||||
* - SMTP_PORT = 587
|
||||
*
|
||||
* 1&1:
|
||||
* - SMTP_HOST = 'smtp.1und1.de'
|
||||
* - SMTP_PORT = 587
|
||||
*
|
||||
* Strato:
|
||||
* - SMTP_HOST = 'smtp.strato.de'
|
||||
* - SMTP_PORT = 587
|
||||
*
|
||||
* Ionos:
|
||||
* - SMTP_HOST = 'smtp.ionos.de'
|
||||
* - SMTP_PORT = 587
|
||||
*/
|
||||
|
||||
// SMTP Server Einstellungen
|
||||
define('SMTP_HOST', 'smtp.ihre-domain.de'); // Ihr SMTP-Server
|
||||
define('SMTP_PORT', 587); // SMTP-Port (meist 587 oder 465)
|
||||
define('SMTP_USERNAME', 'kontakt@ihre-domain.de'); // Ihr SMTP-Benutzername
|
||||
define('SMTP_PASSWORD', 'ihr-smtp-passwort'); // Ihr SMTP-Passwort
|
||||
|
||||
// E-Mail Adressen
|
||||
define('SMTP_FROM_EMAIL', 'kontakt@hexahost.de'); // Absender-E-Mail (muss zu SMTP_USERNAME passen)
|
||||
define('SMTP_TO_EMAIL', 'info@hexahost.de'); // Empfänger-E-Mail für Kontaktformular
|
||||
|
||||
// Sicherheitseinstellungen
|
||||
define('ENABLE_CSRF_PROTECTION', true); // CSRF-Schutz aktivieren
|
||||
define('ENABLE_RATE_LIMITING', true); // Rate-Limiting aktivieren
|
||||
define('MAX_REQUESTS_PER_HOUR', 10); // Max. Anfragen pro Stunde
|
||||
|
||||
// Spam-Schutz Einstellungen
|
||||
define('ENABLE_SPAM_PROTECTION', true); // Spam-Schutz aktivieren
|
||||
define('MAX_MESSAGE_LENGTH', 5000); // Max. Nachrichtenlänge
|
||||
define('MIN_MESSAGE_LENGTH', 10); // Min. Nachrichtenlänge
|
||||
|
||||
// Debug-Einstellungen (nur für Entwicklung)
|
||||
define('DEBUG_MODE', false); // Debug-Modus (true/false)
|
||||
define('LOG_EMAILS', true); // E-Mails loggen (true/false)
|
||||
|
||||
// Zusätzliche Sicherheitsheader
|
||||
define('ADDITIONAL_HEADERS', [
|
||||
'X-Mailer' => 'HexaHost.de Contact Form',
|
||||
'X-Priority' => '3',
|
||||
'X-MSMail-Priority' => 'Normal',
|
||||
'Importance' => 'Normal',
|
||||
'X-Report-Abuse' => 'Please report abuse here: abuse@hexahost.de',
|
||||
'List-Unsubscribe' => '<mailto:unsubscribe@hexahost.de>',
|
||||
'Precedence' => 'bulk'
|
||||
]);
|
||||
|
||||
// Erlaubte Domains für E-Mail-Adressen (optional)
|
||||
define('ALLOWED_EMAIL_DOMAINS', [
|
||||
// Leer lassen für alle Domains zu erlauben
|
||||
// 'gmail.com',
|
||||
// 'outlook.com',
|
||||
// 'web.de',
|
||||
// 'gmx.de'
|
||||
]);
|
||||
|
||||
// Blacklist für E-Mail-Adressen (optional)
|
||||
define('BLACKLISTED_EMAILS', [
|
||||
// 'spam@example.com',
|
||||
// 'test@test.com'
|
||||
]);
|
||||
|
||||
// Validierung der Konfiguration
|
||||
if (!defined('SMTP_HOST') || !defined('SMTP_USERNAME') || !defined('SMTP_PASSWORD')) {
|
||||
die('SMTP-Konfiguration ist unvollständig. Bitte überprüfen Sie die mail-config.php');
|
||||
}
|
||||
|
||||
// Überprüfung der E-Mail-Adressen
|
||||
if (!filter_var(SMTP_FROM_EMAIL, FILTER_VALIDATE_EMAIL)) {
|
||||
die('Ungültige SMTP_FROM_EMAIL Adresse');
|
||||
}
|
||||
|
||||
if (!filter_var(SMTP_TO_EMAIL, FILTER_VALIDATE_EMAIL)) {
|
||||
die('Ungültige SMTP_TO_EMAIL Adresse');
|
||||
}
|
||||
|
||||
// Logging-Funktion
|
||||
function logEmail($type, $data) {
|
||||
if (!LOG_EMAILS) return;
|
||||
|
||||
$logFile = __DIR__ . '/../logs/email.log';
|
||||
$logDir = dirname($logFile);
|
||||
|
||||
if (!is_dir($logDir)) {
|
||||
mkdir($logDir, 0755, true);
|
||||
}
|
||||
|
||||
$timestamp = date('Y-m-d H:i:s');
|
||||
$logEntry = "[$timestamp] $type: " . json_encode($data) . "\n";
|
||||
|
||||
file_put_contents($logFile, $logEntry, FILE_APPEND | LOCK_EX);
|
||||
}
|
||||
|
||||
// Hilfsfunktion für E-Mail-Validierung
|
||||
function isValidEmail($email) {
|
||||
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Prüfe Blacklist
|
||||
if (in_array($email, BLACKLISTED_EMAILS)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Prüfe Domain-Whitelist (falls gesetzt)
|
||||
if (!empty(ALLOWED_EMAIL_DOMAINS)) {
|
||||
$domain = substr(strrchr($email, "@"), 1);
|
||||
if (!in_array($domain, ALLOWED_EMAIL_DOMAINS)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// CSRF Token generieren (wird in functions.php verwendet)
|
||||
// Hinweis: Diese Funktion existiert auch in functions.php - hier nur als Fallback
|
||||
if (!function_exists('generateCSRFToken')) {
|
||||
function generateCSRFToken() {
|
||||
if (!isset($_SESSION['csrf_token'])) {
|
||||
$_SESSION['csrf_token'] = bin2hex(random_bytes(32));
|
||||
}
|
||||
return $_SESSION['csrf_token'];
|
||||
}
|
||||
}
|
||||
|
||||
// CSRF Token validieren
|
||||
if (!function_exists('validateCSRFToken')) {
|
||||
function validateCSRFToken($token) {
|
||||
return isset($_SESSION['csrf_token']) && hash_equals($_SESSION['csrf_token'], $token);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Hilfsfunktion zum Abrufen der Konfiguration als Array
|
||||
* Kompatibilität mit contact-handler.php
|
||||
*
|
||||
* @param string|null $key Optional: einzelner Schlüssel
|
||||
* @return mixed Konfigurationsarray oder einzelner Wert
|
||||
*/
|
||||
function getHexaHostConfig($key = null) {
|
||||
$config = [
|
||||
// SMTP Server-Einstellungen
|
||||
'smtp_host' => SMTP_HOST,
|
||||
'smtp_port' => SMTP_PORT,
|
||||
'smtp_username' => SMTP_USERNAME,
|
||||
'smtp_password' => SMTP_PASSWORD,
|
||||
'smtp_encryption' => 'tls',
|
||||
|
||||
// Absender/Empfänger
|
||||
'from_email' => SMTP_FROM_EMAIL,
|
||||
'from_name' => 'HexaHost.de Kontaktformular',
|
||||
'to_email' => SMTP_TO_EMAIL,
|
||||
'to_name' => 'HexaHost Support',
|
||||
|
||||
// Sicherheit
|
||||
'max_requests_per_hour' => MAX_REQUESTS_PER_HOUR,
|
||||
'honeypot_field' => 'website',
|
||||
|
||||
// Debug
|
||||
'debug_mode' => DEBUG_MODE,
|
||||
'log_errors' => LOG_EMAILS,
|
||||
];
|
||||
|
||||
if ($key === null) {
|
||||
return $config;
|
||||
}
|
||||
|
||||
return $config[$key] ?? null;
|
||||
}
|
||||
?>
|
||||
541
backend/config/products-config.php
Normal file
541
backend/config/products-config.php
Normal file
@@ -0,0 +1,541 @@
|
||||
<?php
|
||||
/**
|
||||
* HexaHost.de Produkt-Konfiguration
|
||||
*
|
||||
* Hier können Sie alle Preise und Produktinformationen zentral verwalten.
|
||||
* Nach Änderungen: npm run build && npm run deploy
|
||||
*
|
||||
* Verwendung in PHP-Seiten:
|
||||
* require_once 'config/products-config.php';
|
||||
* $packages = getProductPackages('vpc');
|
||||
*/
|
||||
|
||||
// ============================================================================
|
||||
// VIRTUAL PRIVATE CONTAINER (VPC)
|
||||
// ============================================================================
|
||||
$PRODUCTS['vpc'] = [
|
||||
'name' => 'Virtual Private Container',
|
||||
'short_name' => 'VPC',
|
||||
'description' => 'Effiziente LXC-Container auf Proxmox-Basis',
|
||||
'min_price' => '4,99',
|
||||
'hero_highlight' => 'auf Proxmox LXC',
|
||||
'hero_description' => 'Erleben Sie die Effizienz von Linux-Containern mit der Zuverlässigkeit von Proxmox. Unsere VPC-Lösungen bieten optimale Performance bei minimalem Ressourcenverbrauch.',
|
||||
'packages_title' => 'VPC Pakete',
|
||||
'packages_description' => 'Wählen Sie das perfekte Container-Paket für Ihre Anforderungen',
|
||||
'cta_title' => 'Bereit für Ihren VPC?',
|
||||
'cta_description' => 'Starten Sie noch heute mit einem Virtual Private Container',
|
||||
'page_title' => 'Virtual Private Container - Effiziente LXC Container | HexaHost.de',
|
||||
'page_description' => 'Virtual Private Container auf Proxmox LXC-Basis. Effiziente und preiswerte Container-Lösungen ab 4,99€/Monat bei HexaHost.de',
|
||||
'packages' => [
|
||||
'starter' => [
|
||||
'name' => 'VPC Starter',
|
||||
'price' => '4,99',
|
||||
'featured' => false,
|
||||
'specs' => [
|
||||
['label' => 'CPU Kerne', 'value' => '1 vCore'],
|
||||
['label' => 'RAM', 'value' => '1 GB'],
|
||||
['label' => 'SSD Speicher', 'value' => '20 GB'],
|
||||
['label' => 'Traffic', 'value' => '1 TB'],
|
||||
['label' => 'IPv4 Adressen', 'value' => '1'],
|
||||
],
|
||||
'features' => [
|
||||
'Proxmox LXC Container',
|
||||
'Root-Zugriff',
|
||||
'SSH-Zugang',
|
||||
'Backup inklusive',
|
||||
'24/7 Monitoring',
|
||||
],
|
||||
],
|
||||
'business' => [
|
||||
'name' => 'VPC Business',
|
||||
'price' => '9,99',
|
||||
'featured' => true,
|
||||
'specs' => [
|
||||
['label' => 'CPU Kerne', 'value' => '2 vCores'],
|
||||
['label' => 'RAM', 'value' => '4 GB'],
|
||||
['label' => 'SSD Speicher', 'value' => '80 GB'],
|
||||
['label' => 'Traffic', 'value' => '3 TB'],
|
||||
['label' => 'IPv4 Adressen', 'value' => '1'],
|
||||
],
|
||||
'features' => [
|
||||
'Proxmox LXC Container',
|
||||
'Root-Zugriff',
|
||||
'SSH-Zugang',
|
||||
'Tägliches Backup',
|
||||
'24/7 Monitoring',
|
||||
'Snapshot-Funktion',
|
||||
],
|
||||
],
|
||||
'professional' => [
|
||||
'name' => 'VPC Professional',
|
||||
'price' => '19,99',
|
||||
'featured' => false,
|
||||
'specs' => [
|
||||
['label' => 'CPU Kerne', 'value' => '4 vCores'],
|
||||
['label' => 'RAM', 'value' => '8 GB'],
|
||||
['label' => 'SSD Speicher', 'value' => '160 GB'],
|
||||
['label' => 'Traffic', 'value' => '5 TB'],
|
||||
['label' => 'IPv4 Adressen', 'value' => '2'],
|
||||
],
|
||||
'features' => [
|
||||
'Proxmox LXC Container',
|
||||
'Root-Zugriff',
|
||||
'SSH-Zugang',
|
||||
'Stündliches Backup',
|
||||
'24/7 Monitoring',
|
||||
'Snapshot-Funktion',
|
||||
'Priority Support',
|
||||
],
|
||||
],
|
||||
'enterprise' => [
|
||||
'name' => 'VPC Enterprise',
|
||||
'price' => '39,99',
|
||||
'featured' => false,
|
||||
'specs' => [
|
||||
['label' => 'CPU Kerne', 'value' => '8 vCores'],
|
||||
['label' => 'RAM', 'value' => '16 GB'],
|
||||
['label' => 'SSD Speicher', 'value' => '320 GB'],
|
||||
['label' => 'Traffic', 'value' => '10 TB'],
|
||||
['label' => 'IPv4 Adressen', 'value' => '3'],
|
||||
],
|
||||
'features' => [
|
||||
'Proxmox LXC Container',
|
||||
'Root-Zugriff',
|
||||
'SSH-Zugang',
|
||||
'Stündliches Backup',
|
||||
'24/7 Monitoring',
|
||||
'Snapshot-Funktion',
|
||||
'Priority Support',
|
||||
'Individuelle Konfiguration',
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
// ============================================================================
|
||||
// VIRTUAL PRIVATE SERVER (VPS)
|
||||
// ============================================================================
|
||||
$PRODUCTS['vps'] = [
|
||||
'name' => 'Virtual Private Server',
|
||||
'short_name' => 'VPS',
|
||||
'description' => 'Vollwertige KVM-Virtualisierung mit Root-Zugriff',
|
||||
'min_price' => '9,99',
|
||||
'hero_highlight' => 'auf Proxmox KVM',
|
||||
'hero_description' => 'Maximale Flexibilität und Kontrolle mit vollwertiger KVM-Virtualisierung. Installieren Sie jedes Betriebssystem und genießen Sie vollständigen Root-Zugriff.',
|
||||
'packages_title' => 'VPS Pakete',
|
||||
'packages_description' => 'Wählen Sie das perfekte VPS-Paket für Ihre Anforderungen',
|
||||
'cta_title' => 'Bereit für Ihren VPS?',
|
||||
'cta_description' => 'Starten Sie noch heute mit einem Virtual Private Server',
|
||||
'page_title' => 'Virtual Private Server - KVM Virtualisierung | HexaHost.de',
|
||||
'page_description' => 'Virtual Private Server auf Proxmox KVM-Basis. Vollwertige Virtualisierung mit Root-Zugriff ab 9,99€/Monat bei HexaHost.de',
|
||||
'packages' => [
|
||||
'starter' => [
|
||||
'name' => 'VPS Starter',
|
||||
'price' => '9,99',
|
||||
'featured' => false,
|
||||
'specs' => [
|
||||
['label' => 'CPU Kerne', 'value' => '1 vCore'],
|
||||
['label' => 'RAM', 'value' => '2 GB'],
|
||||
['label' => 'SSD Speicher', 'value' => '40 GB'],
|
||||
['label' => 'Traffic', 'value' => '2 TB'],
|
||||
['label' => 'IPv4 Adressen', 'value' => '1'],
|
||||
],
|
||||
'features' => [
|
||||
'Proxmox KVM Virtualisierung',
|
||||
'Root-Zugriff',
|
||||
'SSH-Zugang',
|
||||
'Backup inklusive',
|
||||
'24/7 Monitoring',
|
||||
],
|
||||
],
|
||||
'business' => [
|
||||
'name' => 'VPS Business',
|
||||
'price' => '19,99',
|
||||
'featured' => true,
|
||||
'specs' => [
|
||||
['label' => 'CPU Kerne', 'value' => '2 vCores'],
|
||||
['label' => 'RAM', 'value' => '4 GB'],
|
||||
['label' => 'SSD Speicher', 'value' => '80 GB'],
|
||||
['label' => 'Traffic', 'value' => '4 TB'],
|
||||
['label' => 'IPv4 Adressen', 'value' => '1'],
|
||||
],
|
||||
'features' => [
|
||||
'Proxmox KVM Virtualisierung',
|
||||
'Root-Zugriff',
|
||||
'SSH-Zugang',
|
||||
'Tägliches Backup',
|
||||
'24/7 Monitoring',
|
||||
'Snapshot-Funktion',
|
||||
],
|
||||
],
|
||||
'professional' => [
|
||||
'name' => 'VPS Professional',
|
||||
'price' => '39,99',
|
||||
'featured' => false,
|
||||
'specs' => [
|
||||
['label' => 'CPU Kerne', 'value' => '4 vCores'],
|
||||
['label' => 'RAM', 'value' => '8 GB'],
|
||||
['label' => 'SSD Speicher', 'value' => '160 GB'],
|
||||
['label' => 'Traffic', 'value' => '8 TB'],
|
||||
['label' => 'IPv4 Adressen', 'value' => '2'],
|
||||
],
|
||||
'features' => [
|
||||
'Proxmox KVM Virtualisierung',
|
||||
'Root-Zugriff',
|
||||
'SSH-Zugang',
|
||||
'Stündliches Backup',
|
||||
'24/7 Monitoring',
|
||||
'Snapshot-Funktion',
|
||||
'Priority Support',
|
||||
],
|
||||
],
|
||||
'enterprise' => [
|
||||
'name' => 'VPS Enterprise',
|
||||
'price' => '79,99',
|
||||
'featured' => false,
|
||||
'specs' => [
|
||||
['label' => 'CPU Kerne', 'value' => '8 vCores'],
|
||||
['label' => 'RAM', 'value' => '16 GB'],
|
||||
['label' => 'SSD Speicher', 'value' => '320 GB'],
|
||||
['label' => 'Traffic', 'value' => '15 TB'],
|
||||
['label' => 'IPv4 Adressen', 'value' => '3'],
|
||||
],
|
||||
'features' => [
|
||||
'Proxmox KVM Virtualisierung',
|
||||
'Root-Zugriff',
|
||||
'SSH-Zugang',
|
||||
'Stündliches Backup',
|
||||
'24/7 Monitoring',
|
||||
'Snapshot-Funktion',
|
||||
'Priority Support',
|
||||
'Individuelle Konfiguration',
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
// ============================================================================
|
||||
// MAIL GATEWAY
|
||||
// ============================================================================
|
||||
$PRODUCTS['mail-gateway'] = [
|
||||
'name' => 'Mail Gateway',
|
||||
'short_name' => 'Mail',
|
||||
'description' => 'Professioneller E-Mail-Schutz für Unternehmen',
|
||||
'min_price' => '4,99',
|
||||
'hero_highlight' => 'für Unternehmen',
|
||||
'hero_description' => 'Professionelle E-Mail-Infrastruktur mit maximalem Schutz vor Spam und Malware. Sichern Sie Ihre geschäftliche Kommunikation mit unseren Mail Gateway Lösungen.',
|
||||
'packages_title' => 'Mail Gateway Pakete',
|
||||
'packages_description' => 'Wählen Sie das passende Mail Gateway Paket für Ihr Unternehmen',
|
||||
'cta_title' => 'Bereit für professionelle E-Mail-Kommunikation?',
|
||||
'cta_description' => 'Starten Sie noch heute mit unserem Mail Gateway',
|
||||
'page_title' => 'Mail Gateway - Professionelle E-Mail-Lösungen | HexaHost.de',
|
||||
'page_description' => 'Professionelle Mail Gateway Lösungen für Unternehmen. Spam-Schutz, E-Mail-Archivierung und sichere E-Mail-Kommunikation bei HexaHost.de',
|
||||
'packages' => [
|
||||
'starter' => [
|
||||
'name' => 'Mail Starter',
|
||||
'price' => '4,99',
|
||||
'featured' => false,
|
||||
'specs' => [
|
||||
['label' => 'Postfächer', 'value' => '5'],
|
||||
['label' => 'Speicher/Postfach', 'value' => '5 GB'],
|
||||
['label' => 'Domains', 'value' => '1'],
|
||||
['label' => 'E-Mails/Tag', 'value' => '500'],
|
||||
],
|
||||
'features' => [
|
||||
'Spam-Filter',
|
||||
'Virus-Schutz',
|
||||
'Webmail',
|
||||
'IMAP/POP3',
|
||||
'SSL/TLS Verschlüsselung',
|
||||
],
|
||||
],
|
||||
'business' => [
|
||||
'name' => 'Mail Business',
|
||||
'price' => '14,99',
|
||||
'featured' => true,
|
||||
'specs' => [
|
||||
['label' => 'Postfächer', 'value' => '25'],
|
||||
['label' => 'Speicher/Postfach', 'value' => '10 GB'],
|
||||
['label' => 'Domains', 'value' => '3'],
|
||||
['label' => 'E-Mails/Tag', 'value' => '2.000'],
|
||||
],
|
||||
'features' => [
|
||||
'Spam-Filter (erweitert)',
|
||||
'Virus-Schutz',
|
||||
'Webmail',
|
||||
'IMAP/POP3',
|
||||
'SSL/TLS Verschlüsselung',
|
||||
'E-Mail Archivierung (30 Tage)',
|
||||
'Kalender & Kontakte',
|
||||
],
|
||||
],
|
||||
'professional' => [
|
||||
'name' => 'Mail Professional',
|
||||
'price' => '29,99',
|
||||
'featured' => false,
|
||||
'specs' => [
|
||||
['label' => 'Postfächer', 'value' => '100'],
|
||||
['label' => 'Speicher/Postfach', 'value' => '25 GB'],
|
||||
['label' => 'Domains', 'value' => '10'],
|
||||
['label' => 'E-Mails/Tag', 'value' => '10.000'],
|
||||
],
|
||||
'features' => [
|
||||
'Spam-Filter (KI-gestützt)',
|
||||
'Virus-Schutz',
|
||||
'Webmail',
|
||||
'IMAP/POP3',
|
||||
'SSL/TLS Verschlüsselung',
|
||||
'E-Mail Archivierung (1 Jahr)',
|
||||
'Kalender & Kontakte',
|
||||
'ActiveSync für Mobile',
|
||||
],
|
||||
],
|
||||
'enterprise' => [
|
||||
'name' => 'Mail Enterprise',
|
||||
'price' => '59,99',
|
||||
'featured' => false,
|
||||
'specs' => [
|
||||
['label' => 'Postfächer', 'value' => 'Unbegrenzt'],
|
||||
['label' => 'Speicher/Postfach', 'value' => '50 GB'],
|
||||
['label' => 'Domains', 'value' => 'Unbegrenzt'],
|
||||
['label' => 'E-Mails/Tag', 'value' => 'Unbegrenzt'],
|
||||
],
|
||||
'features' => [
|
||||
'Spam-Filter (KI-gestützt)',
|
||||
'Virus-Schutz',
|
||||
'Webmail',
|
||||
'IMAP/POP3',
|
||||
'SSL/TLS Verschlüsselung',
|
||||
'E-Mail Archivierung (10 Jahre)',
|
||||
'Kalender & Kontakte',
|
||||
'ActiveSync für Mobile',
|
||||
'Dedizierte IP',
|
||||
'Priority Support',
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
// ============================================================================
|
||||
// WEBHOSTING
|
||||
// ============================================================================
|
||||
$PRODUCTS['webhosting'] = [
|
||||
'name' => 'Webhosting',
|
||||
'short_name' => 'Webhosting',
|
||||
'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 | 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' => '1,99',
|
||||
'featured' => false,
|
||||
'specs' => [
|
||||
['label' => 'Webspace', 'value' => '5 GB'],
|
||||
['label' => 'Domains', 'value' => '1'],
|
||||
['label' => 'E-Mail-Postfächer', 'value' => '5'],
|
||||
['label' => 'Datenbanken', 'value' => '1 MySQL'],
|
||||
['label' => 'Traffic', 'value' => '10 GB'],
|
||||
],
|
||||
'features' => [
|
||||
'cPanel/Webmin',
|
||||
'PHP 8.1',
|
||||
'SSL-Zertifikat',
|
||||
'E-Mail-Postfächer',
|
||||
'MySQL Datenbank',
|
||||
],
|
||||
],
|
||||
'business' => [
|
||||
'name' => 'Webhosting Business',
|
||||
'price' => '4,99',
|
||||
'featured' => true,
|
||||
'specs' => [
|
||||
['label' => 'Webspace', 'value' => '20 GB'],
|
||||
['label' => 'Domains', 'value' => '5'],
|
||||
['label' => 'E-Mail-Postfächer', 'value' => '25'],
|
||||
['label' => 'Datenbanken', 'value' => '5 MySQL'],
|
||||
['label' => 'Traffic', 'value' => '50 GB'],
|
||||
],
|
||||
'features' => [
|
||||
'cPanel/Webmin',
|
||||
'PHP 8.1',
|
||||
'SSL-Zertifikat',
|
||||
'E-Mail-Postfächer',
|
||||
'MySQL Datenbanken',
|
||||
'Backup-Service',
|
||||
],
|
||||
],
|
||||
'professional' => [
|
||||
'name' => 'Webhosting Professional',
|
||||
'price' => '9,99',
|
||||
'featured' => false,
|
||||
'specs' => [
|
||||
['label' => 'Webspace', 'value' => '50 GB'],
|
||||
['label' => 'Domains', 'value' => 'Unbegrenzt'],
|
||||
['label' => 'E-Mail-Postfächer', 'value' => '100'],
|
||||
['label' => 'Datenbanken', 'value' => 'Unbegrenzt'],
|
||||
['label' => 'Traffic', 'value' => '200 GB'],
|
||||
],
|
||||
'features' => [
|
||||
'cPanel/Webmin',
|
||||
'PHP 8.1',
|
||||
'SSL-Zertifikat',
|
||||
'E-Mail-Postfächer',
|
||||
'MySQL Datenbanken',
|
||||
'Backup-Service',
|
||||
'Priority Support',
|
||||
],
|
||||
],
|
||||
'enterprise' => [
|
||||
'name' => 'Webhosting Enterprise',
|
||||
'price' => '19,99',
|
||||
'featured' => false,
|
||||
'specs' => [
|
||||
['label' => 'Webspace', 'value' => '100 GB'],
|
||||
['label' => 'Domains', 'value' => 'Unbegrenzt'],
|
||||
['label' => 'E-Mail-Postfächer', 'value' => 'Unbegrenzt'],
|
||||
['label' => 'Datenbanken', 'value' => 'Unbegrenzt'],
|
||||
['label' => 'Traffic', 'value' => '500 GB'],
|
||||
],
|
||||
'features' => [
|
||||
'cPanel/Webmin',
|
||||
'PHP 8.1',
|
||||
'SSL-Zertifikat',
|
||||
'E-Mail-Postfächer',
|
||||
'MySQL Datenbanken',
|
||||
'Backup-Service',
|
||||
'Priority Support',
|
||||
'Individuelle Konfiguration',
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
// ============================================================================
|
||||
// HILFSFUNKTIONEN
|
||||
// ============================================================================
|
||||
|
||||
/**
|
||||
* Alle Produkte abrufen
|
||||
*/
|
||||
function getAllProducts() {
|
||||
global $PRODUCTS;
|
||||
return $PRODUCTS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ein Produkt abrufen
|
||||
*/
|
||||
function getProduct($productId) {
|
||||
global $PRODUCTS;
|
||||
return $PRODUCTS[$productId] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Alle Pakete eines Produkts abrufen
|
||||
*/
|
||||
function getProductPackages($productId) {
|
||||
global $PRODUCTS;
|
||||
return $PRODUCTS[$productId]['packages'] ?? [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Ein bestimmtes Paket abrufen
|
||||
*/
|
||||
function getPackage($productId, $packageId) {
|
||||
global $PRODUCTS;
|
||||
return $PRODUCTS[$productId]['packages'][$packageId] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Preis eines Pakets abrufen
|
||||
*/
|
||||
function getPackagePrice($productId, $packageId) {
|
||||
$package = getPackage($productId, $packageId);
|
||||
return $package['price'] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Minimalen Preis eines Produkts abrufen
|
||||
*/
|
||||
function getMinPrice($productId) {
|
||||
global $PRODUCTS;
|
||||
return $PRODUCTS[$productId]['min_price'] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Preis formatiert ausgeben
|
||||
*/
|
||||
function formatPrice($price, $withCurrency = true) {
|
||||
return $withCurrency ? $price . '€' : $price;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generiert HTML für eine Paket-Karte
|
||||
*/
|
||||
function renderPackageCard($productId, $packageId, $package) {
|
||||
$featuredClass = $package['featured'] ? ' featured' : '';
|
||||
$featuredBadge = $package['featured'] ? '<div class="featured-badge">Beliebt</div>' : '';
|
||||
|
||||
$specsHtml = '';
|
||||
foreach ($package['specs'] as $spec) {
|
||||
$specsHtml .= sprintf(
|
||||
'<div class="spec-item"><span class="spec-label">%s:</span><span class="spec-value">%s</span></div>',
|
||||
htmlspecialchars($spec['label']),
|
||||
htmlspecialchars($spec['value'])
|
||||
);
|
||||
}
|
||||
|
||||
$featuresHtml = '';
|
||||
foreach ($package['features'] as $feature) {
|
||||
$featuresHtml .= sprintf('<div class="feature">✓ %s</div>', htmlspecialchars($feature));
|
||||
}
|
||||
|
||||
return sprintf('
|
||||
<div class="package-card glass-card%s">
|
||||
%s
|
||||
<div class="package-header">
|
||||
<h3 class="package-name">%s</h3>
|
||||
<div class="package-price">
|
||||
<span class="price">%s€</span>
|
||||
<span class="period">/Monat</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="package-specs">
|
||||
%s
|
||||
</div>
|
||||
<div class="package-features">
|
||||
%s
|
||||
</div>
|
||||
<a href="contact.php?package=%s-%s" class="btn btn-primary">Jetzt bestellen</a>
|
||||
</div>',
|
||||
$featuredClass,
|
||||
$featuredBadge,
|
||||
htmlspecialchars($package['name']),
|
||||
$package['price'],
|
||||
$specsHtml,
|
||||
$featuresHtml,
|
||||
$productId,
|
||||
$packageId
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generiert HTML für alle Pakete eines Produkts
|
||||
*/
|
||||
function renderAllPackages($productId) {
|
||||
$packages = getProductPackages($productId);
|
||||
$html = '';
|
||||
foreach ($packages as $packageId => $package) {
|
||||
$html .= renderPackageCard($productId, $packageId, $package);
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user