facilite l'upgrade vers 0.9.10
[platal.git] / templates / admin / utilisateurs.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2006 Polytechnique.org                             *}
4 {*  http://opensource.polytechnique.org/                                  *}
5 {*                                                                        *}
6 {*  This program is free software; you can redistribute it and/or modify  *}
7 {*  it under the terms of the GNU General Public License as published by  *}
8 {*  the Free Software Foundation; either version 2 of the License, or     *}
9 {*  (at your option) any later version.                                   *}
10 {*                                                                        *}
11 {*  This program is distributed in the hope that it will be useful,       *}
12 {*  but WITHOUT ANY WARRANTY; without even the implied warranty of        *}
13 {*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *}
14 {*  GNU General Public License for more details.                          *}
15 {*                                                                        *}
16 {*  You should have received a copy of the GNU General Public License     *}
17 {*  along with this program; if not, write to the Free Software           *}
18 {*  Foundation, Inc.,                                                     *}
19 {*  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA               *}
20 {*                                                                        *}
21 {**************************************************************************}
22
23
24 {if $smarty.session.suid}
25 <p class="erreur">
26 Attention, déjà en SUID !!!
27 </p>
28 {/if}
29
30 <h1>
31   Gestion des utilisateurs
32 </h1>
33
34
35 {if $smarty.post.u_kill_conf}
36 <form method="post" action="{$smarty.server.PHP_SELF}">
37   <div class="center">
38     <input type="hidden" name="user_id" value="{$smarty.request.user_id}" />
39     Confirmer la suppression de {$smarty.request.user_id}&nbsp;&nbsp;
40     <input type="submit" name="u_kill" value="continuer" />
41   </div>
42 </form>
43 {else}
44
45 <form method="post" action="{$smarty.server.PHP_SELF}">
46   <table class="tinybicol" cellspacing="0" cellpadding="2">
47     <tr>
48       <th>
49         Administrer
50       </th>
51     </tr>
52     {if !$smarty.request.login && !$mr.forlife}
53     <tr class="pair">
54       <td class="center">
55         Il est possible d'entrer ici n'importe quelle adresse mail : redirection, melix, ou alias.
56       </td>
57     </tr>
58     {/if}
59     <tr>
60       <td class="center">
61         <input type="text" name="login" size="40" maxlength="255" value="{$smarty.request.login|default:$mr.forlife}" />
62       </td>
63     </tr>
64     <tr>
65       <td class="center">
66         <input type="hidden" name="hashpass" value="" />
67         <input type="submit" name="select" value=" edit " /> &nbsp;&nbsp;
68         <input type="submit" name="suid_button" value=" su " />  &nbsp;&nbsp;
69         <input type="submit" name="ax_button" value=" AX " /> &nbsp;&nbsp;
70         <input type="submit" name="logs_button" value=" logs " />
71       </td>
72     </tr>
73   </table>
74 </form>
75
76 {if $mr}
77
78 <p class="smaller">
79 Derniére connexion le <strong>{$lastlogin|date_format:"%d %B %Y, %T"}</strong>
80 depuis <strong>{$host}</strong>
81 </p>
82
83 {literal}
84 <script type="text/javascript">
85 //<![CDATA[
86 function doEditUser() {
87   document.forms.auth.hashpass.value = MD5(document.forms.edit.password.value);
88   document.forms.auth.password.value = "";
89   document.forms.auth.submit();
90 }
91
92 function del_alias(alias) {
93   document.forms.alias.del_alias.value = alias;
94   document.forms.alias.submit();
95 }
96
97 function del_fwd(fwd) {
98   document.forms.fwds.del_fwd.value = fwd;
99   document.forms.fwds.submit();
100 }
101 // ]]>
102 </script>
103 {/literal}
104
105 <form id="auth" method="post" action="{$smarty.server.PHP_SELF}">
106   <table cellspacing="0" cellpadding="2" class="tinybicol">
107     <tr>
108       <th>
109         UID et Matricule
110       </th>
111       <th>
112         {$mr.user_id} / {$mr.matricule}
113         <input type="hidden" name="user_id" value="{$mr.user_id}" />
114       </th>
115     </tr>
116     <tr class="pair">
117       <td class="titre">
118         Mot de passe
119       </td>
120       <td>
121         <input type="text" name="newpass_clair" size="10" maxlength="10" value="********" />
122         <input type="hidden" name="passw" size="32" maxlength="32" value="{$mr.password}" />
123         <input type="hidden" name="hashpass" value="" />
124       </td>
125     </tr>
126     <tr class="pair">
127       <td class="titre">
128         Nom
129       </td>
130       <td>
131         <input type="text" name="nomN" size="20" maxlength="255" value="{$mr.nom}" />
132       </td>
133     </tr>
134     <tr class="pair">
135       <td class="titre">
136         Nom d'usage
137       </td>
138       <td>
139         <input type="text" name="nomusageN" size="20" maxlength="255" value="{$mr.nom_usage}" />
140       </td>
141     </tr>
142     <tr class="pair">
143       <td class="titre">
144         Prénom
145       </td>
146       <td>
147         <input type="text" name="prenomN" size="20" maxlength="30" value="{$mr.prenom}" />
148       </td>
149     </tr>
150     <tr class="pair">
151       <td class="titre">
152         Sexe
153       </td>
154       <td>
155         femme <input type="radio" name="sexeN" {if $mr.sexe eq 'femme'}checked="checked"{/if} value='femme'/>
156         <input type="radio" name="sexeN" {if $mr.sexe neq 'femme'}checked="checked"{/if} value=''/> homme
157       </td>
158     </tr>
159     <tr class="pair">
160       <td class="titre">
161         Droits
162       </td>
163       <td>
164         <select name="permsN">
165           <option value="user" {if $mr.perms eq "user"}selected="selected"{/if}>user</option>
166           <option value="admin" {if $mr.perms eq "admin"}selected="selected"{/if}>admin</option>
167           <option value="pending" {if $mr.perms eq "pending"}selected="selected"{/if}>pending</option>
168           <option value="disabled" {if $mr.perms eq "disabled"}selected="selected"{/if}>disabled</option>
169         </select>
170       </td>
171     </tr>
172     <tr class="pair">
173       <td class="titre">
174         Date de naissance
175       </td>
176       <td>
177         <input type="text" name="naissanceN" size="12" maxlength="10" value="{$mr.naissance}" />
178       </td>
179     </tr>
180     <tr class="pair">
181       <td class="titre">
182         Promo
183       </td>
184       <td>
185         <input type="text" name="promoN" size="4" maxlength="4" value="{$mr.promo}" />
186       </td>
187     </tr>
188     <tr class="impair">
189       <td class="titre">
190         Commentaire
191       </td>
192       <td>
193         <input type="text" name="commentN" size="40" maxlength="64" value="{$mr.comment}" />
194       </td>
195     </tr>
196     <tr class="center">
197       <td>
198         <a href="{"fiche.php"|url}?user={$mr.forlife}" class="popup2">[Voir fiche]</a>
199       </td>
200       <td>
201         <input onclick="doEditUser(); return true;" type="submit" name="u_edit" value="UPDATE" />
202       </td>
203     </tr>
204     <tr class="center">
205       <td>
206         <a href="admin_trombino.php?uid={$mr.user_id}">[Trombino]</a>
207       </td>
208       <td>
209         <input type="submit" name="u_kill_conf" value="Désinscrire" />
210       </td>
211     </tr>
212   </table>
213 </form>
214 <p>
215 Ne pas utiliser [Désinscrire] si le but est d'exclure la personne.
216 Pour ceci changer ses permissions en 'disabled'.
217 </p>
218 <form id="alias" method="post" action="{$smarty.server.PHP_SELF}">
219   <table class="tinybicol" cellpadding="2" cellspacing="0">
220     <tr>
221       <th class="alias" colspan="2">
222         Alias e-mail
223       </th>
224     </tr>
225     {iterate from=$aliases item=a}
226     <tr class="{cycle values="impair,pair"}">
227       <td>
228         <input type="radio" name='best' {if $a.best}checked="checked"{/if} value='{$a.alias}' onclick="this.form.submit()" />
229         {if $a.for_life}<strong>{$a.alias}</strong>{else}{$a.alias}{/if}
230         {if $a.expire}<span class='erreur'>(expire le {$a.expire|date_format})</span>{/if}
231       </td>
232       {if $a.for_life}
233       <td>garanti à vie*</td>
234       {else}
235       <td class="action">
236         <a href="javascript:del_alias('{$a.alias}')">delete</a>
237       </td>
238       {/if}
239     </tr>
240     {/iterate}
241     <tr class="{cycle values="impair,pair"}">
242       <td class="detail">
243         <input type="text" name="email" size="29" maxlength="60" value="" />
244       </td>
245       <td class="action">
246         <input type="hidden" name="user_id" value="{$mr.user_id}" />
247         <input type="hidden" name="del_alias" value="" />
248         <input type="submit" name="add_alias" value="Ajouter" />
249       </td>
250     </tr>
251   </table>
252 </form>
253
254 <p>
255 <strong>* à ne modifier qu'avec l'accord express de l'utilisateur !!!</strong>
256 </p>
257
258 <form id="fwds" method="post" action="{$smarty.server.PHP_SELF}">
259   <table class="bicol" cellpadding="2" cellspacing="0">
260     <tr>
261       <th colspan="3">
262         Redirections
263       </th>
264     </tr>
265     {foreach item=mail from=$emails}
266     <tr>
267       <td class="titre">
268         {if $mail->active}active{/if}
269       </td>
270       <td>
271         {$mail->email}
272       </td>
273       <td class="action">
274         <a href="javascript:del_fwd('{$mail->email}')">delete</a>
275       </td>
276     </tr>
277     {/foreach}
278     <tr>
279       <td class="titre">
280         Ajouter un email
281       </td>
282       <td>
283         <input type="text" name="email" size="29" maxlength="60" value="" />
284       </td>
285       <td class="action">
286         <input type="hidden" name="user_id" value="{$mr.user_id}" />
287         <input type="hidden" name="del_fwd" value="" />
288         <input type="submit" name="add_fwd" value="Ajouter" />
289       </td>
290     </tr>
291   </table>
292 </form>
293
294 {foreach from=$emails item=mail}
295 {if $email->panne && $email->panne neq "0000-00-00"}
296 <p class="erreur">
297 Panne pour l'email "{$mail->email}" le {$mail->panne|date_format}
298 </p>
299 {/if}
300 {/foreach}
301 {/if}
302 {/if}
303
304 {* vim:set et sw=2 sts=2 sws=2: *}