<?php
global $path, $_SESSION, $configAdmins;
$lang = include $path . 'main_plugin/siteSettings/lang.php';
$lng = $_SESSION['lng'] ?? 'en';

if (in_array($_SESSION['username'], $configAdmins, true)) {
    $Html = file_get_contents($path . 'main_plugin/siteSettings/siteSettings.php');
    foreach ($lang[$lng] as $key => $value) {
        $Html = str_replace('{{' . $key . '}}', $value, $Html);
    }
    echo $Html;

    echo '<link rel="stylesheet" href="/main_plugin/siteSettings/siteSettings.css">';
    echo '<script type="text/javascript" src="/main_plugin/siteSettings/lang.js.php?lng=' . $lng . '"></script>';
}
?>