Refactor contact form handling and enhance Mail Gateway page: Centralized subject mapping for contact requests, improved CSRF token validation, and optimized AJAX CORS handling. Updated Mail Gateway page layout and content for better clarity and user engagement, including new package details and security features.

This commit is contained in:
TheOnlyMace
2026-01-06 21:57:55 +01:00
parent 385baf2db7
commit bca75e38bc
5 changed files with 340 additions and 229 deletions

View File

@@ -11,21 +11,25 @@ if (session_status() === PHP_SESSION_NONE) {
/**
* Set page configuration and include header
*
* @param string $page_title The page title
* @param string $page_description The page description
* @param string $current_page The current page identifier
* @param array $additional_scripts Additional scripts to include
* @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($page_title = '', $page_description = '', $current_page = '', $additional_scripts = []) {
function includeHeader($title = '', $description = '', $page = '', $scripts = []) {
global $page_title, $page_description, $current_page, $additional_scripts;
// Set default values if not provided
if (empty($page_title)) {
$page_title = 'HexaHost.de - Zuverlässiges Hosting aus Niederbayern';
}
if (empty($page_description)) {
$page_description = 'HexaHost.de - Zuverlässiges und preiswertes Hosting aus Niederbayern. VPS, VPC, Mail Gateway und Webhosting Lösungen.';
}
// 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';
}