2023-06-27 14:31:55 +02:00
|
|
|
<?php
|
|
|
|
require_once "database.php";
|
|
|
|
|
|
|
|
$rq_path = "require/";
|
|
|
|
|
|
|
|
$lg = "fr";
|
|
|
|
|
|
|
|
if (isset($_GET["lg"])) {
|
|
|
|
if (htmlspecialchars($_GET["lg"]) == "en") {
|
|
|
|
$lg = "en";
|
|
|
|
}
|
|
|
|
}
|
2023-09-02 01:00:27 +02:00
|
|
|
|
2023-06-27 14:31:55 +02:00
|
|
|
else {
|
|
|
|
if (isset($_COOKIE["language"])) {
|
2023-09-01 21:31:54 +02:00
|
|
|
if (htmlspecialchars($_COOKIE["language"]) == "en") {
|
|
|
|
$lg = "en";
|
|
|
|
}
|
2023-06-27 14:31:55 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
setcookie(
|
|
|
|
"language",
|
|
|
|
$lg,
|
|
|
|
time() + (365 * 24 * 60 * 60),
|
|
|
|
"/",
|
|
|
|
"",
|
|
|
|
false,
|
|
|
|
false
|
|
|
|
);
|
|
|
|
|
|
|
|
require_once __DIR__ . "/locales/" . $lg . ".php";
|
|
|
|
?>
|