23if ( ! defined (
'ALLOWED') ) die(
'Appel direct ne sont pas permis');
24require_once NOALYSS_INCLUDE.
'/lib/ac_common.php';
25require_once NOALYSS_INCLUDE.
'/lib/user_menu.php';
29$uid =
$http->request(
'use_id');
30}
catch (Exception
$ex) {
45$it_pass->javascript=
'onkeyup="check_password_strength(\'password\',\'password_info\',1)"';
48<FORM
id=
"user_detail_frm" METHOD=
"POST">
50<?php echo HtmlInput::hidden(
'UID',$uid)?>
51<?php echo HtmlInput::hidden(
'use_id',$uid)?>
55<?php printf(
'<td>login</td><td> %s</td>',
$UserChange->login); ?>
60 <?php printf(
'Nom de famille </TD><td><INPUT class="input_text" type="text" NAME="lname" value="%s"> ',
$UserChange->name); ?>
64 <?php printf(
'<td>prénom</td><td>
65 <INPUT class="input_text" type="text" NAME="fname" value="%s"> ',
$UserChange->first_name);
76 <INPUT
class=
"input_text" type=
"text" NAME=
"email" value=
"<?php echo $UserChange->email;?>">
81 Mot de passe :<
span class=
"info">Laisser à VIDE pour ne PAS le changer</
span>
85 <
span id=
"password_info" style=
"background-color: rgba(255,160,122,0.58);color:orangered;position:absolute"></
span>
90 <?php echo
_(
'Actif');?>
96 array(
'value'=>0,
'label'=>
_(
'Non')),
97 array(
'value'=>1,
'label'=>
_(
'Oui'))
106 <?php echo
_(
'Type');?>
112 array(
'value'=>0,
'label'=>
_(
'Utilisateur normal')),
113 array(
'value'=>1,
'label'=>
_(
'Administrateur'))
122 <?php echo
_(
'Double authentification');?>
128 array(
'value'=>0,
'label'=>
_(
'Aucune')),
129 array(
'value'=>1,
'label'=>
_(
'Mot de passe et code par courriel (ou TOTP) ')),
130 array(
'value'=>2,
'label'=>
_(
'Mot de passe et TOTP')),
139 <?=
_(
"Action Double Authentification")?>
143 <input
type=
"checkbox" name=
"generate_otp" value=
"1"><?=
_(
"Renouveller clef secrète")?>
146 <input
type=
"checkbox" name=
"email_otp" value=
"1"><?=
_(
"envoyer email pour 2FA avec OTP ")?>
147 <
span class=
"text-muted"> <?=
_(
"Un email sera envoyé avec un lien pour initialiser 2FA avec OTP")?>
156 <input
type=
"hidden" name=
"sbaction" id=
"sbaction" value=
"save">
158 <input
type=
"Submit" class=
"button" NAME=
"SAVE" VALUE=
"<?=('Sauver les changements')?>" onclick=
"return confirm_box('user_detail_frm','<?=_('Confirmer')?>');">
160 <input
type=
"button" class=
"button" NAME=
"DELETE" VALUE=
"<?=('Effacer')?>" onclick=
"$('delete_user_div').show();" >
163<div
id=
"delete_user_div" class=
"inner_box" style=
"display: none">
164<?=HtmlInput::title_box(
_(
"Effacer"),
'delete_user_div',
'hide')?>
165<FORM
id=
"user_detail_frm" METHOD=
"POST">
168 <?php echo HtmlInput::hidden(
'UID',$uid)?>
169 <?php echo HtmlInput::hidden(
'use_id',$uid)?>
171 <
p class=
"info" id=
"codedel_div">
173 echo
_(
"Pour effacer , confirmez en retapant le code, respectez les majuscules et minuscules");
178 <ul
class=
"aligned-block">
180 <input
type=
"Submit" class=
"button" NAME=
"DELETE" VALUE=
"<?=_("Confirmer
")?>">
183 <?=HtmlInput::button_hide(
'delete_user_div',
'button')?>
192 <!-- Show all database and rights -->
193 <H2
class=
"h-section"> Accès aux dossiers</H2>
195 Les autres droits doivent être réglés dans les dossiers (paramètre->sécurité), le fait de changer un utilisateur d
'administrateur à utilisateur
196 normal ne change pas le profil administrateur dans les dossiers.
197 Il faut aller dans C0SEC pour diminuer ses privilèges.
202 array('value' => 'X
', 'label' => 'Aucun Accès
'),
203 array('value' => 'R
', 'label' => 'Utilisateur normal
')
205$repo = new Dossier(0);
206if ( $repo->count() == 0)
208 echo hb('* Aucun Dossier *
');
213$Dossier = $repo->show_dossier('R
',$UserChange->login);
215$mod_user = new Noalyss_user(new Database(), $uid);
217 <TABLE id="database_list" class="result">
220// Display all the granted folders
223foreach ($Dossier as $rDossier):
225$class=($i%2==0)?' even
':'odd
';
227 <tr id="row<?php echo $rDossier['dos_id
']?>" class="<?php echo $class;?>">
229 <?php echo h($rDossier['dos_name
']); ?>
232 <?php echo h($rDossier['dos_description
']); ?>
235 <?php echo HtmlInput::anchor(_('Enleve
'),"",
236 " onclick=\"folder_remove({$mod_user->id},{$rDossier['dos_id
']});\"");?>
245 echo HtmlInput::button("database_add_button",_('Ajout
'),
246 " onclick=\"folder_display({$mod_user->id});\"");
249 // If UserChange->admin==1 it means he can access all databases
confirm_with_string($p_ctl_name, $p_car)
generate a string of p_car character and a input text with name p_ctl_name work like a kind of captch...
span($p_string, $p_extra='')
p($p_string, $p_extra='')
echo_error($p_log, $p_line="", $p_message="")
log error into the /tmp/noalyss_error.log it doesn't work on windows
tr($p_string, $p_extra='')
td($p_string='', $p_extra='')
surround the string with td
_("actif, passif,charge,...")
contains the class for connecting to Noalyss
Html Input , create a tag <SELECT> ... </SELECT> if readonly == true then display the label correspon...
catch(Exception $ex) $UserChange