Integrate payment directly in Xnet
[platal.git] / templates / admin / utilisateurs.tpl
index fcbef9a..74b0ada 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2004 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2006 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -33,7 +33,7 @@ Attention, d
 
 
 {if $smarty.post.u_kill_conf}
-<form method="post" action="{$smarty.server.PHP_SELF}">
+<form method="post" action="admin/user">
   <div class="center">
     <input type="hidden" name="user_id" value="{$smarty.request.user_id}" />
     Confirmer la suppression de {$smarty.request.user_id}&nbsp;&nbsp;
@@ -42,7 +42,7 @@ Attention, d
 </form>
 {else}
 
-<form method="post" action="{$smarty.server.PHP_SELF}">
+<form method="post" action="admin/user">
   <table class="tinybicol" cellspacing="0" cellpadding="2">
     <tr>
       <th>
@@ -84,7 +84,7 @@ depuis <strong>{$host}</strong>
 <script type="text/javascript">
 //<![CDATA[
 function doEditUser() {
-  document.forms.auth.hashpass.value = MD5(document.forms.edit.password.value);
+  document.forms.auth.hashpass.value = hash_encrypt(document.forms.edit.password.value);
   document.forms.auth.password.value = "";
   document.forms.auth.submit();
 }
@@ -98,18 +98,29 @@ function del_fwd(fwd) {
   document.forms.fwds.del_fwd.value = fwd;
   document.forms.fwds.submit();
 }
+function act_fwd(fwd, activate) {
+  if (activate)
+    document.forms.fwds.activate_fwd.value = fwd;
+  else
+    document.forms.fwds.deactivate_fwd.value = fwd;
+  document.forms.fwds.submit();
+}
 // ]]>
 </script>
 {/literal}
 
-<form id="auth" method="post" action="{$smarty.server.PHP_SELF}">
+<form id="auth" method="post" action="admin/user">
   <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>
@@ -149,6 +160,15 @@ function del_fwd(fwd) {
     </tr>
     <tr class="pair">
       <td class="titre">
+        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
+      </td>
+    </tr>
+    <tr class="pair">
+      <td class="titre">
         Droits
       </td>
       <td>
@@ -160,12 +180,25 @@ function del_fwd(fwd) {
         </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.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
+      </td>
+      <td>
+        <input type="text" name="decesN" size="12" maxlength="10" value="{$mr.deces}" />
       </td>
     </tr>
     <tr class="pair">
@@ -184,9 +217,17 @@ function del_fwd(fwd) {
         <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="{"fiche.php"|url}?user={$mr.forlife}" class="popup2">[Voir fiche]</a>
+        <a href="profile/{$mr.forlife}" class="popup2">[Voir fiche]</a>
       </td>
       <td>
         <input onclick="doEditUser(); return true;" type="submit" name="u_edit" value="UPDATE" />
@@ -194,19 +235,21 @@ function del_fwd(fwd) {
     </tr>
     <tr class="center">
       <td>
-        <a href="admin_trombino.php?uid={$mr.user_id}">[Trombino]</a>
+        <a href="admin/trombino/{$mr.user_id}">[Trombino]</a>
       </td>
       <td>
         <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.
 Pour ceci changer ses permissions en 'disabled'.
 </p>
-<form id="alias" method="post" action="{$smarty.server.PHP_SELF}">
+<form id="alias" method="post" action="admin/user">
   <table class="tinybicol" cellpadding="2" cellspacing="0">
     <tr>
       <th class="alias" colspan="2">
@@ -246,28 +289,43 @@ Pour ceci changer ses permissions en 'disabled'.
 <strong>* à ne modifier qu'avec l'accord express de l'utilisateur !!!</strong>
 </p>
 
-<form id="fwds" method="post" action="{$smarty.server.PHP_SELF}">
+<form id="fwds" method="post" action="admin/user#fwds">
   <table class="bicol" cellpadding="2" cellspacing="0">
     <tr>
-      <th colspan="3">
+      <th colspan="4">
         Redirections
       </th>
     </tr>
     {foreach item=mail from=$emails}
-    <tr>
+    {cycle assign=class values="impair,pair"}
+    <tr class="{$class}">
       <td class="titre">
         {if $mail->active}active{/if}
       </td>
       <td>
+        <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>
+      </td>
+      <td>
+        {if $mail->broken}<span style="color: #f00">{/if}
         {$mail->email}
+        {if $mail->broken}<em> (en panne)</em></span>{/if}
       </td>
       <td class="action">
         <a href="javascript:del_fwd('{$mail->email}')">delete</a>
       </td>
     </tr>
+    {if $mail->panne && $mail->panne neq "0000-00-00"}
+    <tr class="{$class}">
+      <td colspan="4" class="smaller" style="color: #f00">
+        {icon name=error title="Panne"}
+        Panne de {$mail->email} le {$mail->panne|date_format}
+        {if $mail->panne neq $mail->last}confirmée le {$mail->last|date_format}{/if}
+      </td>
+    </tr>
+    {/if}
     {/foreach}
-    <tr>
-      <td class="titre">
+    <tr class="{cycle values="impair,pair"}">
+      <td class="titre" colspan="2">
         Ajouter un email
       </td>
       <td>
@@ -276,19 +334,15 @@ Pour ceci changer ses permissions en 'disabled'.
       <td class="action">
         <input type="hidden" name="user_id" value="{$mr.user_id}" />
         <input type="hidden" name="del_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>
   </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}