2011-05-23 06:45:29 +00:00

198 lines
6.2 KiB
PHTML

<div id="center">
<?php if (!empty($this->message)) { ?>
<div style="margin:5px; padding: 0pt 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&eacute; (NOM/Pr&eacute;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->nom.' '.$this->prenom ; } ?>
</div>
<div class="infoTitle StyleInfoLib">R&eacute;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->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&eacute;ros de t&eacute;l&eacute;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>
<?php
//Consomation
if (in_array($this->options->profil, array('Administrateur', 'SuperAdministrateur'))){
echo $this->action('conso', 'user');
}
?>
</div>
<h2>Moteur de recherche</h2>
<div class="paragraph">
<div class="infoTitle StyleInfoLib">R&eacute;sultats par page</div>
<div class="infoData">
<select name="frmOptions[rech_nbrep]">
<?
$opts = array(10, 20, 30, 40, 50, 100, 150, 200);
foreach($opts as $opt)
{
$selected = '';
if($opt == $login['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&eacute;s<br/>
<input type="checkbox" name="frmOptions[rech_limites][]" value="sieges" checked disabled class="noborder"/> les &eacute;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">
<?=$this->options->profil?>
</div>
<div class="infoTitle StyleInfoLib">Droits d&#039;acc&egrave;s</div>
<div class="infoData">
<?php
foreach ($this->droitsClients as $droit) {
$check = '';
if (in_array(strtolower($droit), $this->droits)){
$check = ' checked';
}
?>
<input type="checkbox" name="frmOptions[droits][]" value="<?=$droit?>"<?=$check?> class="noborder"/>
<?php echo $this->droitsLib[strtoupper($droit)]?><br/>
<?php }?>
</div>
<div class="infoTitle StyleInfoLib">Pr&eacute;f&eacute;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"/>
</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>