Fix + Redesign

Fix some error programing code and redesign special medals, tribe medals, mh medals, taskmaster medals, natars medals, nature medals, protection medals, etc. Add some language code in Profile.php and preference.tpl. Change some description in struct database for Nature and Taskmaster
This commit is contained in:
novgorodschi catalin
2026-05-28 12:25:28 +03:00
parent a9650e1624
commit 1d1f1dc72a
36 changed files with 97 additions and 52 deletions
+15
View File
@@ -219,6 +219,21 @@ class Profile {
$form->addError("email", EMAIL_ERROR);
}
}
// Language change
if (!empty($post['sprache'])) {
// whitelist pune aici limbile pe care le ai în /lang/
$allowed = ['en','ro','de','it','fr','es'];
$lang = strtolower(trim($post['sprache']));
if (in_array($lang, $allowed, true)) {
$database->updateUserField($session->uid, "language", $lang, 1);
// update sesiunea ca să se vadă imediat, fără relog
$_SESSION['lang'] = $lang;
$session->userinfo['language'] = $lang;
}
}
// Delete request cancel
if (!empty($post['del_pw']) && !empty($post['del'])) {