{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2006 Polytechnique.org *}
+{* Copyright (C) 2003-2008 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
-{if $smarty.session.suid}
-<p class="erreur">
-Attention, déjà en SUID !!!
-</p>
-{/if}
-
<h1>
Gestion des utilisateurs
</h1>
{if $smarty.post.u_kill_conf}
<form method="post" action="admin/user">
+ {xsrf_token_field}
<div class="center">
<input type="hidden" name="user_id" value="{$smarty.request.user_id}" />
Confirmer la suppression de {$smarty.request.user_id}
{else}
<form method="post" action="admin/user">
+ {xsrf_token_field}
<table class="tinybicol" cellspacing="0" cellpadding="2">
<tr>
<th>
Administrer
</th>
</tr>
- {if !$smarty.request.login && !$mr.forlife}
+ {if !$smarty.request.login && !$mr.hruid}
<tr class="pair">
<td class="center">
- Il est possible d'entrer ici n'importe quelle adresse mail : redirection, melix, ou alias.
+ Il est possible d'entrer ici n'importe quelle adresse email : redirection, melix, ou alias.
</td>
</tr>
{/if}
<tr>
<td class="center">
- <input type="text" name="login" size="40" maxlength="255" value="{$smarty.request.login|default:$mr.forlife}" />
+ <input type="text" name="login" size="40" maxlength="255" value="{$smarty.request.login|default:$mr.hruid}" />
</td>
</tr>
<tr>
{if $mr}
<p class="smaller">
-Derniére connexion le <strong>{$lastlogin|date_format:"%d %B %Y, %T"}</strong>
-depuis <strong>{$host}</strong>
+Dernière connexion le <strong>{$lastlogin|date_format:"%d %B %Y, %T"}</strong>
+depuis <strong>{$host}</strong>.
</p>
{literal}
document.forms.fwds.deactivate_fwd.value = fwd;
document.forms.fwds.submit();
}
+function clean_fwd(fwd) {
+ document.forms.fwds.clean_fwd.value = fwd;
+ document.forms.fwds.submit();
+}
+function ban_write()
+{
+ document.forms.bans.write_perm.value = "!xorg.*";
+}
+function ban_read()
+{
+ document.forms.bans.read_perm.value = "!xorg.*";
+}
+
// ]]>
</script>
{/literal}
<form id="auth" method="post" action="admin/user">
+ {xsrf_token_field}
<table cellspacing="0" cellpadding="2" class="tinybicol">
<tr>
- <th>
- UID et Matricule
- </th>
- <th>
- {$mr.user_id} / {$mr.matricule}
+ <th colspan="2">
+ <div style="float: right; text-align: right">
+ Matricule = {$mr.matricule}<br />
+ Matricule AX = {$mr.matricule_ax}
+ </div>
+ <div style="float: left; text-align: left">
+ UID = {$mr.user_id}<br />
+ Inscription = {$mr.date_ins|date_format}
+ </div>
<input type="hidden" name="user_id" value="{$mr.user_id}" />
</th>
</tr>
Mot de passe
</td>
<td>
- <input type="text" name="newpass_clair" size="10" maxlength="10" value="********" />
- <input type="hidden" name="passw" size="32" maxlength="32" value="{$mr.password}" />
- <input type="hidden" name="hashpass" value="" />
+ <div style="float: left">
+ <input type="text" name="newpass_clair" size="10" maxlength="10" value="********" />
+ <input type="hidden" name="passw" size="32" maxlength="32" value="{$mr.password}" />
+ <input type="hidden" name="hashpass" value="" />
+ </div>
+ <div style="float: left; margin-top: 5px;">
+ {checkpasswd prompt="newpass_clair" submit="dummy_none"}
+ </div>
</td>
</tr>
<tr class="pair">
</tr>
<tr class="pair">
<td class="titre">
- Prénom
+ Prénom
</td>
<td>
<input type="text" name="prenomN" size="20" maxlength="30" value="{$mr.prenom}" />
Sexe
</td>
<td>
- femme <input type="radio" name="sexeN" {if $mr.sexe eq 'femme'}checked="checked"{/if} value='femme'/>
- <input type="radio" name="sexeN" {if $mr.sexe neq 'femme'}checked="checked"{/if} value=''/> homme
+ <label>femme <input type="radio" name="sexeN" {if $mr.sexe}checked="checked"{/if} value='1'/></label>
+ <label><input type="radio" name="sexeN" {if !$mr.sexe}checked="checked"{/if} value='0'/> homme</label>
</td>
</tr>
<tr class="pair">
</select>
</td>
</tr>
+ {if $mr.perms neq 'pending'}
<tr class="pair">
<td class="titre">
+ {if $mr.naiss_err}<span class="erreur">{/if}
Date de naissance
+ {if $mr.naiss_err}</span>{/if}
</td>
<td>
<input type="text" name="naissanceN" size="12" maxlength="10" value="{$mr.naissance}" />
+ {if $mr.naissance_ini neq '0000-00-00' && $mr.naissance neq $mr.naissance_ini}
+ <span class="erreur smaller">({icon name=error}Date de naissance connue : {$mr.naissance_ini})</span>
+ {elseif $mr.naiss_err}
+ <span class="erreur smaller">({icon name=error}Date de naissance incohérente)</span>
+ {/if}
</td>
</tr>
+ {/if}
<tr class="pair">
<td class="titre">
- Date de décès
+ Date de décès
</td>
<td>
<input type="text" name="decesN" size="12" maxlength="10" value="{$mr.deces}" />
</tr>
<tr class="impair">
<td class="titre">
+ Surveillance
+ </td>
+ <td>
+ <label><input type="checkbox" name="watchN" {if $mr.watch}checked="checked"{/if} />
+ Surveiller l'activité de ce compte</label><br />
+ <span class="smaller">Cette option permet d'avoir des logs complets de l'activité
+ du compte via le logger, et d'être alerté lors des connexions de l'utilisateur.</span>
+ </td>
+ </tr>
+ <tr class="impair">
+ <td class="titre">
Commentaire
</td>
<td>
<input type="text" name="commentN" size="40" maxlength="64" value="{$mr.comment}" />
</td>
</tr>
+ {if $mr.perms eq 'pending'}
+ <tr class="center">
+ <td colspan="2">
+ <input type="hidden" name="naissanceN" value="{$mr.naissance}" />
+ <input onclick="doEditUser(); return true;" type="submit" name="u_edit" value="UPDATE" />
+ </td>
+ </tr>
+ {else}
<tr class="center">
<td>
- <a href="profile/{$mr.forlife}" class="popup2">[Voir fiche]</a>
+ <a href="profile/{$mr.hruid}" class="popup2">[Voir fiche]</a>
</td>
<td>
<input onclick="doEditUser(); return true;" type="submit" name="u_edit" value="UPDATE" />
<a href="admin/trombino/{$mr.user_id}">[Trombino]</a>
</td>
<td>
- <input type="submit" name="u_kill_conf" value="Désinscrire" />
+ <input type="submit" name="u_kill_conf" value="Désinscrire" />
</td>
</tr>
+ {/if}
</table>
</form>
+{if $mr.perms neq 'pending'}
<p>
-Ne pas utiliser [Désinscrire] si le but est d'exclure la personne.
+Ne pas utiliser [Désinscrire] si le but est d'exclure la personne.
Pour ceci changer ses permissions en 'disabled'.
</p>
<form id="alias" method="post" action="admin/user">
+ {xsrf_token_field}
<table class="tinybicol" cellpadding="2" cellspacing="0">
<tr>
- <th class="alias" colspan="2">
- Alias e-mail
+ <th class="alias" colspan="3">
+ Alias email
</th>
</tr>
{iterate from=$aliases item=a}
<tr class="{cycle values="impair,pair"}">
<td>
<input type="radio" name='best' {if $a.best}checked="checked"{/if} value='{$a.alias}' onclick="this.form.submit()" />
+ </td>
+ <td>
{if $a.for_life}<strong>{$a.alias}</strong>{else}{$a.alias}{/if}
{if $a.expire}<span class='erreur'>(expire le {$a.expire|date_format})</span>{/if}
</td>
{if $a.for_life}
- <td>garanti à vie*</td>
+ <td>garanti à vie*</td>
{else}
<td class="action">
<a href="javascript:del_alias('{$a.alias}')">delete</a>
{/if}
</tr>
{/iterate}
+ {iterate from=$virtuals item=virtual}
<tr class="{cycle values="impair,pair"}">
- <td class="detail">
+ <td></td>
+ <td>{$virtual.alias}</td>
+ <td></td>
+ </tr>
+ {/iterate}
+ <tr class="{cycle values="impair,pair"}">
+ <td colspan="2" class="detail">
<input type="text" name="email" size="29" maxlength="60" value="" />
</td>
<td class="action">
</table>
</form>
-<p>
-<strong>* à ne modifier qu'avec l'accord express de l'utilisateur !!!</strong>
-</p>
+<p><strong>* à ne modifier qu'avec l'accord express de l'utilisateur !!!</strong></p>
+
+<form id="bans" method="post" action="admin/user">
+ {xsrf_token_field}
+ <table cellspacing="0" cellpadding="2" class="tinybicol">
+ <tr>
+ <th colspan="4">
+ Permissions sur les forums
+ </th>
+ </tr>
+ <tr class="impair">
+ <td class="titre">
+ Poster
+ </td>
+ <td>
+ <input type="text" name="write_perm" size="32" maxlength="255" value="{$bans.write_perm}" />
+ </td>
+ <td class="action">
+ <a href="javascript:ban_write()">Bannir</a>
+ </td>
+ </tr>
+ <tr class="pair">
+ <td class="titre">
+ Lire
+ </td>
+ <td>
+ <input type="text" name="read_perm" size="32" maxlength="255" value="{$bans.read_perm}" />
+ </td>
+ <td class="action">
+ <a href="javascript:ban_read()">Bannir</a>
+ </td>
+ </tr>
+ <tr class="impair">
+ <td class="titre">
+ Commentaire
+ </td>
+ <td colspan="2">
+ <input type="text" name="comment" size="40" maxlength="255" value="{$bans.comment}" />
+ </td>
+ </tr>
+ <tr class="center">
+ <td colspan="3">
+ <input type="hidden" name="user_id" value="{$mr.user_id}" />
+ <input type="submit" name="b_edit" value="Modifier" />
+ </td>
+ </tr>
+ </table>
+</form>
+
+{javascript name="ajax"}
+{test_email hruid=$user->login()}
<form id="fwds" method="post" action="admin/user#fwds">
+ {xsrf_token_field}
<table class="bicol" cellpadding="2" cellspacing="0">
<tr>
<th colspan="4">
Redirections
</th>
</tr>
+ {assign var=actives value=false}
+ {assign var=disabled value=false}
{foreach item=mail from=$emails}
- <tr>
+ {cycle assign=class values="impair,pair"}
+ <tr class="{$class}">
+ {if $mail->active && $mail->has_disable()}
+ {assign var=actives value=true}
+ {elseif $mail->disabled && $mail->has_disable()}
+ {assign var=disabled value=true}
+ {/if}
<td class="titre">
- {if $mail->active}active{/if}
+ {if $mail->active}active{elseif $mail->disabled}suspendue{/if}
</td>
<td>
- <span class="smaller"><a href="javascript:act_fwd('{$mail->email}',{if $mail->active}false{else}true{/if})">{if $mail->active}des{/if}activer</a></span>
+ <span class="smaller">
+ {if !$mail->disabled}
+ <a href="javascript:act_fwd('{$mail->email}',{if $mail->active}false{else}true{/if})">
+ {if $mail->active}des{elseif $mail->broken}ré{/if}activer
+ </a>
+ {/if}
+ </span>
</td>
<td>
- {$mail->email}
+ {if $mail->broken}<span style="color: #f00">{/if}
+ {if $mail->email == 'googleapps'}<a href="admin/googleapps/user/{$mr.hruid}">{/if}
+ {$mail->display_email}
+ {if $mail->email == 'googleapps'}</a>{/if}
+ {if $mail->broken}<em> (en panne)</em></span>{/if}
</td>
<td class="action">
+ {if $mail->is_removable()}
<a href="javascript:del_fwd('{$mail->email}')">delete</a>
+ {/if}
</td>
</tr>
+ {if $mail->panne && $mail->panne neq "0000-00-00"}
+ <tr class="{$class}">
+ <td colspan="3" class="smaller" style="color: #f00">
+ {icon name=error title="Panne"}
+ Panne de {$mail->display_email} le {$mail->panne|date_format}
+ {if $mail->panne neq $mail->last}confirmée le {$mail->last|date_format}{/if}
+ </td>
+ <td class="action">
+ <a href="javascript:clean_fwd('{$mail->email}')">effacer les pannes</a>
+ </td>
+ </tr>
+ {/if}
{/foreach}
- <tr>
+ {cycle assign=class values="impair,pair"}
+ <tr class="{$class}">
<td class="titre" colspan="2">
- Ajouter un email
+ Ajouter une adresse
</td>
<td>
<input type="text" name="email" size="29" maxlength="60" value="" />
<td class="action">
<input type="hidden" name="user_id" value="{$mr.user_id}" />
<input type="hidden" name="del_fwd" value="" />
+ <input type="hidden" name="clean_fwd" value="" />
<input type="hidden" name="activate_fwd" value="" />
<input type="hidden" name="deactivate_fwd" value="" />
<input type="submit" name="add_fwd" value="Ajouter" />
</td>
</tr>
+ <tr class="{$class}">
+ <td colspan="4" class="center">
+ {if $actives}
+ <input type="submit" name="disable_fwd" value="Désactiver la redirection des emails" />
+ {/if}
+ {if $disabled}
+ <input type="submit" name="enable_fwd" value="Réactiver la redirection des emails" />
+ {/if}
+ </td>
+ </tr>
</table>
</form>
-{foreach from=$emails item=mail}
-{if $email->panne && $email->panne neq "0000-00-00"}
-<p class="erreur">
-Panne pour l'email "{$mail->email}" le {$mail->panne|date_format}
-</p>
{/if}
-{/foreach}
{/if}
{/if}
-{* vim:set et sw=2 sts=2 sws=2: *}
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}