feat: refactor into php for mrbs page

This commit is contained in:
2025-11-20 10:59:57 +01:00
parent f76a8d2efc
commit 9ab4fcbe81
10 changed files with 1904 additions and 0 deletions

28
php/config.php Normal file
View File

@@ -0,0 +1,28 @@
<?php
/**
* Configuration file for SemapForm PHP Application
*
* Copy this file and adjust values for your environment.
* For production, consider loading from environment variables or a .env file
*/
// Error reporting (set to 0 in production)
error_reporting(E_ALL);
ini_set('display_errors', 1);
// Email configuration
define('MAIL_ENABLED', getenv('MAIL_ENABLED') !== false ? filter_var(getenv('MAIL_ENABLED'), FILTER_VALIDATE_BOOLEAN) : true);
define('SMTP_HOST', getenv('SMTP_HOST') ?: 'smtp.ph-freiburg.de');
define('SMTP_PORT', getenv('SMTP_PORT') ?: 465);
define('SMTP_ENCRYPTION', 'ssl'); // 'ssl' or 'tls' or '' for none
define('SMTP_USERNAME', getenv('MAIL_USERNAME') ?: '');
define('SMTP_PASSWORD', getenv('MAIL_PASSWORD') ?: '');
define('MAIL_FROM', getenv('MAIL_FROM') ?: 'alexander.kirchner@ph-freiburg.de');
define('MAIL_TO', getenv('MAIL_TO') ?: 'semesterapparate@ph-freiburg.de');
// Application settings
define('BASE_PATH', __DIR__);
define('STATIC_PATH', '/static');
// Email regex pattern
define('EMAIL_REGEX', '/^[^@\s]+@[^@\s]+\.[^@\s]+$/');