0337d704 |
1 | {**************************************************************************} |
2 | {* *} |
50a40a33 |
3 | {* Copyright (C) 2003-2006 Polytechnique.org *} |
0337d704 |
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} |
f81d9dad |
36 | <form method="post" action="admin/user"> |
0337d704 |
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} |
40 | <input type="submit" name="u_kill" value="continuer" /> |
41 | </div> |
42 | </form> |
43 | {else} |
44 | |
f81d9dad |
45 | <form method="post" action="admin/user"> |
0337d704 |
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 " /> |
68 | <input type="submit" name="suid_button" value=" su " /> |
69 | <input type="submit" name="ax_button" value=" AX " /> |
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() { |
46bde4d1 |
87 | document.forms.auth.hashpass.value = hash_encrypt(document.forms.edit.password.value); |
0337d704 |
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 | } |
8ffa657a |
101 | function act_fwd(fwd, activate) { |
102 | if (activate) |
103 | document.forms.fwds.activate_fwd.value = fwd; |
104 | else |
105 | document.forms.fwds.deactivate_fwd.value = fwd; |
106 | document.forms.fwds.submit(); |
107 | } |
0337d704 |
108 | // ]]> |
109 | </script> |
110 | {/literal} |
111 | |
f81d9dad |
112 | <form id="auth" method="post" action="admin/user"> |
0337d704 |
113 | <table cellspacing="0" cellpadding="2" class="tinybicol"> |
114 | <tr> |
115 | <th> |
116 | UID et Matricule |
117 | </th> |
118 | <th> |
119 | {$mr.user_id} / {$mr.matricule} |
120 | <input type="hidden" name="user_id" value="{$mr.user_id}" /> |
121 | </th> |
122 | </tr> |
123 | <tr class="pair"> |
124 | <td class="titre"> |
125 | Mot de passe |
126 | </td> |
127 | <td> |
128 | <input type="text" name="newpass_clair" size="10" maxlength="10" value="********" /> |
129 | <input type="hidden" name="passw" size="32" maxlength="32" value="{$mr.password}" /> |
130 | <input type="hidden" name="hashpass" value="" /> |
131 | </td> |
132 | </tr> |
133 | <tr class="pair"> |
134 | <td class="titre"> |
135 | Nom |
136 | </td> |
137 | <td> |
138 | <input type="text" name="nomN" size="20" maxlength="255" value="{$mr.nom}" /> |
139 | </td> |
140 | </tr> |
141 | <tr class="pair"> |
142 | <td class="titre"> |
143 | Nom d'usage |
144 | </td> |
145 | <td> |
146 | <input type="text" name="nomusageN" size="20" maxlength="255" value="{$mr.nom_usage}" /> |
147 | </td> |
148 | </tr> |
149 | <tr class="pair"> |
150 | <td class="titre"> |
151 | Prénom |
152 | </td> |
153 | <td> |
154 | <input type="text" name="prenomN" size="20" maxlength="30" value="{$mr.prenom}" /> |
155 | </td> |
156 | </tr> |
157 | <tr class="pair"> |
158 | <td class="titre"> |
d2958bcf |
159 | Sexe |
160 | </td> |
161 | <td> |
162 | femme <input type="radio" name="sexeN" {if $mr.sexe eq 'femme'}checked="checked"{/if} value='femme'/> |
163 | <input type="radio" name="sexeN" {if $mr.sexe neq 'femme'}checked="checked"{/if} value=''/> homme |
164 | </td> |
165 | </tr> |
166 | <tr class="pair"> |
167 | <td class="titre"> |
0337d704 |
168 | Droits |
169 | </td> |
170 | <td> |
171 | <select name="permsN"> |
172 | <option value="user" {if $mr.perms eq "user"}selected="selected"{/if}>user</option> |
173 | <option value="admin" {if $mr.perms eq "admin"}selected="selected"{/if}>admin</option> |
174 | <option value="pending" {if $mr.perms eq "pending"}selected="selected"{/if}>pending</option> |
175 | <option value="disabled" {if $mr.perms eq "disabled"}selected="selected"{/if}>disabled</option> |
176 | </select> |
177 | </td> |
178 | </tr> |
179 | <tr class="pair"> |
180 | <td class="titre"> |
181 | Date de naissance |
182 | </td> |
183 | <td> |
184 | <input type="text" name="naissanceN" size="12" maxlength="10" value="{$mr.naissance}" /> |
185 | </td> |
186 | </tr> |
187 | <tr class="pair"> |
188 | <td class="titre"> |
34ffe99a |
189 | Date de décès |
190 | </td> |
191 | <td> |
192 | <input type="text" name="decesN" size="12" maxlength="10" value="{$mr.deces}" /> |
193 | </td> |
194 | </tr> |
195 | <tr class="pair"> |
196 | <td class="titre"> |
0337d704 |
197 | Promo |
198 | </td> |
199 | <td> |
200 | <input type="text" name="promoN" size="4" maxlength="4" value="{$mr.promo}" /> |
201 | </td> |
202 | </tr> |
203 | <tr class="impair"> |
204 | <td class="titre"> |
205 | Commentaire |
206 | </td> |
207 | <td> |
208 | <input type="text" name="commentN" size="40" maxlength="64" value="{$mr.comment}" /> |
209 | </td> |
210 | </tr> |
211 | <tr class="center"> |
212 | <td> |
7b2413f6 |
213 | <a href="profile/{$mr.forlife}" class="popup2">[Voir fiche]</a> |
0337d704 |
214 | </td> |
215 | <td> |
216 | <input onclick="doEditUser(); return true;" type="submit" name="u_edit" value="UPDATE" /> |
217 | </td> |
218 | </tr> |
219 | <tr class="center"> |
220 | <td> |
86f0a6af |
221 | <a href="admin/trombino/{$mr.user_id}">[Trombino]</a> |
0337d704 |
222 | </td> |
223 | <td> |
224 | <input type="submit" name="u_kill_conf" value="Désinscrire" /> |
225 | </td> |
226 | </tr> |
227 | </table> |
228 | </form> |
229 | <p> |
230 | Ne pas utiliser [Désinscrire] si le but est d'exclure la personne. |
231 | Pour ceci changer ses permissions en 'disabled'. |
232 | </p> |
f81d9dad |
233 | <form id="alias" method="post" action="admin/user"> |
0337d704 |
234 | <table class="tinybicol" cellpadding="2" cellspacing="0"> |
235 | <tr> |
236 | <th class="alias" colspan="2"> |
237 | Alias e-mail |
238 | </th> |
239 | </tr> |
240 | {iterate from=$aliases item=a} |
241 | <tr class="{cycle values="impair,pair"}"> |
242 | <td> |
243 | <input type="radio" name='best' {if $a.best}checked="checked"{/if} value='{$a.alias}' onclick="this.form.submit()" /> |
244 | {if $a.for_life}<strong>{$a.alias}</strong>{else}{$a.alias}{/if} |
245 | {if $a.expire}<span class='erreur'>(expire le {$a.expire|date_format})</span>{/if} |
246 | </td> |
247 | {if $a.for_life} |
248 | <td>garanti à vie*</td> |
249 | {else} |
250 | <td class="action"> |
251 | <a href="javascript:del_alias('{$a.alias}')">delete</a> |
252 | </td> |
253 | {/if} |
254 | </tr> |
255 | {/iterate} |
256 | <tr class="{cycle values="impair,pair"}"> |
257 | <td class="detail"> |
258 | <input type="text" name="email" size="29" maxlength="60" value="" /> |
259 | </td> |
260 | <td class="action"> |
261 | <input type="hidden" name="user_id" value="{$mr.user_id}" /> |
262 | <input type="hidden" name="del_alias" value="" /> |
263 | <input type="submit" name="add_alias" value="Ajouter" /> |
264 | </td> |
265 | </tr> |
266 | </table> |
267 | </form> |
268 | |
269 | <p> |
270 | <strong>* à ne modifier qu'avec l'accord express de l'utilisateur !!!</strong> |
271 | </p> |
272 | |
f81d9dad |
273 | <form id="fwds" method="post" action="admin/user#fwds"> |
0337d704 |
274 | <table class="bicol" cellpadding="2" cellspacing="0"> |
275 | <tr> |
8ffa657a |
276 | <th colspan="4"> |
0337d704 |
277 | Redirections |
278 | </th> |
279 | </tr> |
280 | {foreach item=mail from=$emails} |
281 | <tr> |
282 | <td class="titre"> |
283 | {if $mail->active}active{/if} |
284 | </td> |
285 | <td> |
8ffa657a |
286 | <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> |
287 | </td> |
288 | <td> |
0337d704 |
289 | {$mail->email} |
290 | </td> |
291 | <td class="action"> |
292 | <a href="javascript:del_fwd('{$mail->email}')">delete</a> |
293 | </td> |
294 | </tr> |
295 | {/foreach} |
296 | <tr> |
8ffa657a |
297 | <td class="titre" colspan="2"> |
0337d704 |
298 | Ajouter un email |
299 | </td> |
300 | <td> |
301 | <input type="text" name="email" size="29" maxlength="60" value="" /> |
302 | </td> |
303 | <td class="action"> |
304 | <input type="hidden" name="user_id" value="{$mr.user_id}" /> |
305 | <input type="hidden" name="del_fwd" value="" /> |
8ffa657a |
306 | <input type="hidden" name="activate_fwd" value="" /> |
307 | <input type="hidden" name="deactivate_fwd" value="" /> |
0337d704 |
308 | <input type="submit" name="add_fwd" value="Ajouter" /> |
309 | </td> |
310 | </tr> |
311 | </table> |
312 | </form> |
313 | |
314 | {foreach from=$emails item=mail} |
315 | {if $email->panne && $email->panne neq "0000-00-00"} |
316 | <p class="erreur"> |
317 | Panne pour l'email "{$mail->email}" le {$mail->panne|date_format} |
318 | </p> |
319 | {/if} |
320 | {/foreach} |
321 | {/if} |
322 | {/if} |
323 | |
324 | {* vim:set et sw=2 sts=2 sws=2: *} |