Oops, uncommited file for [1101]
[platal.git] / templates / admin / utilisateurs.tpl
CommitLineData
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">
26Attention, 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}&nbsp;&nbsp;
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 " /> &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">
79Derniére connexion le <strong>{$lastlogin|date_format:"%d %B %Y, %T"}</strong>
80depuis <strong>{$host}</strong>
81</p>
82
83{literal}
84<script type="text/javascript">
85//<![CDATA[
86function 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
92function del_alias(alias) {
93 document.forms.alias.del_alias.value = alias;
94 document.forms.alias.submit();
95}
96
97function del_fwd(fwd) {
98 document.forms.fwds.del_fwd.value = fwd;
99 document.forms.fwds.submit();
100}
8ffa657a 101function 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>
f97f90f0 115 <th colspan="2">
116 <div style="float: right; text-align: right">
117 Matricule = {$mr.matricule}<br />
118 Matricule AX = {$mr.matricule_ax}
119 </div>
120 <div style="float: left; text-align: left">
121 UID = {$mr.user_id}<br />
122 Inscription = {$mr.date_ins|date_format}
123 </div>
0337d704 124 <input type="hidden" name="user_id" value="{$mr.user_id}" />
125 </th>
126 </tr>
127 <tr class="pair">
128 <td class="titre">
129 Mot de passe
130 </td>
131 <td>
132 <input type="text" name="newpass_clair" size="10" maxlength="10" value="********" />
133 <input type="hidden" name="passw" size="32" maxlength="32" value="{$mr.password}" />
134 <input type="hidden" name="hashpass" value="" />
135 </td>
136 </tr>
137 <tr class="pair">
138 <td class="titre">
139 Nom
140 </td>
141 <td>
142 <input type="text" name="nomN" size="20" maxlength="255" value="{$mr.nom}" />
143 </td>
144 </tr>
145 <tr class="pair">
146 <td class="titre">
147 Nom d'usage
148 </td>
149 <td>
150 <input type="text" name="nomusageN" size="20" maxlength="255" value="{$mr.nom_usage}" />
151 </td>
152 </tr>
153 <tr class="pair">
154 <td class="titre">
155 Prénom
156 </td>
157 <td>
158 <input type="text" name="prenomN" size="20" maxlength="30" value="{$mr.prenom}" />
159 </td>
160 </tr>
161 <tr class="pair">
162 <td class="titre">
d2958bcf 163 Sexe
164 </td>
165 <td>
166 femme <input type="radio" name="sexeN" {if $mr.sexe eq 'femme'}checked="checked"{/if} value='femme'/>
167 <input type="radio" name="sexeN" {if $mr.sexe neq 'femme'}checked="checked"{/if} value=''/> homme
168 </td>
169 </tr>
170 <tr class="pair">
171 <td class="titre">
0337d704 172 Droits
173 </td>
174 <td>
175 <select name="permsN">
176 <option value="user" {if $mr.perms eq "user"}selected="selected"{/if}>user</option>
177 <option value="admin" {if $mr.perms eq "admin"}selected="selected"{/if}>admin</option>
178 <option value="pending" {if $mr.perms eq "pending"}selected="selected"{/if}>pending</option>
179 <option value="disabled" {if $mr.perms eq "disabled"}selected="selected"{/if}>disabled</option>
180 </select>
181 </td>
182 </tr>
183 <tr class="pair">
184 <td class="titre">
185 Date de naissance
186 </td>
187 <td>
188 <input type="text" name="naissanceN" size="12" maxlength="10" value="{$mr.naissance}" />
189 </td>
190 </tr>
191 <tr class="pair">
192 <td class="titre">
34ffe99a 193 Date de décès
194 </td>
195 <td>
196 <input type="text" name="decesN" size="12" maxlength="10" value="{$mr.deces}" />
197 </td>
198 </tr>
199 <tr class="pair">
200 <td class="titre">
0337d704 201 Promo
202 </td>
203 <td>
204 <input type="text" name="promoN" size="4" maxlength="4" value="{$mr.promo}" />
205 </td>
206 </tr>
207 <tr class="impair">
208 <td class="titre">
209 Commentaire
210 </td>
211 <td>
212 <input type="text" name="commentN" size="40" maxlength="64" value="{$mr.comment}" />
213 </td>
214 </tr>
f97f90f0 215 {if $mr.perms eq 'pending'}
216 <tr class="center">
217 <td colspan="2">
218 <input onclick="doEditUser(); return true;" type="submit" name="u_edit" value="UPDATE" />
219 </td>
220 </tr>
221 {else}
0337d704 222 <tr class="center">
223 <td>
7b2413f6 224 <a href="profile/{$mr.forlife}" class="popup2">[Voir fiche]</a>
0337d704 225 </td>
226 <td>
227 <input onclick="doEditUser(); return true;" type="submit" name="u_edit" value="UPDATE" />
228 </td>
229 </tr>
230 <tr class="center">
231 <td>
86f0a6af 232 <a href="admin/trombino/{$mr.user_id}">[Trombino]</a>
0337d704 233 </td>
234 <td>
235 <input type="submit" name="u_kill_conf" value="Désinscrire" />
236 </td>
237 </tr>
f97f90f0 238 {/if}
0337d704 239 </table>
240</form>
f97f90f0 241{if $mr.perms neq 'pending'}
0337d704 242<p>
243Ne pas utiliser [Désinscrire] si le but est d'exclure la personne.
244Pour ceci changer ses permissions en 'disabled'.
245</p>
f81d9dad 246<form id="alias" method="post" action="admin/user">
0337d704 247 <table class="tinybicol" cellpadding="2" cellspacing="0">
248 <tr>
249 <th class="alias" colspan="2">
250 Alias e-mail
251 </th>
252 </tr>
253 {iterate from=$aliases item=a}
254 <tr class="{cycle values="impair,pair"}">
255 <td>
256 <input type="radio" name='best' {if $a.best}checked="checked"{/if} value='{$a.alias}' onclick="this.form.submit()" />
257 {if $a.for_life}<strong>{$a.alias}</strong>{else}{$a.alias}{/if}
258 {if $a.expire}<span class='erreur'>(expire le {$a.expire|date_format})</span>{/if}
259 </td>
260 {if $a.for_life}
261 <td>garanti à vie*</td>
262 {else}
263 <td class="action">
264 <a href="javascript:del_alias('{$a.alias}')">delete</a>
265 </td>
266 {/if}
267 </tr>
268 {/iterate}
269 <tr class="{cycle values="impair,pair"}">
270 <td class="detail">
271 <input type="text" name="email" size="29" maxlength="60" value="" />
272 </td>
273 <td class="action">
274 <input type="hidden" name="user_id" value="{$mr.user_id}" />
275 <input type="hidden" name="del_alias" value="" />
276 <input type="submit" name="add_alias" value="Ajouter" />
277 </td>
278 </tr>
279 </table>
280</form>
281
282<p>
283<strong>* à ne modifier qu'avec l'accord express de l'utilisateur !!!</strong>
284</p>
285
f81d9dad 286<form id="fwds" method="post" action="admin/user#fwds">
0337d704 287 <table class="bicol" cellpadding="2" cellspacing="0">
288 <tr>
8ffa657a 289 <th colspan="4">
0337d704 290 Redirections
291 </th>
292 </tr>
293 {foreach item=mail from=$emails}
2069538b 294 {cycle assign=class values="impair,pair"}
295 <tr class="{$class}">
0337d704 296 <td class="titre">
297 {if $mail->active}active{/if}
298 </td>
299 <td>
dc557110 300 <span class="smaller"><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></span>
8ffa657a 301 </td>
302 <td>
dc557110 303 {if $mail->broken}<span style="color: #f00">{/if}
0337d704 304 {$mail->email}
dc557110 305 {if $mail->broken}<em> (en panne)</em></span>{/if}
0337d704 306 </td>
307 <td class="action">
308 <a href="javascript:del_fwd('{$mail->email}')">delete</a>
309 </td>
310 </tr>
2069538b 311 {if $mail->panne && $mail->panne neq "0000-00-00"}
312 <tr class="{$class}">
313 <td colspan="4" class="smaller" style="color: #f00">
314 {icon name=error title="Panne"}
315 Panne de {$mail->email} le {$mail->panne|date_format}
316 {if $mail->panne neq $mail->last}confirmée le {$mail->last|date_format}{/if}
317 </td>
318 </tr>
319 {/if}
0337d704 320 {/foreach}
2069538b 321 <tr class="{cycle values="impair,pair"}">
8ffa657a 322 <td class="titre" colspan="2">
0337d704 323 Ajouter un email
324 </td>
325 <td>
326 <input type="text" name="email" size="29" maxlength="60" value="" />
327 </td>
328 <td class="action">
329 <input type="hidden" name="user_id" value="{$mr.user_id}" />
330 <input type="hidden" name="del_fwd" value="" />
8ffa657a 331 <input type="hidden" name="activate_fwd" value="" />
332 <input type="hidden" name="deactivate_fwd" value="" />
0337d704 333 <input type="submit" name="add_fwd" value="Ajouter" />
334 </td>
335 </tr>
336 </table>
337</form>
338
0337d704 339{/if}
340{/if}
f97f90f0 341{/if}
0337d704 342
343{* vim:set et sw=2 sts=2 sws=2: *}