config RFM WIP

This commit is contained in:
Fred Tempez 2023-05-09 08:58:57 +02:00
parent 2ce3efb4fb
commit b408c9d192
2 changed files with 7 additions and 7 deletions

View File

@ -65,7 +65,7 @@
]); ?>
<?php echo template::select('userEditLanguage', $module::$languagesInstalled, [
'label' => 'Langue',
'selected' => $this->getData(['user', $this->getUser('id'), 'language'])
'selected' => $this->getData(['user', $this->getUrl(2), 'language'])
]); ?>
</div>
</div>
@ -119,14 +119,14 @@
id="userEditGroupProfil<?php echo self::GROUP_MEMBER; ?>">
<?php echo template::select('userEditProfil' . self::GROUP_MEMBER, $module::$userProfils[self::GROUP_MEMBER], [
'label' => 'Profil',
'selected' => $this->getData(['user', $this->getUser('id'), 'profil'])
'selected' => $this->getData(['user', $this->getUrl(2), 'profil'])
]); ?>
</div>
<div class="userEditGroupProfil displayNone"
id="userEditGroupProfil<?php echo self::GROUP_MODERATOR; ?>">
<?php echo template::select('userEditProfil' . self::GROUP_MODERATOR, $module::$userProfils[self::GROUP_MODERATOR], [
'label' => 'Profil',
'selected' => $this->getData(['user', $this->getUser('id'), 'profil'])
'selected' => $this->getData(['user', $this->getUrl(2), 'profil'])
]); ?>
</div>
</div>

View File

@ -20,11 +20,11 @@ setlocale(LC_CTYPE, $lang);
/* Lecture du groupe de l'utilisateur connecté pour attribuer les droits et les dossiers */
$userId = $_COOKIE['ZWII_USER_ID'];
$u = json_decode(file_get_contents('../../../site/data/user.json'), true);
$g = json_decode(file_get_contents('../../../site/data/group.json'), true);
$g = json_decode(file_get_contents('../../../site/data/profil.json'), true);
$group = $u['user'][$userId]['group'];
$file = $g['group'][$group]['file'];
$folder = $g['group'][$group]['folder'];
$uploadDir = $g['group'][$group]['folder']['path'];
$file = $g['profil'][$group]['file'];
$folder = $g['profil'][$group]['folder'];
$uploadDir = $g['profil'][$group]['folder']['path'];
$currentPath = '../../.' . $uploadDir;
if (!is_dir($currentPath ))
mkdir($currentPath );