Files
usbcheck.it/config/fileload.php
2025-11-28 03:06:13 +01:00

40 lines
1.2 KiB
PHP

<?php
// 0) Umgebung / Domains / Error-Level
require_once __DIR__ . "/config.php";
// -----------------------------------------------------------
// Session starten
// -----------------------------------------------------------
if (php_sapi_name() !== 'cli') {
if (session_status() === PHP_SESSION_NONE) {
session_name('usbcheck_session');
session_set_cookie_params([
'lifetime' => 0,
'path' => '/',
'domain' => '',
'secure' => (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off'),
'httponly' => true,
'samesite' => 'Lax',
]);
session_start();
}
}
require_once __DIR__ . '/i18n.php'; // <— NEU: zentrale Sprachlogik
// ab hier kannst du überall $GLOBALS['lang'] und $GLOBALS['availableLangs'] nutzen
// und für JS:
$usbConfig = [
// ... dein sonstiges Zeug ...
'i18n' => app_i18n_get_frontend_config(),
];
// -----------------------------------------------------------
// 7) Rest des Systems laden
// -----------------------------------------------------------
require_once __DIR__ . "/db.php";
require_once __DIR__ . '/../src/functions.php';