223 lines
7.0 KiB
PHTML
223 lines
7.0 KiB
PHTML
<div id="center">
|
|
<?php if (!empty($this->message)) { ?>
|
|
<div style="margin:5px; padding: 5pt 0.7em;" class="ui-state-highlight ui-corner-all">
|
|
<p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-info"></span>
|
|
<?=$this->message?>
|
|
</p></div>
|
|
<?php } ?>
|
|
|
|
<h1 class="titre">PROFIL UTILISATEUR</h1>
|
|
|
|
<div class="paragraph">
|
|
|
|
<form id="moncompte" name="moncompte" action="/user" method="post">
|
|
<input type="hidden" name="referer" value="<?=$_REQUEST['referer']?>"/>
|
|
<input type="hidden" name="login" value="<?=$this->loginVu?>"/>
|
|
<input type="hidden" name="frmOptions[idClient]" value="<?=$this->options->idClient?>"/>
|
|
<input type="hidden" name="frmOptions[action]" value="<?=$this->action?>"/>
|
|
|
|
<div class="infoTitle StyleInfoLib">Identifiant utilisateur</div>
|
|
<div class="infoData">
|
|
<?php
|
|
if ($this->action != 'new') {
|
|
echo $this->loginVu;
|
|
} else {
|
|
?>
|
|
<input type="text" size="20" maxlength="80" name="frmOptions[login]" value="<?=$this->loginNew?>"/>
|
|
<?php
|
|
}
|
|
?>
|
|
</div>
|
|
|
|
<div class="infoTitle StyleInfoLib">Identité (NOM/Prénom)</div>
|
|
<div class="infoData">
|
|
<?php if ($this->isAdmin) { ?>
|
|
<input type="text" size="20" maxlength="80" name="frmOptions[nom]" value="<?=$this->options->nom?>"/>
|
|
<input type="text" size="20" maxlength="80" name="frmOptions[prenom]" value="<?=$this->options->prenom?>"/>
|
|
<?php
|
|
} else { echo $this->options->nom.' '.$this->options->prenom ; } ?>
|
|
</div>
|
|
|
|
<div class="infoTitle StyleInfoLib">Réf. facturation (service, etc...)</div>
|
|
<div class="infoData">
|
|
<?php if ($this->isAdmin) { ?>
|
|
<input type="text" size="20" maxlength="80" name="frmOptions[reference]" value="<?=$this->options->reference?>"/>
|
|
<? } else { echo $this->options->reference; } ?>
|
|
</div>
|
|
|
|
<div class="infoTitle StyleInfoLib">Adresse e-mail</div>
|
|
<div class="infoData">
|
|
<input type="text" size="30" maxlength="80" name="frmOptions[email]" value="<?=$this->options->email?>"/>
|
|
</div>
|
|
|
|
<div class="infoTitle StyleInfoLib">
|
|
Numéros de téléphone<br/><i>(Fixe, Fax, Mobile)</i>
|
|
</div>
|
|
<div class="infoData">
|
|
<input type="text" size="10" maxlength="15" name="frmOptions[tel_fix]" value="<?=$this->options->tel?>"/>
|
|
<input type="text" size="10" maxlength="15" name="frmOptions[tel_fax]" value="<?=$this->options->fax?>"/>
|
|
<input type="text" size="10" maxlength="15" name="frmOptions[tel_mob]" value="<?=$this->options->mobile?>"/>
|
|
</div>
|
|
<br/>
|
|
|
|
<div class="infoTitle StyleInfoLib">Mot de passe</div>
|
|
<div class="infoData last">
|
|
<?php
|
|
if ($this->action=='new') {
|
|
$typeChamp = 'password';
|
|
$changePassword = 1;
|
|
} else {
|
|
$typeChamp = 'hidden';
|
|
$changePassword = 0;
|
|
?>
|
|
<a href="#" id="password">Modifier le mot de passe.</a>
|
|
<?php
|
|
}
|
|
?>
|
|
<input type="<?=$typeChamp?>" name="frmOptions[password]" value="password"/>
|
|
<input type="hidden" name="frmOptions[changepwd]" value="<?php echo $changePassword?>"/>
|
|
</div>
|
|
|
|
<div class="infoTitle StyleInfoLib">Relevé de consommation</div>
|
|
<?php
|
|
//Consomation
|
|
if ($this->isAdmin || $this->isSuperAdmin){
|
|
echo $this->action('conso', 'user', null, array(
|
|
'login' => $this->loginVu,
|
|
'idClient' => $this->options->idClient)
|
|
);
|
|
}
|
|
?>
|
|
</div>
|
|
|
|
<h2>Moteur de recherche</h2>
|
|
<div class="paragraph">
|
|
|
|
<div class="infoTitle StyleInfoLib">Résultats par page</div>
|
|
<div class="infoData">
|
|
<select name="frmOptions[rech_nbrep]">
|
|
<?php
|
|
$opts = array(10, 20, 30, 40, 50, 100, 150, 200);
|
|
foreach($opts as $opt)
|
|
{
|
|
$selected = '';
|
|
if($opt == $this->options->nbReponses) $selected = 'selected';
|
|
?><option value="<?=$opt?>" <?=$selected?>><?=$opt?></option><?php
|
|
}
|
|
?>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="infoTitle StyleInfoLib">Inclure</div>
|
|
<div class="infoData last">
|
|
<input type="checkbox" name="frmOptions[rech_limites][]" value="assocs" checked disabled class="noborder"/> les associations<br/>
|
|
<input type="checkbox" name="frmOptions[rech_limites][]" value="actifs" checked disabled class="noborder"/> les actifs<br/>
|
|
<input type="checkbox" name="frmOptions[rech_limites][]" value="radies" checked disabled class="noborder"/> les radiés<br/>
|
|
<input type="checkbox" name="frmOptions[rech_limites][]" value="sieges" checked disabled class="noborder"/> les établissements secondaires
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<h2>Surveillance</h2>
|
|
<div class="paragraph">
|
|
|
|
<div class="infoTitle StyleInfoLib">Supports pour les alertes</div>
|
|
<div class="infoData last">
|
|
<input type="checkbox" name="frmOptions[alertes][]" value="sms" disabled class="noborder"/> SMS<br/>
|
|
<input type="checkbox" name="frmOptions[alertes][]" value="fax" disabled class="noborder"/> Fax<br/>
|
|
<input type="checkbox" name="frmOptions[alertes][]" value="mail" checked disabled class="noborder"/> Mail<br/>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<h2>Gestion des droits</h2>
|
|
<div class="paragraph">
|
|
|
|
<div class="infoTitle StyleInfoLib">Type de profil</div>
|
|
<div class="infoData">
|
|
<?php if ($this->isSuperAdmin){ ?>
|
|
<select name="frmOptions[profil]">
|
|
<?php
|
|
$profil = array('Utilisateur', 'Administrateur', 'SuperAdministrateur');
|
|
foreach ($profil as $item){
|
|
$select = '';
|
|
if ($this->options->profil == $item){
|
|
$select = ' selected';
|
|
}
|
|
?>
|
|
<option value="<?=$item?>"<?=$select?>><?=$item?></option>
|
|
<?php }?>
|
|
</select>
|
|
|
|
<?php } else { ?>
|
|
<input type="hidden" name="frmOptions[profil]" value="<?=$this->options->profil?>" />
|
|
<?=$this->options->profil?>
|
|
<?php }?>
|
|
</div>
|
|
|
|
<div class="infoTitle StyleInfoLib">Droits d'accès</div>
|
|
<div class="infoData">
|
|
<?php
|
|
foreach ($this->droitsClients as $droit) {
|
|
if (empty($droit)) continue;
|
|
$check = '';
|
|
if ( count($this->droits)>0 && in_array(strtolower($droit), $this->droits) ) {
|
|
$check = ' checked';
|
|
}
|
|
$disable = '';
|
|
if ( !$this->isAdmin ) {
|
|
$disable = ' disabled';
|
|
}
|
|
?>
|
|
<input type="checkbox" name="frmOptions[droits][]" value="<?=$droit?>"<?=$check?><?=$disable?> class="noborder"/>
|
|
<?=$this->droitsLib[strtoupper($droit)]?><br/>
|
|
<?php }?>
|
|
</div>
|
|
|
|
<div class="infoTitle StyleInfoLib">Préférences</div>
|
|
<div class="infoData last">
|
|
<?php
|
|
foreach ($this->prefsLib as $code => $lib) {
|
|
$check = '';
|
|
if (in_array(strtolower($code), $this->pref)) {
|
|
$check = ' checked';
|
|
}
|
|
?>
|
|
<input type="checkbox" name="frmOptions[pref][]" value="<?=strtolower($code)?>"<?=$check?> class="noborder"/>
|
|
<?php echo $lib?><br/>
|
|
<?php }?>
|
|
</div>
|
|
|
|
<?php
|
|
if ( $this->options->idClient == 1 && !in_array('edition',$this->droits) ) {
|
|
?>
|
|
<h2>Mode spéciaux</h2>
|
|
<div class="infoTitle StyleInfoLib">Mode Edition</div>
|
|
<div class="infoData last">
|
|
<?php
|
|
$check = '';
|
|
if ( $this->options->modeEdition==true ) {
|
|
$check = ' checked';
|
|
}
|
|
?>
|
|
<input type="checkbox" name="modeEdition" value="1"<?=$check?> class="noborder"/>
|
|
<span id="msgModeEdition"></span>
|
|
</div>
|
|
<?php }?>
|
|
|
|
</div>
|
|
<div class="submit"><p class="submit-button"><input type="submit" class="button" value="Sauver"/></p></div>
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div id="dialog" title="Modifier le mot de passe">
|
|
<form>
|
|
<label for="npass1">Nouveau mot de passe</label><br/>
|
|
<input type="password" name="npass1" size="15" maxlength="32"/><br/>
|
|
<label for="npass2">Répéter le nouveau mot de passe</label><br/>
|
|
<input type="password" name="npass2" size="15" maxlength="32"/><br/>
|
|
<span id="form-message"></span>
|
|
</form>
|
|
</div>
|