I'm in a rush to release so I am adding features that are needed to make it usable.

This commit is contained in:
Cody Cook 2025-02-17 22:03:33 -08:00
commit 4c2857b445
25 changed files with 2475 additions and 3475 deletions

4
includes/.htaccess Normal file
View file

@ -0,0 +1,4 @@
<Files "config.toml">
Order allow,deny
Deny from all
</Files>

View file

@ -11,3 +11,8 @@ if (isset($_GET['lang'])) {
}
$locale = loadLocale($lang);
function langPrintString($string, $lang)
{
echo $lang[$string];
}

View file

@ -65,7 +65,12 @@ $current_lang = $_SESSION['lang'] ?? $config['app']['locale'];
<select class="form-select" id="languageSelect"
onchange="location = this.value;">
<?php
$currentUrl = strtok($_SERVER["REQUEST_URI"], '?');
if (isset($_SERVER["REQUIEST_URI"])) {
$currentUrl = strtok($_SERVER["REQUEST_URI"], '?') ?? '/';
} else {
$currentUrl = '/';
}
$queryParams = $_GET;
foreach ($languages as $key => $value) {
$queryParams['lang'] = $key;