Implement initial project structure and setup
This commit is contained in:
131
includes/footer.php
Normal file
131
includes/footer.php
Normal file
@@ -0,0 +1,131 @@
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<div class="footer-content">
|
||||
<div class="footer-section">
|
||||
<h4>HexaHost.de</h4>
|
||||
<p>Zuverlässiges Hosting aus Niederbayern</p>
|
||||
<div class="footer-location">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"/>
|
||||
<circle cx="12" cy="10" r="3"/>
|
||||
</svg>
|
||||
<span>Niederbayern, Deutschland</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer-section">
|
||||
<h4>Produkte</h4>
|
||||
<ul>
|
||||
<li><a href="/vpc">Virtual Private Container</a></li>
|
||||
<li><a href="/vps">Virtual Private Server</a></li>
|
||||
<li><a href="/mail-gateway">Mail Gateway</a></li>
|
||||
<li><a href="/webhosting">Webhosting</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer-section">
|
||||
<h4>Unternehmen</h4>
|
||||
<ul>
|
||||
<li><a href="/about">Über uns</a></li>
|
||||
<li><a href="/contact">Kontakt</a></li>
|
||||
<li><a href="/impressum">Impressum</a></li>
|
||||
<li><a href="/datenschutz">Datenschutz</a></li>
|
||||
<li><a href="/agb">AGB</a></li>
|
||||
<li><a href="#" id="openCookieSettings" onclick="CookieConsent.resetConsent(); return false;">Cookie-Einstellungen</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer-section">
|
||||
<h4>Support</h4>
|
||||
<ul>
|
||||
<li><a href="https://shop.hexahost.de/clientarea.php">Kunden-Center</a></li>
|
||||
<li><a href="https://shop.hexahost.de/serverstatus.php">Status</a></li>
|
||||
<li><a href="https://shop.hexahost.de/supporttickets.php">Support-Ticket</a></li>
|
||||
<li><a href="#">FAQ</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer-bottom">
|
||||
<p>© <?php echo date('Y'); ?> HexaHost.de - Alle Rechte vorbehalten</p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- Cookie Consent Banner -->
|
||||
<div id="cookieConsent" class="cookie-consent" role="dialog" aria-labelledby="cookieConsentTitle" aria-describedby="cookieConsentDesc">
|
||||
<div class="cookie-consent-container">
|
||||
<div class="cookie-consent-content">
|
||||
<div class="cookie-consent-icon">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<circle cx="12" cy="12" r="10"/>
|
||||
<circle cx="8" cy="9" r="1" fill="currentColor"/>
|
||||
<circle cx="15" cy="8" r="1" fill="currentColor"/>
|
||||
<circle cx="10" cy="14" r="1" fill="currentColor"/>
|
||||
<circle cx="16" cy="13" r="1" fill="currentColor"/>
|
||||
<circle cx="13" cy="17" r="1" fill="currentColor"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="cookie-consent-text">
|
||||
<h3 id="cookieConsentTitle">Cookie-Einstellungen</h3>
|
||||
<p id="cookieConsentDesc">
|
||||
Wir verwenden Cookies, um Ihnen die bestmögliche Erfahrung auf unserer Website zu bieten.
|
||||
Technisch notwendige Cookies sind für die Funktionalität erforderlich.
|
||||
<a href="/datenschutz">Mehr erfahren</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cookie-consent-actions">
|
||||
<button type="button" id="cookieAcceptAll" class="btn btn-primary">Alle akzeptieren</button>
|
||||
<button type="button" id="cookieAcceptEssential" class="btn btn-secondary">Nur notwendige</button>
|
||||
<button type="button" id="cookieSettings" class="btn btn-text">Einstellungen</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Erweiterte Cookie-Einstellungen (standardmäßig versteckt) -->
|
||||
<div id="cookieSettingsPanel" class="cookie-settings-panel" style="display: none;">
|
||||
<div class="cookie-settings-content">
|
||||
<h4>Cookie-Einstellungen</h4>
|
||||
<div class="cookie-option">
|
||||
<div class="cookie-option-info">
|
||||
<strong>Notwendige Cookies</strong>
|
||||
<p>Diese Cookies sind für die Grundfunktionen der Website erforderlich.</p>
|
||||
</div>
|
||||
<label class="cookie-toggle disabled">
|
||||
<input type="checkbox" checked disabled>
|
||||
<span class="cookie-toggle-slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="cookie-option">
|
||||
<div class="cookie-option-info">
|
||||
<strong>Analyse-Cookies</strong>
|
||||
<p>Helfen uns zu verstehen, wie Besucher unsere Website nutzen.</p>
|
||||
</div>
|
||||
<label class="cookie-toggle">
|
||||
<input type="checkbox" id="cookieAnalytics">
|
||||
<span class="cookie-toggle-slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="cookie-option">
|
||||
<div class="cookie-option-info">
|
||||
<strong>Marketing-Cookies</strong>
|
||||
<p>Werden verwendet, um relevante Werbung anzuzeigen.</p>
|
||||
</div>
|
||||
<label class="cookie-toggle">
|
||||
<input type="checkbox" id="cookieMarketing">
|
||||
<span class="cookie-toggle-slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="cookie-settings-actions">
|
||||
<button type="button" id="cookieSaveSettings" class="btn btn-primary">Einstellungen speichern</button>
|
||||
<button type="button" id="cookieCloseSettings" class="btn btn-secondary">Abbrechen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="assets/js/main.js" defer></script>
|
||||
<script src="assets/js/cookie-consent.js" defer></script>
|
||||
<?php if (isset($additional_scripts)): ?>
|
||||
<?php foreach ($additional_scripts as $script): ?>
|
||||
<script src="<?php echo $script; ?>" defer></script>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</body>
|
||||
</html>
|
||||
98
includes/functions.php
Normal file
98
includes/functions.php
Normal file
@@ -0,0 +1,98 @@
|
||||
<?php
|
||||
/**
|
||||
* Helper functions for HexaHost.de
|
||||
*/
|
||||
|
||||
// Sichere Session-Konfiguration
|
||||
if (session_status() === PHP_SESSION_NONE) {
|
||||
// Session-Cookie-Sicherheit
|
||||
ini_set('session.cookie_httponly', 1);
|
||||
ini_set('session.cookie_secure', isset($_SERVER['HTTPS']) ? 1 : 0);
|
||||
ini_set('session.cookie_samesite', 'Strict');
|
||||
ini_set('session.use_strict_mode', 1);
|
||||
ini_set('session.use_only_cookies', 1);
|
||||
|
||||
session_start();
|
||||
|
||||
// Session-ID regenerieren bei Login/wichtigen Aktionen (Schutz vor Session Fixation)
|
||||
if (!isset($_SESSION['initiated'])) {
|
||||
session_regenerate_id(true);
|
||||
$_SESSION['initiated'] = true;
|
||||
}
|
||||
}
|
||||
|
||||
// PHP Error Display in Produktion deaktivieren
|
||||
if (!defined('DEBUG_MODE') || !DEBUG_MODE) {
|
||||
ini_set('display_errors', 0);
|
||||
ini_set('display_startup_errors', 0);
|
||||
error_reporting(E_ALL);
|
||||
ini_set('log_errors', 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set page configuration and include header
|
||||
*
|
||||
* @param string $title The page title
|
||||
* @param string $description The page description
|
||||
* @param string $page The current page identifier
|
||||
* @param array $scripts Additional scripts to include
|
||||
*/
|
||||
function includeHeader($title = '', $description = '', $page = '', $scripts = []) {
|
||||
global $page_title, $page_description, $current_page, $additional_scripts;
|
||||
|
||||
// Set page configuration from parameters
|
||||
$page_title = !empty($title)
|
||||
? $title
|
||||
: 'HexaHost.de - Zuverlässiges Hosting aus Niederbayern';
|
||||
|
||||
$page_description = !empty($description)
|
||||
? $description
|
||||
: 'HexaHost.de - Zuverlässiges und preiswertes Hosting aus Niederbayern. VPS, VPC, Mail Gateway und Webhosting Lösungen.';
|
||||
|
||||
$current_page = $page;
|
||||
$additional_scripts = $scripts;
|
||||
|
||||
include 'includes/header.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* Include footer
|
||||
*/
|
||||
function includeFooter() {
|
||||
include 'includes/footer.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate breadcrumb navigation
|
||||
*
|
||||
* @param array $breadcrumbs Array of breadcrumb items [['title' => 'Home', 'url' => 'index.html'], ...]
|
||||
*/
|
||||
function generateBreadcrumbs($breadcrumbs) {
|
||||
echo '<div class="breadcrumb">';
|
||||
$last_index = count($breadcrumbs) - 1;
|
||||
|
||||
foreach ($breadcrumbs as $index => $item) {
|
||||
if ($index === $last_index) {
|
||||
// Last item (current page)
|
||||
echo '<span>' . htmlspecialchars($item['title']) . '</span>';
|
||||
} else {
|
||||
// Link to other pages
|
||||
echo '<a href="' . htmlspecialchars($item['url']) . '">' . htmlspecialchars($item['title']) . '</a>';
|
||||
echo '<span>/</span>';
|
||||
}
|
||||
}
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate CSRF token for form security
|
||||
*
|
||||
* @return string CSRF token
|
||||
*/
|
||||
function generateCSRFToken() {
|
||||
if (!isset($_SESSION['csrf_token'])) {
|
||||
$_SESSION['csrf_token'] = bin2hex(random_bytes(32));
|
||||
}
|
||||
return $_SESSION['csrf_token'];
|
||||
}
|
||||
?>
|
||||
79
includes/header.php
Normal file
79
includes/header.php
Normal file
@@ -0,0 +1,79 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<!-- Performance: DNS Prefetch & Preconnect -->
|
||||
<link rel="dns-prefetch" href="//fonts.googleapis.com">
|
||||
<link rel="dns-prefetch" href="//fonts.gstatic.com">
|
||||
<link rel="dns-prefetch" href="//cdn.hexahost.de">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="preconnect" href="https://cdn.hexahost.de" crossorigin>
|
||||
|
||||
<!-- Performance: Preload kritischer Ressourcen -->
|
||||
<link rel="preload" href="assets/css/style.css" as="style">
|
||||
<link rel="preload" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" as="style">
|
||||
|
||||
<title><?php echo isset($page_title) ? htmlspecialchars($page_title) : 'HexaHost.de - Zuverlässiges Hosting aus Niederbayern'; ?></title>
|
||||
|
||||
<!-- SEO Meta Tags -->
|
||||
<meta name="description" content="<?php echo isset($page_description) ? htmlspecialchars($page_description) : 'HexaHost.de - Zuverlässiges und preiswertes Hosting aus Niederbayern. VPS, VPC, Mail Gateway und Webhosting Lösungen.'; ?>">
|
||||
<meta name="robots" content="index, follow">
|
||||
<meta name="author" content="HexaHost.de">
|
||||
<meta name="theme-color" content="#0d0821">
|
||||
|
||||
<!-- Open Graph / Social Media -->
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:site_name" content="HexaHost.de">
|
||||
<meta property="og:title" content="<?php echo isset($page_title) ? htmlspecialchars($page_title) : 'HexaHost.de'; ?>">
|
||||
<meta property="og:description" content="<?php echo isset($page_description) ? htmlspecialchars($page_description) : 'Zuverlässiges Hosting aus Niederbayern'; ?>">
|
||||
<meta property="og:locale" content="de_DE">
|
||||
|
||||
<!-- Main Stylesheet -->
|
||||
<link rel="stylesheet" href="assets/css/style.css">
|
||||
|
||||
<!-- Fonts -->
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Russo+One&family=Source+Sans+Pro:wght@300;400;600;700&display=swap" rel="stylesheet">
|
||||
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" type="image/svg+xml" href="favicon.svg">
|
||||
<link rel="apple-touch-icon" href="favicon.svg">
|
||||
|
||||
<!-- Canonical URL (falls gesetzt) -->
|
||||
<?php if (isset($canonical_url)): ?>
|
||||
<link rel="canonical" href="<?php echo htmlspecialchars($canonical_url); ?>">
|
||||
<?php endif; ?>
|
||||
</head>
|
||||
<body>
|
||||
<header class="header">
|
||||
<nav class="nav">
|
||||
<div class="nav-container">
|
||||
<div class="nav-logo">
|
||||
<a href="/">
|
||||
<img src="https://cdn.hexahost.de/assets/img/logo/8iFs123BynHQWHI5.png" alt="HexaHost.de Logo" class="logo-image">
|
||||
</a>
|
||||
</div>
|
||||
<ul class="nav-menu">
|
||||
<li><a href="/" class="nav-link <?php echo ($current_page === 'home') ? 'active' : ''; ?>">Home</a></li>
|
||||
<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">
|
||||
<li><a href="/vpc" class="<?php echo ($current_page === 'vpc') ? 'active' : ''; ?>">Virtual Private Container</a></li>
|
||||
<li><a href="/vps" class="<?php echo ($current_page === 'vps') ? 'active' : ''; ?>">Virtual Private Server</a></li>
|
||||
<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>
|
||||
</li>
|
||||
<li><a href="/about" class="nav-link <?php echo ($current_page === 'about') ? 'active' : ''; ?>">Über uns</a></li>
|
||||
<li><a href="/contact" class="nav-link <?php echo ($current_page === 'contact') ? 'active' : ''; ?>">Kontakt</a></li>
|
||||
</ul>
|
||||
<div class="nav-toggle">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
Reference in New Issue
Block a user